uid
stringlengths 6
55
| question
stringlengths 34
465
| context_short
dict | context_long
dict | tags
list | answer
stringlengths 1
25
| relation
stringclasses 1
value |
|---|---|---|---|---|---|---|
uploadify@website@117
|
uploadify -- uploadify is a jquery plugin that integrates a fully-customizable multiple-file-upload utility on your @placeholder .
|
{
"confidence": [
48.39629364013672,
47.28733444213867,
46.7176513671875,
46.56016159057617,
45.46760177612305,
45.21330261230469,
45.1844367980957,
44.9747200012207,
44.84671401977539,
43.7539176940918,
43.40806579589844,
43.1698112487793,
43.1698112487793,
43.14632034301758,
42.41112518310547,
42.252681732177734,
42.1651496887207,
41.8006706237793,
41.8006706237793,
41.57917404174805,
41.484130859375,
41.35346984863281,
41.14434814453125,
41.144134521484375,
41.144134521484375,
40.96104049682617,
40.88397979736328,
40.81389617919922,
40.16780471801758,
39.81675338745117,
39.74528503417969,
39.62995147705078,
39.62995147705078,
39.62995147705078,
39.62995147705078,
39.629737854003906,
39.629737854003906,
39.629737854003906,
39.629737854003906,
39.629737854003906,
39.598331451416016,
39.548561096191406,
39.51813507080078,
39.47066879272461,
39.37040328979492,
39.291629791259766,
39.11965560913086,
38.90772247314453,
38.743995666503906,
38.62529373168945,
38.62529373168945,
38.62529373168945,
38.62507629394531,
38.5597038269043,
38.5597038269043,
38.31072235107422,
38.00373840332031,
38.00373840332031,
38.00373840332031,
37.73933410644531,
37.6204948425293,
37.51530456542969,
37.421180725097656,
37.42096710205078,
37.42096710205078,
37.39332580566406,
37.39332580566406,
37.33440017700195,
37.21759033203125,
37.03556823730469,
37.03556823730469,
37.03556823730469,
36.878082275390625,
36.714176177978516,
36.53522491455078,
36.53522491455078,
36.40187454223633,
36.40187454223633,
36.40187454223633,
36.388668060302734,
36.3387451171875,
36.27485275268555,
36.03091049194336,
35.983299255371094,
35.983299255371094,
35.958641052246094,
35.850799560546875,
35.820003509521484,
35.820003509521484,
35.820003509521484,
35.820003509521484,
35.820003509521484,
35.820003509521484,
35.820003509521484,
35.820003509521484,
35.820003509521484,
35.820003509521484,
35.820003509521484,
35.820003509521484,
35.820003509521484
],
"content": [
"Uploadify is an upload control...uploadify.com .",
"Uploadify support multiple-files on a single upload control .",
"Hi I have implemented uploadify successfully using this link http : www.aspsnippets.com Articles Implement-Uploadify-jQuery-Plugin-in-ASPNet.aspx .",
"Iam using a PLugin for Upload jQuery- uploadify and iam using about 7 Upload-Elements .",
"I m trying to use Uploadify plugin for upload image on my webapplication .",
"I created a WebContent upload.jsp file as follows : .. . .. . DOCTYPE html .. . html lang en .. . head .. . title Uploadify test title .. . script src uploadify jquery-1.3.2.min.js script .. . script src uploadify swfobject.js script .. . script src uploadify jquery.uploadify.v2.1.0.min.js script .. . script type text javascript .. . document .ready function .. . uploadify .uploadify .. . uploader : uploadify uploadify.swf .. . script : uploadServlet .. . folder : uploads .. . cancelImg : uploadify cancel.png .. . .. . upload .click function .. . uploadify .uploadifyUpload .. . return false .. . .. . .. . script .. . head .. . body .. . input id uploadify type file .. . a id upload href Upload a .. . body .. . html .. . .. . .. . 3 .",
"I am using this link http : bobcravens.com 2011 03 upload-multiple-files-with-progress-using-uploadify .. . .. . to upload multiple-files using uploadify .",
"I am trying to upload multiple jpgs using uploadifive uploadify .",
"I m using uploadify for a custom multiple file uploader .",
"You can see the file uploadify.php which comes with the uploadify plugin .",
"This is not about Uploadify working or not working .",
"I need to retreive the ID of the button that is clicked to launch file-upload with uploadify .",
"http : zootfroot.blogspot.com 2010 12 mvc-file-upload-using-uploadify-with.html",
"I have a spring2.0 application and we are using uploadify jquery plugin 2.1 version to implement the image upload functionality .",
"For this i use the plugin uploadify and it works on google-chrome .",
"We dumped Uploadify when moving to Rails 3 and are now using jQuery-File-Upload .",
"I want to use uploadify in this html to upload a file to the server .",
"what is uploadify",
"Uploadify is great .",
"Check out implementing-uploadify http : www.uploadify.com documentation uploadify implementing-uploadify for more information .",
"I have the Uploadify jQuery plugin set up on my site to manage file uploads .",
"I was using uploadify v2.1.4 for my coldfusion upload multiple-files .",
"I am attempting to use Uploadify to upload files but the following happens : .. . .. . 1 .",
"Use the onSelect callback of uploadify :",
"uploadify version 3.2",
"Inside the iFrame is an uploadify script to allow users to upload a file .",
"uploadify.com documentation uploadify formdata http : www.uploadify.com documentation uploadify formdata",
"try using uploadify while u have set the proxy wrong proxy I ve checked uploadify didn t work .",
"Can anybody tell my why Uploadify indicates that the file-upload was successful but no file-exists in the uploads directory",
"is correct - the file uploaded by uploadify will get binded to FileData .",
"I ve got a Django app that accepts uploads from jQuery uploadify http : www.uploadify.com a jQ plugin that uses flash to upload files and give a progress-bar .",
"I use uploadify to upload files into my web site .",
"I am using Uploadify http : www.uploadify.com to upload files .",
"Check this post http : perfectwebtutorials.com 2012 image-resize-before-upload-uploadify",
"Yeah he s asking about Uploadify not using the regular upload process .",
"uploadify gives an IO Error .",
"catch it with onComplete in uploadify .",
"Try disabling uploadify cache",
"Uploadify is using an absolute path .",
"Then add this to the uploadify script .",
"Is there a known way to pass error messages back to Uploadify",
"I am also using uploadify as my file-upload control .",
"which version of uploadify are you working",
"I m trying to upload a video using uploadify and paperclip on rail 3.1 .. . .. . When i upload a video with uploadify the server returns an 500 error .",
"Have you look at this : Using Sessions with Uploadify http : www.uploadify.com documentation uploadify using-sessions-with-uploadify",
"Since uploadify is not update for a long time I think you can change another upload plugin .",
"Add this before your external .js file with the uploadify implementation .",
"How should I retrieve the uploaded file details from uploadify after the completion of the upload process .",
"I got this error when using Uploadify inside a jquery-dialog box .",
"I only need to use uploadify as a way to style the upload button as an image .",
"I m trying to upload images with Uploadify but I run into IO error .",
"I m using uploadify to upload directly from the browser to S3 .",
"Then on the client use uploadify like this :",
"Here is some code to clarify with the uploadify jquery plugin : .. . .. . then do something like .. . .. . I saw this done with jqgrid",
"I m in the process of trying to get the jQuery plugin Uploadify http : www.uploadify.com to work with ASP.NET MVC .",
"I am trying to upload files in Django using Uploadify following this tutorial https : www.madsoft.org 2011 07 29 integrating-uploadify-with-django .",
"I use uploadify with Asp.Net Mvc5 .",
"See the documentation and the example in the uploadify site .",
"My website uses uploadify as well .",
"Uploadify Jquery http : www.uploadify.com .. . .. . I mean what will be the controller",
"HTTP error 303 .. . .. . Here is my code .. . .. . I have included .. . .. . I downloaded the latest UPLOADIFY from server and followed these steps http : www.uploadify.com documentation uploadify implementing-uploadify .. . .. . Here is my controller function",
"This might be a jquery question but how can I change the target folder programmatically in uploadify",
"QA found a bug with an Uploadify upload button that only exists in IE9 .",
"Edit : Using Uploadify 3 .",
"There are 3 instances of uploadify in the page .",
"I have a user control in which I have file-upload control and uploadify script .",
"I got an error when I try to upload a .zip file on my server using uploadify library .",
"I m having an issue with getting Uploadify to properly load .",
"I met the django-uploadify https : github.com tstone django-uploadify wiki multiple file uploading application but the only template-use is described in wiki of the project .",
"with uploadify 2.14 I used : .. . .. . it worked well but with uploadify 3.2.1 it is not working 100 - I got an email but the filename is mising",
"can onSelect event help uploadify.com documentation uploadify onselect http : www.uploadify.com documentation uploadify onselect",
"In short I have followed this http : stackoverflow.com questions 2501037 getting-uploadify-working-in-c-sharp to use uploadify with asp.net .",
"script : virtual-directory Placement Upload .. . .. . right now uploadify is sending to http : localhost Placement Upload .",
"Quote from uploadify .. . .. . fileDataName .. . .. . The name of your files array in the upload server script .",
"It appears there is a problem in the sources of uploadify that conflicts with jquery UI in IE 9 .",
"If uploadify is outside a jquery UI dialog it works just fine .",
"In the file I set fileInput .uploadify I added the onError function .",
"It is possible to bind Uploadify to file inputs I do the same currently .",
"Uploadify cannot binded to a input-type-file only to a div .",
"I want to upload a text file received via AJAX request in Symfony2 using Uploadify 2.1.4 .",
"Also you file input is id file1 so I assume that should be file1 .uploadify not file-upload .uploadify",
"add this code into your uploadscript file like uploadify.php you will have your own uploadify script file .",
"The problem was solved when i edited the image location in CSS page of uploadify and gave the correct path of the uploadify-cancel.png and it worked .",
"All seems to have gone well except uploadify HTML5 no longer works when trying to upload batch images .",
"I am using Windows PHP5.3 and the uploads folder is writable I can upload files there without Uploadify but not with it .. . .. . Thanks in advance",
"Well instead of calling uploadify per a css class you need to call uploadify for a specific ID otherwise it s not going to work .",
"I am having a typical file-upload method inside a plugin in my app and I am using for this Uploadify that uses SFWUpload .",
"Did you ever get this to work with Uploadify",
"I was using uploadify for uploading admin submitted videos .",
"I Try to integrate my Codeigniter web with uploadify .",
"SOLVED with add session id manually through uploadify .",
"admin attach is the method that is called by uploadify in my view .",
"Anyone got any example that works for Uploadify 2.1",
"The solution was to initialize Uploadify after the dialog was created .",
"May have to make a method outside of the uploadify function",
"See uploadify documentation on onComplete the parameter response .",
"If the issue is the uploadify script then it badly needs rewording .",
"Don t use uploadify at all I don t .",
"It shouldn t really matter in order to get Uploadify to work .",
"Uploadify uses it s own default session.. ."
]
}
|
{
"confidence": [
61.70033264160156,
58.96649169921875,
58.93647003173828,
56.21929168701172,
55.88724136352539,
55.082340240478516,
54.7485466003418,
54.37019729614258,
54.321502685546875,
53.739723205566406,
53.638580322265625,
53.59706115722656,
53.43004608154297,
52.584571838378906,
51.653602600097656,
51.25373458862305,
50.96086502075195,
50.94771194458008,
50.754005432128906,
50.42286682128906
],
"content": [
"Question : Hello i m developing in Laravel 5.0 .. . .. . Currently i will update a image file on my server in js . For this i use the plugin uploadify and it works on google-chrome . But on mozilla firefox i get an exception TokenMismatchException . I debug my middleware VerifyCsrfToken and i find .. . .. . and .. . .. . that s the reason of my exception . But i don t understand why the both values isn t equals . My js call is .. . .. . This code works on google-chrome .. . .. . .. . Edit : the plugin uploadify uses flash Comment : Did You solve the problem finally I have to use some plugin for multi file-upload now which one shall i go with .. . Answer : Try to use this . JQuery will set token header in ajax request header everytime so that you don t need to setup yourself . And here is my javascript cookie function . Comment : First thx for your answer i tried it but it didn t work : Maybe i forget this but uploadify uses flash and not ajax i m not sure about ajax but i think it uses no ajax btw all of my ajax methods works on every browser . Comment : Since uploadify is not update for a long time I think you can change another upload plugin . etc jQuery-File-Upload https : github.com blueimp jQuery-File-Upload",
"Question : I m in the process of trying to get the jQuery plugin Uploadify http : www.uploadify.com to work with ASP.NET MVC . I ve got the plugin showing up fine with the following JavaScript snippet : .. . .. . Which seems like all is well in good . If you notice the script attribute is set to my Placement Upload which is my Placement Controller and my Upload Action . The main problem is I m having difficulty getting this action to fire to receive the file . I ve set a breakpoint on that action and when I select a file to upload it isn t getting executed . I ve tried changing the method-signature based off this article http : donnyvblog.blogspot.com 2009 05 using-jquery-plugin-uploadify-with.html : .. . .. . But this still doesn t fire . Can anyone help me write and get the Upload controller action s signature correctly so it will actually fire I can then handle dealing with the file data myself . I just need some help getting the method action to fire . Comment : Any javascript errors in the browser Maybe even add an onError : function .. . Answer : is correct - the file uploaded by uploadify will get binded to FileData . No need to get into Request.Files to retrieve the file - which makes it harder to mock and test . If your action isn t firing at all i.e . try debugging and see if a breakpoint within the method is hit then your issue is most likely the script value - are you running under a virtual-directory If so you ll need to put the name of the directory in front . Uploadify is using an absolute path . i.e . script : virtual-directory Placement Upload .. . .. . right now uploadify is sending to http : localhost Placement Upload . also try using the route debugger http : haacked.com archive 2008 03 13 url-routing-debugger.aspx to check where your route is being mapped to .",
"Question : I m in the process of trying to get the jQuery plugin Uploadify http : www.uploadify.com to work with ASP.NET MVC . I ve got the plugin showing up fine with the following JavaScript snippet : .. . .. . Which seems like all is well in good . If you notice the script attribute is set to my Placement Upload which is my Placement Controller and my Upload Action . The main problem is I m having difficulty getting this action to fire to receive the file . I ve set a breakpoint on that action and when I select a file to upload it isn t getting executed . I ve tried changing the method-signature based off this article http : donnyvblog.blogspot.com 2009 05 using-jquery-plugin-uploadify-with.html : .. . .. . But this still doesn t fire . Can anyone help me write and get the Upload controller action s signature correctly so it will actually fire I can then handle dealing with the file data myself . I just need some help getting the method action to fire . Comment : Any javascript errors in the browser Maybe even add an onError : function .. . Answer : My full solution to this might solve your problem . Hope it helps . http : zootfroot.blogspot.com 2010 12 mvc-file-upload-using-uploadify-with.html",
"Question : I m in the process of trying to get the jQuery plugin Uploadify http : www.uploadify.com to work with ASP.NET MVC . I ve got the plugin showing up fine with the following JavaScript snippet : .. . .. . Which seems like all is well in good . If you notice the script attribute is set to my Placement Upload which is my Placement Controller and my Upload Action . The main problem is I m having difficulty getting this action to fire to receive the file . I ve set a breakpoint on that action and when I select a file to upload it isn t getting executed . I ve tried changing the method-signature based off this article http : donnyvblog.blogspot.com 2009 05 using-jquery-plugin-uploadify-with.html : .. . .. . But this still doesn t fire . Can anyone help me write and get the Upload controller action s signature correctly so it will actually fire I can then handle dealing with the file data myself . I just need some help getting the method action to fire . Comment : Any javascript errors in the browser Maybe even add an onError : function .. . Answer : The problem might be that you need to specify that the action you are uploading to is set to Post...it won t work with the action as a Get action . So this : .. . .. . Should be this : .. . .. . Also be aware that if you are using this in a logged in section of your site you should take a look here for a known bug with uploadify and authentication : http : geekswithblogs.net apopovsky archive 2009 05 06 working-around-flash-cookie-bug-in-asp.net-mvc.aspx .. . .. . Also just an aside there are several ways in MVC to handle file uploads using Request.Files as per Rory Fitzpatrick s suggestion as well as passing the HttpPostedFileBase file as an argument in the action definition . It shouldn t really matter in order to get Uploadify to work .",
"Question : I am creating a website for a client and he wants to be able to have in one page many upload buttons . When he clicks select files uploadify uploads the file to the server and then changes the value of the input field Image to the path of the image . The problem is that i cannot find a way to have multiple upload buttons in one page where each one individually will fill it s own div s Image field . And the client will have n number of divs in the same page . enter image description here http : i.stack.imgur.com WCj7Y.png .. . .. . Here s my js code : .. . Answer : Well instead of calling uploadify per a css class you need to call uploadify for a specific ID otherwise it s not going to work . So you would need : .. . .. . etc... . Comment : I m not sure if i fully understand what you mean but the client has to be able to run the uploadify instance n times as many as the categories that will be created are . So i cannot do that manually . Comment : Then create a loop and add them dynamically . But the ID s need to be unique .",
"Question : I m in the process of trying to get the jQuery plugin Uploadify http : www.uploadify.com to work with ASP.NET MVC . I ve got the plugin showing up fine with the following JavaScript snippet : .. . .. . Which seems like all is well in good . If you notice the script attribute is set to my Placement Upload which is my Placement Controller and my Upload Action . The main problem is I m having difficulty getting this action to fire to receive the file . I ve set a breakpoint on that action and when I select a file to upload it isn t getting executed . I ve tried changing the method-signature based off this article http : donnyvblog.blogspot.com 2009 05 using-jquery-plugin-uploadify-with.html : .. . .. . But this still doesn t fire . Can anyone help me write and get the Upload controller action s signature correctly so it will actually fire I can then handle dealing with the file data myself . I just need some help getting the method action to fire . Comment : Any javascript errors in the browser Maybe even add an onError : function .. . Answer : Reading the documentation it looks like it is sending an array of files . Have you tried : .. . .. . It s also possible that the default model binder won t work with HttpPostedFileBase and you ll either need to use Rory s mechanism or write your own model binder .",
"Question : I m in the process of trying to get the jQuery plugin Uploadify http : www.uploadify.com to work with ASP.NET MVC . I ve got the plugin showing up fine with the following JavaScript snippet : .. . .. . Which seems like all is well in good . If you notice the script attribute is set to my Placement Upload which is my Placement Controller and my Upload Action . The main problem is I m having difficulty getting this action to fire to receive the file . I ve set a breakpoint on that action and when I select a file to upload it isn t getting executed . I ve tried changing the method-signature based off this article http : donnyvblog.blogspot.com 2009 05 using-jquery-plugin-uploadify-with.html : .. . .. . But this still doesn t fire . Can anyone help me write and get the Upload controller action s signature correctly so it will actually fire I can then handle dealing with the file data myself . I just need some help getting the method action to fire . Comment : Any javascript errors in the browser Maybe even add an onError : function .. . Answer : This isn t how I had to implement file-upload at all . I had an action method with no parameters that used the current Request object to dive into the collection of posted files . Some sample code from my implementation : .. . .. . Of course writing tests for this becomes a PITA . You have to mock several objects in order to get it to work for example : .. . .. . It would be easier to create an interface into the posted files and only mock that with a concrete implementation injected into your controller using IoC . I think this was largely based off of this post : Implementing HTTP File Upload with ASP.NET MVC including Tests and Mocks http : www.hanselman.com blog ABackToBasicsCaseStudyImplementingHTTPFileUploadWithASPNETMVCIncludingTestsAndMocks.aspx Comment : Yeah he s asking about Uploadify not using the regular upload process .",
"Question : I m in the process of trying to get the jQuery plugin Uploadify http : www.uploadify.com to work with ASP.NET MVC . I ve got the plugin showing up fine with the following JavaScript snippet : .. . .. . Which seems like all is well in good . If you notice the script attribute is set to my Placement Upload which is my Placement Controller and my Upload Action . The main problem is I m having difficulty getting this action to fire to receive the file . I ve set a breakpoint on that action and when I select a file to upload it isn t getting executed . I ve tried changing the method-signature based off this article http : donnyvblog.blogspot.com 2009 05 using-jquery-plugin-uploadify-with.html : .. . .. . But this still doesn t fire . Can anyone help me write and get the Upload controller action s signature correctly so it will actually fire I can then handle dealing with the file data myself . I just need some help getting the method action to fire . Comment : Any javascript errors in the browser Maybe even add an onError : function .. . Answer : Here is my simple Razor View The Layout master has the Javascript bundles .. . .. . Here is the Contoller Method .. . .. . Thats it",
"Question : I am using this link http : bobcravens.com 2011 03 upload-multiple-files-with-progress-using-uploadify .. . .. . to upload multiple-files using uploadify . My page has multiple fileupload asp controls . These controls also get created when you click on add button . What I want now is to upload all the files selected in these controls and upload it to the server . HTML page .. . .. . I know how to do the upload with single selection but I don t know how to call uploadify when I have multiple-file-upload asp .net controls . Please help me guys . Comment : Uploadify support multiple-files on a single upload control . Why do you have multiple upload controls Comment : @TrueBlueAussie It s just a requirement . If you take a look at the link there is a section Multiple Files With Multiple HTML Input . I want something like that but with asp controls Comment : Strange requirements . I want multiple-files but I want separate buttons to select them The uploadify plugins will interfere with each other as they would normally all target the same server service for the actual upload . To get any more help you need to show your entire page HTML etc as it will be guesswork otherwise . Comment : @TrueBlueAussie I have updated my question . .. . Answer : You will need to instantiate multiple instances of the plugin then fire them all when upload is clicked : .. . .. . e.g . target a class added to the upload controls instead : .. . .. . and attach the plugin with : .. . .. . or just target all inputs of type file as suggested below : .. . .. . Then change the click to start them all uploading : .. . .. . I make no guarantees this will work as you will be sending a load of files to the server at once but give it a shot . Comment : I don t think asp controls take class as an attribute . Comment : @A Beginner : CssClass : msdn.microsoft.com en-us library https : msdn.microsoft.com en-us library system.web.ui.webcontrols.webcontrol.cssclass v vs.110 .aspx Answer updated with this info . Give it a try . Comment : You can avoid the need for CssClass file-upload by changing the selector to input-type-file Comment : @Daniel Cook : A lot slower than a class selector but that is not relevant here so true . Yes you can . Added to answer : Comment : It s not working . When I click on upload link nothing happens",
"Question : Can anyone tell me how to use Uploadify http : www.uploadify.com to upload directly to Amazon S3 My code is as follows : .. . .. . My unencoded policy string looks like this : .. . .. . Using the above code actually allows me to select a file which it then appears to upload somewhere but nothing shows up in my S3 bucket and no errors are returned to the JS console . Using a regular HTML form to post a file to the S3 bucket works fine . Any advice .. . Answer : I managed to get a direct upload to Amazon S3 with progress-bar working ive got a working demo here . If anyone is interested it will support buckets and folders within bucket working on producing a wordpress-plugin for this . This is using swfupload tho working on uploadify ill post when its done . http : www.isimpledesign.co.uk blog amazon-s3-direct-multiple-file-upload-progress-bar Comment : Did you ever get this to work with Uploadify I can only get it to work intermittently",
"Question : I need to create a model application form where models can fill it and add pictures to it . I m following this example with Uploadify Paperclip and Rails 3 approach . https : github.com websymphony Rails3-Paperclip-Uploadify .. . .. . To the pictures i have an polymorphic Attachment model and i would like to attach those ajax uploaded attachments to the yet unsaved model form and there s is where the tricky part cames . Users are not logged so there s no model id until is saved . Since i m showing the user a small preview of the images that he uploaded in the form by ajax after each upload i need some way to correlate them . I was thinking about some middle token until the model is saved but i m not sure whats the best approach to accomplish this . Thank you .. . Answer : We dumped Uploadify when moving to Rails 3 and are now using jQuery-File-Upload . https : github.com blueimp jQuery-File-Upload .. . .. . Setting up a bunch of middleware to do nothing more than upload files seems like a major hassle . Only problem with the jquery solution is multiple uploads aren t supported in IE . Comment : Do you think you d be able to give some information regarding how you tied paperclip and jquery-File-Upload Comment : github.com blueimp jQuery-File-Upload wiki https : github.com blueimp jQuery-File-Upload wiki jQuery-File-Upload-for-Rails-3",
"Question : null .. . Answer : Iam using a PLugin for Upload jQuery- uploadify and iam using about 7 Upload-Elements . How iam getting the current upload Object after each Upload I already tried everything but it always gives me the last Uploadfield-Id- Not the current one .",
"Question : I am creating a website for a client and he wants to be able to have in one page many upload buttons . When he clicks select files uploadify uploads the file to the server and then changes the value of the input field Image to the path of the image . The problem is that i cannot find a way to have multiple upload buttons in one page where each one individually will fill it s own div s Image field . And the client will have n number of divs in the same page . enter image description here http : i.stack.imgur.com WCj7Y.png .. . .. . Here s my js code : .. . Answer : I am not sure if the above answers cover uploadify elements that are added dynamically through AJAX after the page has been loaded . I faced this problem . Then while reading the live http : api.jquery.com live function on the jQuery API I realised it can be done this way :",
"Question : I am creating a website for a client and he wants to be able to have in one page many upload buttons . When he clicks select files uploadify uploads the file to the server and then changes the value of the input field Image to the path of the image . The problem is that i cannot find a way to have multiple upload buttons in one page where each one individually will fill it s own div s Image field . And the client will have n number of divs in the same page . enter image description here http : i.stack.imgur.com WCj7Y.png .. . .. . Here s my js code : .. . Answer : I had this exact same problem . I think what you are going to want to do is make a user control for each instance of the uploadify you want to have on your page . Example of my working uploadify control : .. . .. . This is the code-behind section of the control some of the parameters you see are passed in externally .. . .. . I create the control like this and pass in a few variables . The file destination and click event are handled in the codebehind of whatever page is using the control . This works great for me in Firefox Chrome and IE it should lead you in the right direction . You might want to consider adding a default upload option if the user doesn t have flash installed as well . Multiple buttons working http : i.stack.imgur.com jpSmo.png",
"Question : I m trying to use Uploadify plugin for upload image on my webapplication . I m actually using ASP VB.net . This is my jquery method for the upload : .. . .. . When i try to upload something i get a 404 error on the uploader file Upload.vb but i m pretty sure that file it s in the right directory Scripts . The strange thing is i ve not problem with the swf file that it s in the same directory . Can someone help me .. . Answer : for to upload the file you need a generic controller Handler1.ashx I leave as I have I file : .. . .. . And the JS File : .. . .. . I hope it is helpful Greetings",
"Question : This seemed like it should be easy but I have had trouble getting it to work . I don t know why it doesn t . It is just showing the normal file input . Is there any code examples to get this working . I am getting frustrated.. . Thank you all . Comment : what is uploadify what are the problems you re having do you have example code of your own that you ve tried Comment : jQuery plugin I think.. . Comment : Uploadify is great . @JoelMartinez : uploadify.com http : www.uploadify.com Comment : Uploadify is an upload control...uploadify.com . Looks neat . The JQuery thing made the button show up but it still doesn t work . I am gonna watch this video and see what I m doing wrong . Comment : K I got it working . Thanks for the links .. . Answer : This is a video tutorial on how to get started using C and Webforms should help you . http : casonclagg.com articles 6 video-tutorial-uploadify-asp-net-c-sharp.aspx .. . .. . Can you post your code though so that I might be able to show you what you are doing wrong Here is the sample code I have for asp.net .. . .. . Then you want to make a Handler .ashx : .. . .. . Post your code and I will take a look at it . Sounds like you are pointing to a resource that doesn t exist . Maybe your uploader property is not pointed to the proper resource or your jquery link is broken or not there . Comment : Excellent worked like a charm Comment : Video has been deleted : Comment : Just a heads up that a lot of the parameters described in this answer have changed . I suggest always checking the latest documentation .",
"Question : I have the Uploadify jQuery plugin set up on my site to manage file uploads . Within the onUploadSuccess event I have this code : .. . .. . This is meant to show me whatever the upload script spits out . Now usually the response is something like this : .. . .. . Upload complete for file test.jpg . Script returned : status : 1 file : id : v8rwlxj3 name : test.jpg .. . .. . The upload script is first accepting the file then uploading it to Rapidshare using cURL like so : .. . .. . when it s uploaded the upload script spits out a JSON response like so : .. . .. . This works fine for smaller files . When I upload my 30MB test file however I get this response : .. . .. . Upload complete for file 30mb.txt . Script returned : .. . .. . At first I thought PHP was hitting the max execution-time but I have this at the top of my script : .. . .. . And besides I d see the PHP error being returned . But it s just not returning anything . What could cause this Thanks . Comment : PHP may be not hitting time limit but ajax may be reaching connection timeout while waiting for the response Comment : Ah that may be it . Uploadify assumes the upload was successful if it doesn t receive a response back from the script after 30 seconds . I ll set the success timeout to something high then see if it works . Thanks . Comment : Yep that was it . Thanks a lot : .. . Answer : Yes nice answer although it was in comment but helped me . http : www.uploadify.com documentation uploadify successtimeout .. . .. . set successTimeout to some high value . lets say 1 hour .",
"Question : So far my uploadify implementation is running relatively smoothly except for one nagging issue . I have my uploadify browse prompt in a jquery-ui dialog modal window . Files get uploaded fine but for each file item chosen two identical queue items same id appear . Only one of these queue items is actually updated with the progress-bar although both seem to get the percentage updates . When the file-upload is complete only one of these queue items the same one updated with the progress-bar is removed . alt text http : i.stack.imgur.com 4SLli.jpg .. . .. . I tested it outside of the jquery-ui dialog modal window and the double queue item behavior vanished . I d love to keep the uploadify prompt and queue within a modal-dialog window if possible though . Any clues as to why using uploadify in a jquery-ui modal window causes this double queue item behavior UPDATE : .. . .. . HTML : .. . .. . UPDATE 2 : .. . .. . jQuery UI dialog : Comment : I solved it with workaround solution but i am not happy with workaround . I would like to know more info on this probably bug . Comment : your code please Comment : You should share your workaround in case anyone else runs into the problem . Comment : updated with image that shows the error bug .. . Answer : Is this the solution to the bug",
"Question : Hi I have implemented uploadify successfully using this link http : www.aspsnippets.com Articles Implement-Uploadify-jQuery-Plugin-in-ASPNet.aspx . One more thing I needed to complete this is I want to access total number to files in queue and current file number that is being uploaded . I have no clue about it . How can I get this .. . Answer : Probably you will need to configure something like .. . .. . And with this info you can send it to Client if you need . hope this help Comment : I want to get this count in code-behind in ashx file Comment : Can you show how you have your Uploadify configured Comment : I have exact copy and configuration as in link I provided .",
"Question : I have found some posts with the same problem I have however no solutions presented . I am not 100 sure what to make of this but hope you can help . I am attempting to use Uploadify to upload files but the following happens : .. . .. . 1 . Browse for file successful hence my script and uploaded attributes are correct .. . 2 . Progress bar says 100 and completes . 3 . onComplete fires saying upload successful according to the path alerted folder attribute is correct . 4 . If I die my script before any output the 3 step does not happen - hence it reaches the script specified . After output the script doesn t die . 5 . FILE IS NOT FOUND IN FILESYSTEM .. . .. . Not sure how this is possible - as far as I can tell everything is correct . Here is my code : .. . .. . The PHP script s only change is the name of the targetFile which I have changed to ensure some sort of unique filename although not foolproof but otherwise the script is the same as released with comments removed here for brevity purposes . Can anybody tell my why Uploadify indicates that the file-upload was successful but no file-exists in the uploads directory I am using Windows PHP5.3 and the uploads folder is writable I can upload files there without Uploadify but not with it .. . .. . Thanks in advance Kobus .. . Answer : I had similar problems on a Linux machine . It turned out that the PHP configuration on my server was the cuplrit . PHP was running in SAFE MODE . As I had uploaded the Uploadify scripts via FTP so script files were stored in the file system with my FTP user details . Since PHP s temp folder was owned by the server root I had a UID mismatch i.e . the temporary upload file was attributed to root while the upload script that tried to move it was owned by the FTP user . That fragged it . To resolve this I changed the ownership of the uploadify php script to root and from there on it worked ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
website
|
UNK_RELATION
|
checkboxtree@jquery@43
|
checkboxtree -- jquery checkbox tree is a @placeholder plugin to have a hierarchical tree with checkboxes at each node .
|
{
"confidence": [
40.694210052490234,
34.208778381347656,
28.99383544921875,
28.055347442626953,
26.89368438720703,
25.46158218383789,
23.917861938476562,
21.25961685180664,
20.460063934326172,
18.25322914123535,
17.957504272460938,
17.137962341308594,
17.137962341308594,
16.310754776000977,
16.0545711517334,
15.282463073730469,
14.32170581817627,
14.32170581817627,
14.32170581817627,
14.32170581817627,
14.32170581817627,
14.32170581817627,
14.32170581817627,
14.32170581817627,
14.32170581817627,
14.32170581817627,
14.32170581817627,
14.32170581817627,
14.32170581817627,
14.32170581817627,
14.32170581817627,
14.32170581817627,
12.87482738494873,
12.87482738494873,
12.87482738494873,
12.87482738494873,
12.87482738494873,
12.87482738494873,
12.87482738494873,
12.87482738494873
],
"content": [
"I am using the jquery checkboxtree plugin http : checkboxtree.googlecode.com svn tags checkboxtree-0.5.2 index.html which works great .",
"I am using the jquery checkboxtree plugin http : checkboxtree.googlecode.com svn tags checkboxtree-0.5.2 index.html which works great and has good documentation and examples in the link above .",
"I m trying to set up a checkbox tree in JavaFX where the leaves are bound to their parents : .. . .. . they are selected when the parent is selected .. . cannot be changed individually .",
"Is this possible using this jquery plugin",
"Which results in a tree where all the nodes that has no children are disabled .",
"This means when you select deselect a node in the tree which has children it will select deselect all of it s children by default and also sets the checked unchecked indeterminate state of its parent but this is not important in your case .",
"and I was hoping that I could expand multiple nodes using a class name like this .. . .. . tabs-5-expand .click function tree5 .checkboxTree expand .bluetabs",
"I now have a situation where I want to programmatically check a node .",
"Solution .. . .. . You have two requirements : .. . .. . select all of the children nodes when the parent is selected which is already done .. . .. . do not allow to select child nodes manually .. . .. . For the second requirement you can disable the checkbox of these items .",
"if the parent nodes are collapsed then you don t even realized that anything has happened .. . .. . I am trying to figure out if there is any way to expand until or expand parents when I programmatically check a node so it not only checks the node but ALSO expands parent nodes so that node that I have chosen to check is visible",
"It works just fine but it throws an exception each time I select or deselect the parent .",
"The problem is coming from this line .. . .. . To understand why do you get an exception whatever node you select you should take a look on the independentProperty https : docs.oracle.com javafx-2 api javafx scene control CheckBoxTreeItem.html independentProperty 28 29 of CheckBoxTreeItem : .. . .. . A CheckBoxTreeItem can be independent or dependent .",
"Now you can understand why your binding is problematic : You bind the selectedProperty of the child nodes to the selectedProperty of the parent node then : .. . .. . if you check one of the leaf nodes you will get an exception because the value is bound and bound values cannot be set .",
"Ah yes I have corrected it.Simply click on the accept answer button it s enough to thank :",
"By default CheckBoxTreeItem instances are dependent which means that any changes to the selection state of a TreeItem will have an impact on parent and children CheckBoxTreeItem instances .",
"I have a situation where I want to programmatically expand certain nodes .",
"I did it using a binding with the selectedProperty .",
"Is there an easy way around this",
"I hate to abandon an approach that works except for those nasty exceptions .",
"The relevant code is below .",
"Please forgive any java convention errors - I m still new to the language .",
"Controller : .. . .. . Here is the FXML : .. . .. . and here is the main : .. . .. . Any advice would be appreciated .",
"If a CheckBoxTreeItem is set to be independent this means that any changes to that CheckBoxTreeItem will not directly impact the state of parent and children CheckBoxTreeItem instances .",
"This is one of the functionality what you need and you get it out of the box .",
"if you check one of the parent nodes it will try to select all of its children because of being dependent then you will get an exception again .",
"For this you can use the setCellFactory https : docs.oracle.com javase 8 javafx api javafx scene control TreeView.html setCellFactory-javafx.util.Callback- method of your TreeView : .. . .. . This snippet will bind the disableProperty of the displayed CheckBoxTreeCell objects to the leafProperty https : docs.oracle.com javafx-2 api javafx scene control TreeItem.html leafProperty 28 29 of the corresponding CheckBoxTreeItem .",
"public final ReadOnlyBooleanProperty leafProperty .. . .. . Represents the TreeItem leaf property which is true if the TreeItem has no children .",
"enter image description here http : i.stack.imgur.com e6Fjf.png .. . .. . To make this working you should remove this line from your code : .. . .. . and you should replace this line .. . .. . with the code posted above .",
"Can t thank you enough",
"Works perfectly although your code had an uneven number of matching curly-brackets and I had to add to make it go .",
"Once that was done it was a complete success .",
"Thanks again .",
"I see that I can do by Id as in the example : .. . .. . and I was hoping that I could expand multiple nodes using a class name like this .. . .. . but it doesn t seem to do anything .",
"Does anyone know if there is a way to programatically expand or collapse nodes here using class selectors",
"Check this fiddle http : jsfiddle.net b6ofyfzx and uncomment the handlers one at a time .",
"The right way to do it is to iterate the array of the elements .",
"Check comments for more .",
"This is supported using the following syntax : .. . .. . but the issue is that this is not useful unless all of the parent nodes are already expanded .",
"It seems like this is supported at initialization time using this option : .. . .. . but I don t see how that can be applied when checking items programatically after initiatization .",
"This worked for me :"
]
}
|
{
"confidence": [
49.44282150268555,
42.320133209228516,
34.40593338012695
],
"content": [
"Question : I am using the jquery checkboxtree plugin http : checkboxtree.googlecode.com svn tags checkboxtree-0.5.2 index.html which works great and has good documentation and examples in the link above . I now have a situation where I want to programmatically check a node . This is supported using the following syntax : .. . .. . but the issue is that this is not useful unless all of the parent nodes are already expanded . if the parent nodes are collapsed then you don t even realized that anything has happened .. . .. . I am trying to figure out if there is any way to expand until or expand parents when I programmatically check a node so it not only checks the node but ALSO expands parent nodes so that node that I have chosen to check is visible It seems like this is supported at initialization time using this option : .. . .. . but I don t see how that can be applied when checking items programatically after initiatization . Is this possible using this jquery plugin and I was hoping that I could expand multiple nodes using a class name like this .. . .. . tabs-5-expand .click function tree5 .checkboxTree expand .bluetabs .. . Answer : This worked for me :",
"Question : I am using the jquery checkboxtree plugin http : checkboxtree.googlecode.com svn tags checkboxtree-0.5.2 index.html which works great . I have a situation where I want to programmatically expand certain nodes . I see that I can do by Id as in the example : .. . .. . and I was hoping that I could expand multiple nodes using a class name like this .. . .. . but it doesn t seem to do anything . Does anyone know if there is a way to programatically expand or collapse nodes here using class selectors .. . Answer : Check this fiddle http : jsfiddle.net b6ofyfzx and uncomment the handlers one at a time . The right way to do it is to iterate the array of the elements . Check comments for more .",
"Question : I m trying to set up a checkbox tree in JavaFX where the leaves are bound to their parents : .. . .. . they are selected when the parent is selected .. . cannot be changed individually . I did it using a binding with the selectedProperty . It works just fine but it throws an exception each time I select or deselect the parent . Is there an easy way around this I hate to abandon an approach that works except for those nasty exceptions . The relevant code is below . Please forgive any java convention errors - I m still new to the language . Controller : .. . .. . Here is the FXML : .. . .. . and here is the main : .. . .. . Any advice would be appreciated . .. . Answer : The problem is coming from this line .. . .. . To understand why do you get an exception whatever node you select you should take a look on the independentProperty https : docs.oracle.com javafx-2 api javafx scene control CheckBoxTreeItem.html independentProperty 28 29 of CheckBoxTreeItem : .. . .. . A CheckBoxTreeItem can be independent or dependent . By default CheckBoxTreeItem instances are dependent which means that any changes to the selection state of a TreeItem will have an impact on parent and children CheckBoxTreeItem instances . If a CheckBoxTreeItem is set to be independent this means that any changes to that CheckBoxTreeItem will not directly impact the state of parent and children CheckBoxTreeItem instances . This means when you select deselect a node in the tree which has children it will select deselect all of it s children by default and also sets the checked unchecked indeterminate state of its parent but this is not important in your case . This is one of the functionality what you need and you get it out of the box . Now you can understand why your binding is problematic : You bind the selectedProperty of the child nodes to the selectedProperty of the parent node then : .. . .. . if you check one of the leaf nodes you will get an exception because the value is bound and bound values cannot be set . if you check one of the parent nodes it will try to select all of its children because of being dependent then you will get an exception again . Solution .. . .. . You have two requirements : .. . .. . select all of the children nodes when the parent is selected which is already done .. . .. . do not allow to select child nodes manually .. . .. . For the second requirement you can disable the checkbox of these items . For this you can use the setCellFactory https : docs.oracle.com javase 8 javafx api javafx scene control TreeView.html setCellFactory-javafx.util.Callback- method of your TreeView : .. . .. . This snippet will bind the disableProperty of the displayed CheckBoxTreeCell objects to the leafProperty https : docs.oracle.com javafx-2 api javafx scene control TreeItem.html leafProperty 28 29 of the corresponding CheckBoxTreeItem . public final ReadOnlyBooleanProperty leafProperty .. . .. . Represents the TreeItem leaf property which is true if the TreeItem has no children . Which results in a tree where all the nodes that has no children are disabled . enter image description here http : i.stack.imgur.com e6Fjf.png .. . .. . To make this working you should remove this line from your code : .. . .. . and you should replace this line .. . .. . with the code posted above . Comment : Can t thank you enough Works perfectly although your code had an uneven number of matching curly-brackets and I had to add to make it go . Once that was done it was a complete success . Thanks again . Comment : Ah yes I have corrected it.Simply click on the accept answer button it s enough to thank :"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
jquery
|
UNK_RELATION
|
freertos@real-time@48
|
freertos -- freertos is a portable open-source @placeholder operating systems for microcontrollers .
|
{
"confidence": [
43.70167922973633,
43.19253921508789,
42.69086456298828,
42.52611541748047,
42.52611541748047,
40.95302200317383,
40.95302200317383,
40.48140335083008,
40.48140335083008,
40.48140335083008,
40.396480560302734,
39.95249938964844,
39.909420013427734,
39.830772399902344,
39.27565002441406,
39.27565002441406,
39.27565002441406,
39.27565002441406,
39.27565002441406,
38.99148941040039,
38.59602737426758,
38.59602737426758,
38.27689743041992,
38.23204803466797,
37.896270751953125,
37.896270751953125,
37.31806182861328,
37.233299255371094,
37.233299255371094,
37.233299255371094,
37.17680358886719,
37.02293014526367,
37.02293014526367,
37.02293014526367,
37.02293014526367,
36.981266021728516,
35.982513427734375,
35.979331970214844,
35.979331970214844,
35.979331970214844,
35.979331970214844,
35.979331970214844,
35.979331970214844,
35.979331970214844,
35.768104553222656,
35.768104553222656,
35.60370635986328,
35.60370635986328,
35.54458999633789,
35.54458999633789,
35.54458999633789,
35.54458999633789,
35.535888671875,
35.174346923828125,
35.023677825927734,
34.728546142578125,
34.728546142578125,
34.728546142578125,
34.728546142578125,
34.728546142578125,
34.728546142578125,
34.56010437011719,
34.008453369140625,
33.971492767333984,
33.971492767333984,
33.971492767333984,
33.971492767333984,
33.971492767333984,
33.971492767333984,
33.971492767333984,
33.971492767333984,
33.971492767333984,
33.971492767333984,
33.30931854248047,
32.96485137939453,
32.927894592285156,
32.927894592285156,
32.927894592285156,
32.927894592285156,
32.927894592285156,
32.927894592285156,
32.927894592285156,
32.927894592285156,
32.927894592285156,
32.927894592285156,
32.43745422363281,
32.35739517211914,
32.35739517211914,
32.35739517211914,
31.714069366455078,
31.677108764648438,
31.677108764648438,
31.677108764648438,
31.677108764648438,
31.677108764648438,
31.677108764648438,
31.677108764648438,
31.66862678527832,
31.43431854248047
],
"content": [
"This is a basic tools question not a FreeRTOS or FreeRTOS+Trace question although you can fix it by changing the FreeRTOS configuration and or FreeRTOS+Trace configuration .",
"FreeRTOS is V8.2.2 .",
"Is there a procedural guide on how to configure FreeRTOS source code",
"Am trying to learn freertos .",
"FreeRTOS Failure causes reset .",
"Problem in use of FPU and freeRTOS .",
"I am learning freeRTOS .",
"If you d like to continue with your efforts to port FreeRTOS to the MK20 you ll want to check out the FreeRTOS Porting Guide http : www.freertos.org FreeRTOS-porting-guide.html .",
"@KhalidAlshamkhany I just edited my answer to reference the FreeRTOS Porting Guide freertos.org FreeRTOS-porting-guide.html http : www.freertos.org FreeRTOS-porting-guide.html",
"There is a very old example of how to use FreeRTOS with lwIP in the FreeRTOS Interactive site http : interactive.freertos.org entries 20290712-FreeRTOS-Win32-project-with-lwIP-web-server .",
"w o modifyng FreeRTOS or the CMSIS source code .",
"Is this using the FreeRTOS+FAT http : www.freertos.org FreeRTOS-Plus FreeRTOS Plus FAT index.html",
"FreeRTOS allows e.g .",
"Again many RTOSes like FreeRTOS are not operating systems in the same sense as a GPOS such as Linux .",
"The FreeRTOS Queue passes items by copy .",
"I m using FreeRTOS on STM32F4 discovery .",
"I have FreeRTOS on LPC microcontroller .",
"I m writting an application with LPC1769 and FreeRTOS .",
"Probably the single largest will be the FreeRTOS heap .",
"It s defined in file Source tasks.c near line 595 FreeRTOS v9.0.0rc2 .",
"Are there any changes I need to do to the FreeRTOS code",
"I ve design the solution using the FreeRTOS timers : .. . .. . 1 .",
"If I create a non-FreeRTOS project where the systick is correct it has the same RCC configuration as in the FreeRTOS version .",
"For freertos I adopted heap 1 implementation .",
"I am using FreeRTOS v8.2.3 on a PIC32 micro controller .",
"If not possible how do we typically implement the above requirement in FreeRTOS",
"If you are using one of the processors listed on the FreeRTOS+TCP examples page http : www.freertos.org FreeRTOS-Plus FreeRTOS Plus TCP TCP FAT demo projects.html FreeRTOS+TCP being FreeRTOS s own TCP IP stack then that may provide a further reference .",
"FreeRTOS Forum http : sourceforge.net p freertos discussion 382005 thread 17f86b2a .. . .. . 3 .",
"You will find many many many examples in the FreeRTOS Demo directory of the FreeRTOS download .",
"There seems to be someone trying to go for Lua on FreeRTOS http : sourceforge.net projects freertos forums forum 382005 topic 5162642 pic32 .",
"The FreeRTOS Putting It All Together http : www.freertos.org implementation a00019.html page gives a detailed example of how FreeRTOS performs a context-switch on an AVR microcontroller .",
"How can I port FreeRTOS to that processor",
"It depends which FreeRTOS version you are using .",
"I m using freertos - freertos.org http : www.freertos.org",
"The original version of FreeRTOS used memory pools .",
"I have a FreeRTOS function xTaskCreate .",
"I might ask on FreeRTOS forums too but it s really more a question about the GCC toolchain than about FreeRTOS .",
"I am using an MSP430f5438 with version 5.4 of FreeRTOS .",
"My embedded system consists of STM32F4 FreeRTOS and LwIP .",
"This is being used as a part of the using FreeRTOS functionality .",
"Just note there is no console in typical FreeRTOS applications .",
"FreeRTOS provides at least four different allocators .",
"FreeRTOS is not a linux system and as such does not have dev mem .",
"I am new to FreeRTOS and RTSM simulator .",
"I get this this error : . . Middlewares Third Party FreeRTOS Source portable GCC ARM CM4F portmacro.h 221 : error : 18 : expected a .. . .. . portmacro.h has this : .. . .. . ARM is STM32F417VG .",
"With Keil you should use appropriate files from FreeRTOS Source portable RVDS ARM CM4F .. . .. . This function in Keil syntax looks like",
"There is a Zynq FreeRTOS TCP project that uses the BSD style sockets interface like Linux here : http : www.freertos.org FreeRTOS-Plus FreeRTOS Plus TCP TCPIP FAT Examples Xilinx Zynq.html",
"Also note that in FreeRTOS V9 http : www.freertos.org FreeRTOS-V9.html you need not have any memory allocation scheme as everything can be statically allocated .",
"You could download the ARM port of FreeRTOS to see the details of the ARM implementation .",
"My first target is to make some leds blink by using FreeRTOS .",
"I downloaded the FreeRTOS libary through the Arduino IDE library manager .",
"Using FreeRTOS has been a huge boon for us too .",
".. . To get around this problem FreeRTOS keeps the memory allocation API in its portable layer .",
"EDIT .. . .. . I removed exception.s from freertos-7.0.0 source portable gcc avr32 uc3 exception.S and keep the exception.s file of my starting application Now using the application hierarchy mentioned above if i exclude freertos directory from the project all works well if i include the freertos directory twi master read causes problems There is any pins redefinitions in the kernel files and i didn t call include freeRTOS API at all so how the behaviour changes this way",
"I used to port FreeRTOS to a microcontroller and it s very easy I just included some .h and .c files of FreeRTOS and then used the FreeRTOS functions to build my application on the chip .",
"The issue was launching other applications from freeRTOS .",
"I asked the same at FreeRTOS forum and got the answers .",
"Make sure the RaspberryPi version and freertos versions are okay .",
"I raise this question during use freertos fat .",
"A very nice starting point for a CMSIS FreeRTOS project .",
"Best ask this on the FreeRTOS forum response there is usually great .",
"We would like to also share that we have used FreeRTOS prior to this application and we have successfully built applications with FreeRTOS .",
"But I m just guessing and you should look at the source code for the FreeRTOS scheduler to learn what it does .",
"How much is the overhead introduced by Petalinux in the interrupt service with respect to baremetal or FreeRTOS",
"Then the FreeRTOS scheduler should make the task with the highest priority ready to run first .",
"I am looking for a small libc for embedded use with freertos on a ARM7 microcontroller .",
"This can then call the FreeRTOS API and initiate the task with no further delay .",
"I d now applied the EXTI based solution in combination with a FreeRtos semaphore .",
"For example while using the semaphore api of freertos there is software generated interrupt .",
"The FreeRTOS documentation http : www.freertos.org a00111.html tells you how to reduce that .",
"I am trying to port sqlite3 VFS implementation on freertos with stm32 .",
"I want to use a member function of a CPP Class for a FreeRTOS taskFunction .",
"I am trying to link the interrupt of the fpga to FreeRTOS in zedboard .",
"FreeRTOS will not leak memory but your application might so you can detect it the same way you would in a non FreeRTOS application .",
"Also I do not want to import freeRTOS source files from another project this will be the last choice .",
"i am attempting to integrate freeRTOS to my application that run on AT32UC3A0512 .",
"I use Keil uvision5 to compile cmsis os.c wrapper for my FreeRTOS .",
"I m sending 1k data using TCP IP using FreeRTOS + LwiP .",
"Have a good look around the FreeRTOS website and play with a few demo s .",
"I want to use freeRTOS on CPU1 and Petalinux on CPU0 in an AMP configuration .",
"Is there a correct way to access AXI slave registers from freeRTOS in an AMP configuration",
"I work for a company that created firmware for several device using FreeRTOS .",
"Are there any FreeRTOS projects that interpret java python or similar bytecode",
"It might be possible to interface them with FreeRTOS or turn the interpreter into a task .",
"which actually covers the majority of applications in which FreeRTOS gets used .",
"Also as the original versions of FreeRTOS were intended for very RAM constrained systems it was found that the RAM wasted by the use of oversized pools was not acceptable .",
"As an aside we have FreeRTOS+TCP http : www.freertos.org FreeRTOS-Plus FreeRTOS Plus TCP index.html running on an STM32F4 now but on the larger eval board rather than the Discovery board .",
"Here https : sourceforge.net p freertos discussion 382005 thread 140cde98 694c is another approach without the use of EXTI but because of using a FreeRtos trace macro it s a bit too hacky for my project .",
"we have used FreeRTOS API to create task and scheduler is run still only one task is running and context switching is not happening between multiple tasks created using FreeRTOS APIs .",
"The original file is from FreeRTOS Demo CORTEX M0 LPC1114 LPCXpresso RTOSDemo Source FreeRTOSConfig.h which also integrates the CMSIS system clock into the config .",
"Even with an MMU a simple RTOS kernel such as FreeRTOS won t use it .",
"You could in principle implement the same functionality on FreeRTOS but it is non trivial .",
"I m trying to get FreeRTOS running on my stm32f4discovery board .",
"So it s a very different paradigm from what you re used to with FreeRTOS .",
"I m using FreeRTOS on an EFM32 giant gecko micro-controller and GCC compiler .",
"If I didn t call FreeRTOS certain functions such as create tasks there is no hard fault .",
"Note : The FreeRTOS examples accomplish this via a custom startup file .",
"FreeRTOS source code is V8.1.2 .. . .. . We have existing gcc-based source code for our ARM that I need to port onto Keil IDE .",
"A little question about the freeRTOS task scheduler : .. . .. . Is the task scheduler called inside the xQueueSend function or is it call at the next system tick"
]
}
|
{
"confidence": [
57.951168060302734,
56.09416580200195,
55.68355941772461,
55.23468017578125,
51.80978775024414,
51.80978775024414,
51.736572265625,
51.02665328979492,
49.38369369506836,
47.726348876953125,
47.703861236572266,
46.93661880493164,
46.85063934326172,
46.446102142333984,
46.06568145751953,
45.828529357910156,
45.63581466674805,
45.50844955444336,
45.40866470336914,
45.357295989990234
],
"content": [
"Question : I am looking for a small libc for embedded use with freertos on a ARM7 microcontroller . I have looked at newlib but it is a bit too complex for my needs . Newlib calls malloc in a number of functions e.g . printf which is not good for small embedded realtime systems . Does anyone know of a small portable open-source libc implementation that will fit my application Comment : What OS kernel are you using That s key to determining what your choices are . Comment : I m using freertos - freertos.org http : www.freertos.org .. . Answer : I use newlib on my Cortex M3 with 32kB RAM and to eliminate the malloc you can use siprintf or sniprintf . Pro : No more calls to malloc . Con : It does not suport formatting float and double and is not really portable this way .",
"Question : I am looking for a small libc for embedded use with freertos on a ARM7 microcontroller . I have looked at newlib but it is a bit too complex for my needs . Newlib calls malloc in a number of functions e.g . printf which is not good for small embedded realtime systems . Does anyone know of a small portable open-source libc implementation that will fit my application Comment : What OS kernel are you using That s key to determining what your choices are . Comment : I m using freertos - freertos.org http : www.freertos.org .. . Answer : Look into uClibc http : www.uclibc.org and EGLIBC http : www.eglibc.org faq perhaps . Comment : OP is apparently not using Linux so these Linux-based choices will not be very helpful. .",
"Question : I use Keil uvision5 to compile cmsis os.c wrapper for my FreeRTOS . I get this this error : . . Middlewares Third Party FreeRTOS Source portable GCC ARM CM4F portmacro.h 221 : error : 18 : expected a .. . .. . portmacro.h has this : .. . .. . ARM is STM32F417VG . FreeRTOS source code is V8.1.2 .. . .. . We have existing gcc-based source code for our ARM that I need to port onto Keil IDE . I used ST CubeMx to generate a virgin Keil project . Then I added v8.1.2 FreeRTOS source code including cmsis os.c and cmsis os.h because Keil needs cmsis RTOS wrapper for debugger etc . Comment : I cannot find ulNewBASEPRI anywhere . - modulo broken formatting it s declared right there as a local variable.. . Either way that s some GCC-specific syntax and functionality so compiling it with not-GCC is going to mean rewriting it . FreeRTOS claims to support the Keil tools directly so why do you need to mess with the GCC version of the sources anyway .. . Answer : With Keil you should use appropriate files from FreeRTOS Source portable RVDS ARM CM4F .. . .. . This function in Keil syntax looks like",
"Question : I am looking for a small libc for embedded use with freertos on a ARM7 microcontroller . I have looked at newlib but it is a bit too complex for my needs . Newlib calls malloc in a number of functions e.g . printf which is not good for small embedded realtime systems . Does anyone know of a small portable open-source libc implementation that will fit my application Comment : What OS kernel are you using That s key to determining what your choices are . Comment : I m using freertos - freertos.org http : www.freertos.org .. . Answer : You can check out the LGPL Clibc http : www.uclibc.org which is supposed to be close to glibc but much more suited to embedded systems . It also has a page http : www.uclibc.org other libs.html referencing other open-source C libraries including newlib http : sources.redhat.com newlib and eCos http : ecos.sourceware.org which may be more suited for non-Linux environments . Comment : Does uClibc support anything else than linux Comment : Nope . See my comment on the original question .",
"Question : I am looking for a small libc for embedded use with freertos on a ARM7 microcontroller . I have looked at newlib but it is a bit too complex for my needs . Newlib calls malloc in a number of functions e.g . printf which is not good for small embedded realtime systems . Does anyone know of a small portable open-source libc implementation that will fit my application Comment : What OS kernel are you using That s key to determining what your choices are . Comment : I m using freertos - freertos.org http : www.freertos.org .. . Answer : If you use newlib and do not implement the sbrk syscall then any function you use that requires malloc will generate a linker-error which will prevent you from inadvertently using a call that requires dynamic memory . So I would suggest that you do that and then simply avoid those functions that cause the linker-error . You can modify or override any library functions you do not wish to use .",
"Question : I am looking for a small libc for embedded use with freertos on a ARM7 microcontroller . I have looked at newlib but it is a bit too complex for my needs . Newlib calls malloc in a number of functions e.g . printf which is not good for small embedded realtime systems . Does anyone know of a small portable open-source libc implementation that will fit my application Comment : What OS kernel are you using That s key to determining what your choices are . Comment : I m using freertos - freertos.org http : www.freertos.org .. . Answer : I had similar needs and found that klibc http : en.wikipedia.org wiki Klibc fit it quite well . The only downside for commercial use is the GPL license . I have hacked a minimal version of it here https : svn.kapsi.fi jpa paatti baselibc . This is even more limited PDCLib and suitable if you just need a few basic functions such as printf and strtok . Compiles to just 4kB with all functions included .",
"Question : null .. . Answer : i am attempting to integrate freeRTOS to my application that run on AT32UC3A0512 . I downloaded a freeRTOS project example for EVK1100 http : www.atmel.com tools EVK1100.aspx it Supports the AT32UC3A and try to include the kernel source file so my application hierarchy looks like : .. . .. . this hierarchy is different than the the hierarchy provided in the freeRTOS project example which looks like .. . .. . 1 - This has caused compilation problems path of some file not recognized that i have solved and i don t think that it can lead to other issues . what do you think now it seems also that i have problems with exception.s .. . .. . As you see the file is redefined i came to this solution http : www.avrfreaks.net forum solved-multiple-definition-evba-compile-error that consist in removing exception.s under intc folder now the project compiles but there is calls to twi master read in my application that cause blocking i haven t changed anything in my application which use to work normally i didn t call any freeRTOS api function yet .. . .. . 2- could you please help me undrestand the the purpose of exception.s and what leaded to this unexpected behaviour 3- Could this problem come from the non respect of the hierarchy Don t hesitate to comment on my choices or suggest better practices on importing freeRTOS kernel Thanks in advance . EDIT .. . .. . I removed exception.s from freertos-7.0.0 source portable gcc avr32 uc3 exception.S and keep the exception.s file of my starting application Now using the application hierarchy mentioned above if i exclude freertos directory from the project all works well if i include the freertos directory twi master read causes problems There is any pins redefinitions in the kernel files and i didn t call include freeRTOS API at all so how the behaviour changes this way",
"Question : Recently I wrote a C-Application for a Microblaze and I used uC OS-II . uC OS-II offers memory pools to allocate and deallocate blocks of memory with fixed size . I m now writing a C-Application for an STM32 where I use this time FreeRTOS . It seems like FreeRTOS doesn t offer the same mechanism or did I miss something I think the five heap implementations are not what I am looking for . If there are actually no memory pools is there any specific reason why .. . Answer : The original version of FreeRTOS used memory pools . However it was found that users struggled to dimension the pools which led to a constant stream of support requests . Also as the original versions of FreeRTOS were intended for very RAM constrained systems it was found that the RAM wasted by the use of oversized pools was not acceptable . It was therefore decided to move memory allocation to the portable layer on the understanding that no one scheme is suitable for more than a subset of applications and allowing users to provide their own scheme . As you mention there are five example implementations provided http : www.freertos.org a00111.html which cover nearly all applications but if you absolutely must use a memory-pool implementation then you can easily add this by providing your own pvPortMalloc and vPortFree implementations memory pools being one of the easier ones to implement . Also note that in FreeRTOS V9 http : www.freertos.org FreeRTOS-V9.html you need not have any memory allocation scheme as everything can be statically allocated . Comment : One of the five example implementations of the heap may be suitable for allocating RAM for the OS tasks queues .. . what may also be the case for my application . But if I want to store some kind of messages basically a byte array which are all of the same size In this case I have to implement thread safe memory pools which I think is not very difficult as I cannot use pvPortMalloc or vPortFree as I use maybe heap 1",
"Question : I would like to run the latest version of FreeRTOS on Teensy 3.2 using Atmel Studio Visual Micro . Is there a procedural guide on how to configure FreeRTOS source code Thanks .. . Answer : I theory it is possible to run FreeRTOS http : www.freertos.org on the Teensy 3.2 https : www.pjrc.com store teensy32.html since it features an ARM Cortex-M4 MK20DX256 s PDF manual https : www.pjrc.com teensy K20P64M72SF1RM.pdf . - There are at least two challenges I see to the question you have asked : .. . .. . There are no officially supported ports http : www.freertos.org RTOS ports.html of FreeRTOS http : www.freertos.org for the processor that is installed on the Teensy 3.2 https : www.pjrc.com store teensy32.html . Atmel Studio http : www.atmel.com microsite atmel-studio default.aspx cannot be used since the Teensy 3.2 https : www.pjrc.com store teensy32.html uses a Freescale chip not an Atmel chip like the Teensy 2.0 https : www.pjrc.com store teensy.html . Atmel Studio http : www.atmel.com microsite atmel-studio default.aspx only supports Atmel products . If you d like to continue with your efforts to port FreeRTOS to the MK20 you ll want to check out the FreeRTOS Porting Guide http : www.freertos.org FreeRTOS-porting-guide.html . An easier approach might be to secure an alternative low-cost development board to develop code for FreeRTOS http : www.freertos.org on . Consider researching purchasing one of the FreeRTOS Education Kits http : shop.freertos.org FreeRTOS Evaluation Kits s 1514.htm . They provide a good platform for learning how to develop for the RTOS and in the case of the FreeRTOS NXP LPCXpresso LPC1769 Education Kit http : shop.freertos.org FreeRTOS NXP LPC1769 LPCXpresso Evaluation Kit p lpc1769 education kit.htm they even point you to a free IDE you can download from NXP . Comment : How can I port FreeRTOS to that processor Comment : @KhalidAlshamkhany I just edited my answer to reference the FreeRTOS Porting Guide freertos.org FreeRTOS-porting-guide.html http : www.freertos.org FreeRTOS-porting-guide.html",
"Question : I am looking for a small libc for embedded use with freertos on a ARM7 microcontroller . I have looked at newlib but it is a bit too complex for my needs . Newlib calls malloc in a number of functions e.g . printf which is not good for small embedded realtime systems . Does anyone know of a small portable open-source libc implementation that will fit my application Comment : What OS kernel are you using That s key to determining what your choices are . Comment : I m using freertos - freertos.org http : www.freertos.org .. . Answer : PDCLib http : pdclib.rootdirectory.de might fit your needs . It s still incomplete http : pdclib.rootdirectory.de trac.fcgi roadmap broken link though and probably in need of a lot more real-world testing . Its author goes by DevSolar http : stackoverflow.com users 60281 devsolar here on SO . update 2012-11-01 : As of 2012-08-14 development has been taken over by Owen Shepherd complete with a new homepage http : pdclib.e43.eu and bitbucket repository http : hg.pdclib.e43.eu pdclib broken link use this one https : bitbucket.org pdclib pdclib . update 2015-10-31 : The dedicated website seems to be dead but the code can still be found on bitbucket https : bitbucket.org pdclib pdclib . The last commit to that repository happened 2014-11-24 . update 2016-07-12 : The website is back up and DevSolar started committing again on 2016-03-01 . Comment : The page seems to point to pdclib.e43.eu http : pdclib.e43.eu for current development . It s full of dead links and doesn t seem to say anything about possible OS HW requirements support . Comment : @XTL : there exist platform overlays http : hg.pdclib.e43.eu pdclib src default platform for posix and win32 and one of the goals of the project was to be easily portable see the post mortem written by the original author : he developed it as a service to the hobby OS community no idea how this works out in practice.. .",
"Question : I am currently in the process of developing the OS for a consumer electronics product my company is developing . I have settled on freeRTOS as the backbone for our OS and am working diligently to implement hardware functionality within the OS . However I have run into an issue concerning running 3rd-party applications from within freeRTOS . Originally I considered a task to be an application where basically you had myapplication.c and myapplication.h containing all your applications necessary functions and the code would reside within the for-loop within the task acting as a main while-loop . Then when the user decides to run that application a function pointer is passed to a queue that my app launcher task then uses to create the new task using the 3rd-party task or application . The problem with this approach however is the OS will already be compiled and reside on the microcontroller and applications with be installed and deleted as the user sees fit.. . So obviously applications need to be compiled and executable from the OS . On a standard unix machine I would use something like fork to select the executable and give it it s own process . However I cannot find a similar functionality within freeRTOS. . My other idea is approaching a scripting-language for app development but again I m not sure on how to launch those applications.. . So the question is how do I get freeRTOS to run applications from 3rd party developers that aren t already baked into the OS Comment : How is this related to Lua Comment : I should have fully explained that . Lua is one of the scripting languages I am looking at to address this problem . Thank you for bringing my lack of explanation to my attention . .. . Answer : FreeRTOS and most RTOSes for that matter do not work like general purpose operating systems GPOS they are not generally designed to dynamically load and execute arbitrary user supplied applications . In most case you use an RTOS because you require hard real-time response and the execution of third-party code could compromise that . Most RTOSes FreeRTOS included are no more that static-link libraries where your entire embedded application is statically linked with the RTOS and executes as a single multi-threaded program . Again many RTOSes like FreeRTOS are not operating systems in the same sense as a GPOS such as Linux . Typically the RTOS services available are the real-time scheduler inter-process communication IPC thread-synchronisation and timers . Middle-ware such as a file system and network stack for example are either optional extensions or must be integrated from third-party code . One problem you will have with FreeRTOS trying to achieve your aim is that a task is analogous to a thread rather than a process in the sense of a GPOS process model . A task typically operates in the same memory space as other tasks with no memory protection between tasks . Tasks are not separate programs but threads within a single application . If your target has no MMU then memory protection may be limited in any case but you may still want third-party applications to be conceptually independent from the OS . If your processor does not have an MMU then running arbitrary third-party dynamically loaded code may be a problem for system integrity safety and security . Even with an MMU a simple RTOS kernel such as FreeRTOS won t use it . Operating systems with real-time scheduling that can load and run application code dynamically as separate processes include : .. . .. . Windows Embedded Compact formerly Windows CE http : en.wikipedia.org wiki Windows CE .. . QNX Neutrino http : www.qnx.co.uk products neutrino-rtos neutrino-rtos.html .. . OS-9 http : www.microware.com .. . .. . Also VxWorks http : www.windriver.com products vxworks has the ability to load partially linked object code and dynamically link it to the already loaded code . This is not the same at a process model but is more akin to a dynamic-link library . What makes it worth mentioning in this context is that the VxWorks shell can invoke any function with external linkage by name . So you can load an object file implementing a function and then run that function . You could in principle implement the same functionality on FreeRTOS but it is non trivial . The shell is one thing but dynamic loading and linking requires the application symbol-table to be target resident . If you don t need hard real-time or your real-time requirements are soft and your target has sufficient resources you may be better served deploying Linux http : en.wikipedia.org wiki Linux on embedded systems or uClinux http : www.uclinux.org which are increasingly used in embedded systems . If the code your end-users need to run are tightly related to the purpose of your device rather than general purpose in nature then another possibility for allowing end-users to run code is to integrate a scripting-language interpreter such as Lua http : www.lua.org about.html . In this case you would simply load the script from a file system and pass it to the script interpreter . For more general purpose requirements a Java VM http : stackoverflow.com questions 10856437 embedded-java-vm-for-cortex-m3 10860479 10860479 may be a possibility . Comment : I am currently developing this on an ARM Cortex M4 so there is no MMU . We had to choose this processor due to the device needing to be as energy efficient as possible while still remaining responsive . Thank you for the links to OS alternatives I ll look into those now . Comment : We are looking for open-source or free for commercial use options . Excluding those from your list that leaves me with the linux options which also don t appear to be an option due to a lack of RAM. . I m looking into it more but it seems that I am stuck with an OS like freeRTOS to accomplish our needs . Comment : I ll give you the answer however I found an alternative solution using newlib . Thanks for the help Comment : @DevenJ : It is entirely legitimate to post an answer to your own question - you should perhaps do that because I am intrigued Newlib is merely a portable implementation of the standard-library so I am unclear how it has helped you solve this problem . Comment : Hey Deven can you suggest an answer for my problem stackoverflow.com questions 21931309 http : stackoverflow.com questions 21931309 freertos-and-two-wire-interface-driver-for-sam4l",
"Question : an application is running on uclinux which is installed on cortex-m3 but now i want to use freertos as Os instead of uclinux .. . .. . For e.g . I run a tcp server client application where client is on uclinux and server is on computer with linux installed it works well and vice versa also works .. . .. . In case of FreeRTOS I am using lwip as ip stack the application and freertos and lwip gets compiled and the hex file is generated and i can put it into cortex-m3 but when i run it there is no communication between server and client .. . .. . --- So are there any specific changes i need to make .. . .. . used arm-uclinuxeabi-gcc toolchain for uclinux used arm-none-eabi-gcc toolchain for freertos .. . Answer : That is a massively open question that can only possibly be answered by asking many questions back to you so I will instead just offer advise . First I would suggest cutting the problem down into manageable pieces . Start by ensuring you can execute FreeRTOS on your part there are lots of Cortex-M examples http : www.freertos.org RTOS ports.html and even TCP examples for Cortex-M http : www.freertos.org FreeRTOS-Plus FreeRTOS Plus TCP TCP FAT demo projects.html and an FAQ to look through if you have problems getting the RTOS running all available on the FreeRTOS.org web site . Second in a bare metal application without an RTOS or OS check the lwIP driver is able to send and receive on the Ethernet port . Third add the known working Ethernet driver into your known working FreeRTOS project and check the Ethernet driver is still working taking note of the FAQ items on the FreeRTOS website with regards to having stack-overflow checking on configASSERT defined etc . . Fourth stitch in the lwIP code noting the lwIP recommendations for using the stack in a multi-threaded application . Fifth etc . etc .",
"Question : null .. . Answer : I am doing a project where I am implementing asymmetric multiprocessing on FreeRTOS . Currently I planning on running FreeRTOS on GEM5 so I can test my code on it when I modify it . I see that GEM5 can run Linux and Android but I cannot figure out what modifications will I need so that I can run FreeRTOS on it . Are there any changes I need to do to the FreeRTOS code Or is it just a matter of writing a GEM5 config file Any help is appreciated . Thanks",
"Question : just starting with FreeRTOS and I am having problem with task so I thought it is the best time to start with learning debugging . Trying to use Trace library to assess situation I got stuck on compilation process . I am using CooCox IDE with ST-LinkV2 . Target device is STM32F103C8T6 . FreeRTOS is V8.2.2 . Tracealyzer Recorder Library is v2.7.7 . Error is : .. . .. . Any hints on that matter would be helpful tnx in advance . .. . Answer : This is a basic tools question not a FreeRTOS or FreeRTOS+Trace question although you can fix it by changing the FreeRTOS configuration and or FreeRTOS+Trace configuration . The error is telling you that you have tried to use more RAM than the part you are using actually has or at least the amount of RAM you have told the linker your part actually has . If you look at the map file for your application you will see which variables are consuming RAM . Probably the single largest will be the FreeRTOS heap . The FreeRTOS documentation http : www.freertos.org a00111.html tells you how to reduce that . Probably the second largest will be the trace buffer and the trace configuration header file contains lots of documentation that will tell you how to reduce that .",
"Question : null .. . Answer : A little question about the freeRTOS task scheduler : .. . .. . Is the task scheduler called inside the xQueueSend function or is it call at the next system tick Comment : I hate answering the same question in multiple places so will just post a link-to my previous answer sourceforge.net p freertos discussion 382005 thread f0cb1a73 https : sourceforge.net p freertos discussion 382005 thread f0cb1a73 which will also appear in the support forum archive http : www.freertos.org FreeRTOS Support Forum Archive freertos support forum archive index.html at the end of the week .",
"Question : When I start this program see below all is working fine . But when I disable return data back to TPCIP program working bad . Here is program working fine : 1 : http : s27.postimg.org seixg63hf problem 2.jpg .. . .. . And this function going here : s .. . .. . Complet communication is implement in task FreeRTOS : .. . .. . But when I can only reading from TCP and I do not want back data to TCPIP program working bad . : 2 : http : s21.postimg.org wlhqh31g5 problem 1.jpg .. . Answer : There is a very old example of how to use FreeRTOS with lwIP in the FreeRTOS Interactive site http : interactive.freertos.org entries 20290712-FreeRTOS-Win32-project-with-lwIP-web-server . Although a lot of the code included in this example has now been superseded the integration with lwIP should still be valid and make a reference for you . If you are using one of the processors listed on the FreeRTOS+TCP examples page http : www.freertos.org FreeRTOS-Plus FreeRTOS Plus TCP TCP FAT demo projects.html FreeRTOS+TCP being FreeRTOS s own TCP IP stack then that may provide a further reference .",
"Question : my goal is to run FreeRTOS from this site https : github.com jameswalmsley RaspberryPi-FreeRTOS.git on a Raspberry Pi . I have build it using arm-none-eabi-gcc on a Linux machine . Now I have this files folders : .. . .. . What are the next step to bring FreeRTOS to the Pi Thanks in advance . Alex .. . Answer : To get started take help from existing operating-system recommended for raspberry-pi like : raspbian . Where all the necessary things bootloader for booting a kernel is there . So install raspbian first then from SD card you ll find raspbian s own kernel.img rename it take backup and then copy the freertos s kernel.img into SD card then try booting . Hopefully this will work . Make sure the RaspberryPi version and freertos versions are okay . Comment : One remark to the actual version : The demo sources providing the BCM2835 . This means it will work on a Rasp 1 not on a Rasp 3 .",
"Question : null .. . Answer : I use CooCox CoIDE 1.7.4 in order to programm the STM32F051R8 microcontroler at windows-7 Home OS . I am a begginer at this kind of programming . My first target is to make some leds blink by using FreeRTOS . After spending many hours trying to do it I saw some tutorials and many links at web but i couldn t find something helpfull . The compiler was complaining all time presenting this : .. . .. . GCC HOME : C : CooCox CoIDE gcc GNU Tools ARM Embedded 4.7 2013q2 bin compile : mkdir Skipping C : CooCox CoIDE workspace test1 test1 Debug bin because it already exists . mkdir Skipping C : CooCox CoIDE workspace test1 test1 Debug obj because it already exists . BUILD FAILED Output filename conflict : port.o would be produced from C : CooCox CoIDE workspace test1 FreeRTOSV7.5.2 FreeRTOS Source portable Softune MB91460 port.c and port.c Total time : 1 second .. . .. . If someone can help I would kindly appreciate that . If someone need more info please reply . I don t know what i am doing wrong . Comment : Maybe the problem is that you have 2 port.c files in the project - first in the mentioned freertos dir second in project root . Try renaming one of them to port1.c Comment : Also if a project for STM32 is referencing a project for 16FX architecture on Softune a different compiler there may be further confusion about . Comment : it looks like you have 2 versions of port.c :",
"Question : I am looking for a small libc for embedded use with freertos on a ARM7 microcontroller . I have looked at newlib but it is a bit too complex for my needs . Newlib calls malloc in a number of functions e.g . printf which is not good for small embedded realtime systems . Does anyone know of a small portable open-source libc implementation that will fit my application Comment : What OS kernel are you using That s key to determining what your choices are . Comment : I m using freertos - freertos.org http : www.freertos.org .. . Answer : printf is not good for small embedded realtime systems Actually it is worse than malloc in many ways . Variable argument lists very complex formatting float number support when you don t need it etc etc . printf comes with an enormous overhead and the compiler will not be able to reduce it as every parameter passed to it is evaluated in runtime . printf is perhaps ok for hobbyists and beginners still learning C . But if you are a professional programmer you really ought to write your own serial monitor LCD routines . You will dramatically improve the program performance and flash consumption . Comment : Though technically not an answer I liked it . Comment : There is nothing wrong with using printf in embedded systems . There s something wrong with printf implementations that call malloc and do all sorts of useless things . A simple printf implementation without floating-point or that ignores exactness issues when printing floating-point and without POSIX i18n n argument specifiers can be implemented in about 2k of code and allows the calling application to be much smaller and simpler than if it had to duplicate printf -like functionality all over the place . Comment : There is nothing wrong with printf.. . -- ...can be implemented in about 2k of code . You obviously haven t worked with small microcontroller applications . 2k is huge . And if you can t even write a simple RS-232 serial monitor by yourself to replace printf you shouldn t be programming embedded systems in the first place . Comment : @Lundin : As Chris said there s a big range of embedded systems and often conditions like realtime bounded-time operations and failure-case-free are more important than extremely small memory size . I d be a lot happier with an embedded device that uses 1 MB of memory but always works because I know where allocations take place than a device that normally uses 128 kB and has 256 kB of physical memory but no strict bounds on usage and fails to do its job when an allocation fails . Comment : @R You want realtime and safety and therefore use stdio.h You are joking right",
"Question : I m working with FreeRTOS on an STM32 Cortex-M3 and using the CMSIS library from ST to bootstrap everything . The CMSIS library defines the weak-symbol SVC Handler in the startup .s file . It must be overridden somewhere in order to get your ISR in the interrupt vector table . FreeRTOS defines vPortSVCHandler which is the ISR I want to have handle the SVC interrupt . I would like to glue the two together using my application code i.e . w o modifyng FreeRTOS or the CMSIS source code . I thought an alias would be the right tool for the job so I tried this in a separate source file main.c : .. . .. . That results in : error : SVC Handler aliased to undefined symbol vPortSVCHandler .. . .. . Turns out according to GCC documentation here http : gcc.gnu.org onlinedocs gcc Function-Attributes.html in order to use the alias attribute you cannot alias a symbol outside of the translation-unit . So I thought I d try to extern the symbol into main.c like so : .. . .. . This generates the same error . Any suggestions I would really like to avoid modifying either of the libraries . I know I could write a function SVC Handler that simply calls vPortSVCHandler but that could add unnecessary overhead to the ISR possibly depending on optimization settings . Note : The FreeRTOS examples accomplish this via a custom startup file . I m looking for a way to do this from C or my linker script . Compiler Version : gcc version 4.5.2 Sourcery G++ Lite 2011.03-42 .. . Target : arm-none-eabi .. . Answer : I m pretty sure SVC handler is only used by FreeRTOS at initial startup so adding an indirection exception handler isn t going to hurt performance but its ugly . Best ask this on the FreeRTOS forum response there is usually great . Hope this helps Best Regards Dave Comment : I should add that I need to do this w the SysTick and PendSV handler as well . I might ask on FreeRTOS forums too but it s really more a question about the GCC toolchain than about FreeRTOS ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
real-time
|
UNK_RELATION
|
lemon-graph-library@data-structures@80
|
lemon-graph-library -- a c++ template library for efficient implementations of @placeholder for optimization of tasks connected via graphs .
|
{
"confidence": [
49.42592239379883,
48.038429260253906,
45.92206573486328,
45.4597053527832,
45.137298583984375,
44.731170654296875,
44.49541473388672,
44.09379577636719,
43.30466842651367,
43.10062789916992,
43.03517532348633,
42.78677749633789,
42.35205078125,
41.626243591308594,
40.70539474487305,
40.32118225097656,
38.817256927490234,
38.460243225097656,
38.326229095458984,
38.03160095214844,
38.012977600097656,
37.88890838623047,
37.72882080078125,
37.72882080078125,
37.72882080078125,
36.29339599609375,
35.654170989990234,
35.464378356933594,
35.1854248046875,
34.75183868408203,
34.34988784790039,
34.18996810913086,
34.14063262939453,
34.14063262939453,
34.14063262939453,
34.072227478027344,
34.072227478027344,
33.92936706542969,
33.9015998840332,
33.1441764831543,
32.761085510253906,
32.761085510253906,
32.75038146972656,
32.695762634277344,
32.625083923339844,
32.625083923339844,
32.32022476196289,
32.21220397949219,
32.10190963745117,
32.10190963745117,
31.99127197265625,
31.99127197265625,
31.876190185546875,
31.876190185546875,
31.79309844970703,
31.676406860351562,
31.57827377319336,
31.5106201171875,
31.312807083129883,
31.282665252685547,
31.282665252685547,
31.282665252685547,
31.270172119140625,
30.681503295898438,
30.63351058959961,
30.46568489074707,
30.22726058959961,
30.104419708251953,
29.971784591674805,
29.837465286254883,
29.837465286254883,
29.583419799804688,
29.583419799804688,
29.456649780273438,
29.453163146972656,
29.225311279296875,
29.225311279296875,
29.162195205688477,
28.994274139404297,
28.972225189208984,
28.5897216796875,
28.5897216796875,
28.549610137939453,
28.436973571777344,
28.138662338256836,
28.114063262939453,
28.05003547668457,
28.041152954101562,
28.041152954101562,
28.041152954101562,
27.917797088623047,
27.78264617919922,
27.316423416137695,
27.316423416137695,
27.316423416137695,
27.316423416137695,
27.30895233154297,
27.19220542907715,
27.123470306396484,
27.123470306396484
],
"content": [
"First I installed the Lemon Graph C++ Library LGL .",
"I am an absolute newbie with C++ and Lemon and I have the following problem with lemon-graph-library .",
"Is there a possibility to create a lemon graph using a loop in C++",
"So I try to use Lemon Graph Library in order to generate my graph and the Dijkstra s algorithm .",
"So I installed the Lemon Graph Library as recommended in the official page .",
"I am trying to design a network Random Graph in omnet++ where I want to parse the network nodes using Lemon Graph Library .",
"So I eventually found Lemon Graph Library http : lemon.cs.elte.hu trac lemon .",
"I am looking for a way to merge multiple Graphs into a single Graph using LEMON https : lemon.cs.elte.hu trac lemon .",
"Are you using this library http : lemon.cs.elte.hu trac lemon wiki Documentation",
"I m not connected to lemon either I use boost : : graph almost exclusively .",
"Basically I am trying to extract the topology of given network and then feed this information to the Lemon Library Graph .",
"But I had the problem that the Lemon Graph C++ code call the headers in this way for example : .. . .. . So it means at least I believe this that I can not avoid the installation of the Lemon Graph Library .",
"So when i build the code I get the following errors : .. . .. . Why doesn t the Omnet++ code get compatible with Lemon graph Library",
"I have installed the library and it works fine if I try to compile any normal c++ file with nodes and edges in any graph using command-line g++ -o file file.cpp cc -lemon .",
"I m using Lemon Graph Library https : lemon.cs.elte.hu trac lemon and I want to add an item to a lemon map without copying it or asigning .",
"If I want to make a R package of the Lemon Graph Library I have to rewrite all the code again",
"Well-known and widely-used implementations such as the Boost Graph Library http : www.boost.org doc libs 1 56 0 libs graph doc table of contents.html and Lemon http : lemon.cs.elte.hu trac lemon are designed such that the contiguous integer indices of nodes and edges are not exposed to the user via the interface .",
"I am new in the library Lemon i created a digraph and i want to count the number of arcs between each node of the arc i dont find a function in Lemon library who do this then i have the idea to use this two functions : .. . .. . and .. . .. . But i think it will not work .",
"Currently I try to incorporate lemon library in our project .",
"When building an opensource project with CMake in my case it was the lemon-graph-library I got this error when I tried to build shared libaries via -DBUILD SHARED LIBS 1 : .. . .. . Where does this error come from and how do I fix it",
"Then using the Rcpp and inline packages I manage myself to run Lemon Graph C++ code from R . Here http : deliriosderayohauno.blogspot.com 2011 02 lemon-graph-library-lgl-instalation.html I write in detail what I had made .",
"I am trying to extract a graph of network from omnet++ and feed the information of nodes and links to the Lemon graph .",
"Here is an example of graph initialization from Lemon Tutorial : .. . .. . Can the same be accomplished by using a container with arc data",
"Problem is that I don t know how to pass the numbers in the configurations as Node Ids for the graph G12 in Lemon .",
"Lemon is equipped with a MaxWeightedPerfectMatching algorithm which as the name suggests computes a maximum weight perfect matching in a graph .",
"If I make a C++ function say double func1 g that for example calculates some property to some Lemon graph object .",
"I was trying to install Lemon on Ubuntu 14.04 .",
"How do I get the links information and feed it to Lemon graph and what is wrong in the approach I used in the code",
"These are the compilation errors : .. . .. . And my spherical.cpp includes : .. . .. . I think Lemon math library conflicts with cmath at some point.. . Any ideas how to solve it",
"LemonMaxWeightPerfectMatching.h .. . .. . ifndef LemonMaxWeightPerfectMatching H .. . .. . define LemonMaxWeightPerfectMatching H .. . .. . include .. . .. . include .. . .. . include .. . .. . include .. . .. . include .. . .. . using lemon : : INVALID .. . .. . typedef lemon : : ListGraph Graph typedef Graph : : Edge Edge typedef Graph : : Node Node typedef Graph : : EdgeMap WeightMap typedef Graph : : EdgeIt EdgeIt .. . .. . class LemonMaxWeightPerfectMatching public : const char solverName Graph graph std : : vector nodes std : : vector edges WeightMap weights lemon : : MaxWeightedPerfectMatching maxWeightedPerfectMatching int n int matching .. . .. . LemonMaxWeightPerfectMatching const char solverName virtual LemonMaxWeightPerfectMatching void buildGraph int nrVertices void addEdge int edgeSource int edgeTarget void removeEdge int edgeSource int edgeTarget void setEdgeWeight int edgeSource int edgeTarget double edgeWeight void findMaxWeightPerfectMatching double getMatchingWeight double getMatchingDualValue void printEdgesInMatching .. . .. . .. . .. . endif LemonMaxWeightPerfectMatching H .. . .. . 3 .",
"Is it possible to use a loop for each entry within the t nodes table to add a node to a graph .. . .. . So far I just found implementations where they add each node manually see example below .. . Is there really no opportunity to use a loop to add nodes to a lemon graph",
"LEMON uses slightly different terminology than most graph-theory texts but in my opinion that makes using the library a bit easier .",
"@user2079303 Yes this is an option but I would prefer using Lemon API .",
"it could be usefull for lemon developers to have a new test case to fix against .",
"I m using Lemon 1.3.1 which is currently the latest version .",
"@Dirk Eddelbuettel : I will look how to build a package in R . But if I build a package it will depend on Lemon Graph Library then if some one want to install it using install.package it will not work .",
"I read points frome a file I use the library Lemon because i want to use graph later therefore each point is represented by the type : dim2 : : Point .",
"Vertex 3 is not connected to any of the other vertices so per definition the graph does not contain a perfect matching .",
"For assigning shared-ptr to a Graph type variable in lemon-graph-library i did this : .. . .. . It worked fine but now i need to declare a shared-ptr for a map object Normally the map object works like this : .. . .. . That is name requires a Graph object for its default constructor .",
"EDIT : since so few people seem to know how Boost Graph actually works if you can provide a solution using the LEMON Graph Library that s fine too .",
"I think you mean RUNTIME instead of LIBRARY .",
"It s not a library problem rather than a CMAKE POLICY problem .",
"It s a standalone app which you can convert your gml files into Lemon Graph Format .",
"I don t know the LEMON library but if ListGraph : : EdgeMap allows you to specify an allocator then you have to use our aligned allocator http : eigen.tuxfamily.org dox-devel group TopicStlContainers.html .",
"Edited lemon 1.3.1",
"I am not a maintainer of lemon",
"Would something pre-packaged like pinard.progiciels-bpi.ca libR library graph doc index.html http : pinard.progiciels-bpi.ca libR library graph doc index.html work for you",
"Basically consider that we have two graphs to be merged .",
"I m using Lemon version 1.3.1 .. . .. . Here s the test code I ve no idea why the formatting is so messed up",
"I am writing a generic function to export a lemon : : concept : : Digraph to a dot file .",
"I can track changes in the graph and update my map using lemon graph observers .",
"I can t speak for Lemon graph but for boost-graph I think the main goal is to be generic .",
"The documentation of LEMON is so sparse I could not find info on this .",
"You have to include the lemon dim2.h header file and a ListDigraph : : NodeMap .",
"Does lemon is fully compatible with clang",
"Have a look at the developed example script very trivial .. . .. . .. . .. . Lemon C++-Code example reference : http : lemon.cs.elte.hu pub tutorial a00022.html :",
"A call to the cmake INSTALL command had an ARCHIVE parameter but no LIBRARY parameter .",
"From the Lemon tutorial .. . .. . Never used this library mind I m just quoting what I ve read .",
"If it can not be done I d also be interested in solutions using Boost Graph Library http : www.boost.org doc libs 1 59 0 libs graph doc index.html .",
"I have a question regarding some of the parameters necessary to run Dijkstra s algorithm from the Lemon Graph Libraries Lemon s Dijkstra s http : lemon.cs.elte.hu pub tutorial a00009.html .",
".. . .. . After having some free time over the weekend and spending some time on my bike I found the solution : .. . .. . My Solution : .. . .. . It seems that lemon did not offer the possibility to support additional information to the edges within the graph .",
"I tried out the code by parsing through node list and checking for its remote node if any and adding it to the Lemon Graph using g.addarc u v but still its ineffective .",
"Is there a library",
"I m using the LEMON library https : lemon.cs.elte.hu trac lemon in a project of mine and I have a doubt about how to best use it to evaluate a complete distance-matrix between vertices in a given set .",
"I also look at the Boost Graph Library and I read about it that it is difficult to learn .",
"can you show a code that reproduce the problem maybe minimal graph instead of full graph",
"I m trying to migrate from a proprietary graph library to an Open Source one .",
"The graph-nodes are colored and the colors are given as an array .",
"I have a lot of topologies in GML format and want to process them with Lemon http : lemon.cs.elte.hu trac lemon but it doesn t support GML files .",
"I see in the Lemon Tutorial : .. . .. . My question is : How can I add coordinates in a Node",
"Apparently this issue is mentioned as fixed in lemon-1.3.1 but I am using the same and seems like it still persist .",
"The functions source edge and target edge are only defined for directed graphs and hence arcs .",
"For undirected graphs as in the example you need to use u edge and v edge resp .",
"Assuming lemon doesn t have such function and assuming the id doesn t change maybe you can maintain your own vector to which you can push new nodes",
"I got this.. . Another reason this happens is when you create a shared library .. . .. . add library NAME SHARED sources .. . .. . then when Cmake reaches the install command on Windows platform it complains of these error solution is to use RUNTIME instead of LIBRARY like",
"This equality doesn t hold if the graph does NOT contain a perfect matching .",
"This example before running the function with a specific graph implementation compiles normally .",
"which lemon release development version did you use",
"It s a double dispatch https : en.wikipedia.org wiki Double dispatch related problem .. . .. . The code in http : lemon.cs.elte.hu hg lemon file 9fd86ec2cb81 lemon path.h l443 .. . .. . relies on this user-defined cast-operator http : en.cppreference.com w cpp language cast operator of the iterator on the right hand side .. . .. . http : lemon.cs.elte.hu hg lemon file 9fd86ec2cb81 lemon bits path dump.h l139 .. . .. . but the left hand type of the assigment expression .. . .. . http : lemon.cs.elte.hu hg lemon file 9fd86ec2cb81 lemon list graph.h l89 .. . .. . doesn t have a custom assignment-operator but a single-argument custom ctor that clang tries to match against conversions of the right side .",
"A directed-graph : e.g .",
"one http : lemon.cs.elte.hu pipermail lemon-user 2011-January 000324.html and two http : lemon.cs.elte.hu pub doc 1.1.1 a00087.html a58fc0895a271a1aa712f66aaf3425b12",
"I am trying to build Lemon on my VM running ubuntu having gcc and g++ 4.9.2 but it keeps on giving the following error .",
"I take a look at the igraph C library and I found it a little messy to work with .",
"I am new in the library Lemon i want to create a graph the graph is created inside a for-loop and when i create a node i connect it to the previous node i create an Arc my problem is when the for-loop start i dont know with what i will connect the first node i have the idea to use INVALID and after erase to first arc but it dosent work .",
"Graph example : .. . .. . I need a method that takes 2 nodes A and C for example and returns the ID of the Edge that connects these 2 nodes if it exists .",
"So I still don t know how to insert lemon map to a lemon map this way .",
": .. . .. . 1 . test.cpp .. . .. . include LemonMaxWeightPerfectMatching.h .. . .. . include .. . .. . using namespace std .. . .. . Compile with : g++ -I opt lemon include -I opt lemon lib .cpp -o test .. . .. . int main LemonMaxWeightPerfectMatching solver new LemonMaxWeightPerfectMatching noName solver- buildGraph 4 solver- addEdge 0 1 solver- addEdge 1 2 .. . .. . solver- setEdgeWeight 0 1 3 solver- setEdgeWeight 1 2 4 .. . .. . Solve and print solution solver- findMaxWeightPerfectMatching cout Found matching with weight : getMatchingWeight dual value : solver- getMatchingDualValue endl cout Edges in matching : endl solver- printEdgesInMatching .. . .. . delete solver return 0 .. . .. . 2 .",
"It can be done with nodeFromId member function see Graph Class Reference http : lemon.cs.elte.hu pub doc 1.2.3 a00152.html :",
"So this new graph G12 should have 6 vertices 1 to 6 and 4 edges mentioned above .",
"Attached is some code which constructs a graph consisting of 4 vertices : 0 1 2 3 and 2 edges : 0 1 1 2 .",
"You are using a library that is not well known and even if people here are trying to help you it is really hard especially without the code or even worse with a code which is not the actual code.. .",
"Does a workaround exist without modifying the library",
"For example : .. . .. . EDIT .. . .. . I just found that it can be done for StaticDigraph see below : .. . .. . Can StaticDigraph be easily transformed to modifiable type of graph",
"When I build a graph g with this code : .. . .. . its nodes will have indexes 0..6 which I tested by calling g.id on them .",
"What would be a proper way to check whether the graph contained a perfect matching before I query the details of the matching such as weight and edges",
"Most likely I feel that complying doesn t mean that it also inherits the actual concept in that case how can I use a concept graph as an argument",
"NB : I have already tried the alternative way of writing a template function and it works .",
"I have a structure with a fixed-size Eigen object as member that I want to use as an edge map with Lemon : .. . .. . The code compiles fine but I get a run-time error : .. . .. . How should I solve this problem",
"I just downloaded the LGL from its home page from here http : lemon.cs.elte.hu trac lemon .",
"gcc 5 .. . clang 3.7 .. . lemon 1.3.1 .. . .. . Questions : .. . .. . Did I forget to clang a flag"
]
}
|
{
"confidence": [
56.05126953125,
55.84770202636719,
55.093788146972656,
52.457149505615234,
52.26481628417969,
51.601070404052734,
51.133506774902344,
51.097572326660156,
49.94902038574219,
49.66664123535156,
49.62633514404297,
49.06696319580078,
48.458648681640625,
48.164581298828125,
47.04002380371094,
46.515869140625,
46.16019058227539,
46.01542282104492,
45.82279968261719,
45.7430419921875
],
"content": [
"Question : I think that this answer is a bit complex because it involves several things . I want to do high performance computations with R particularly with graphs networks . As a R package igraph is very nice . But R is slow so I want to code the computationally expensive routines in C++ maybe in C . I take a look at the igraph C library and I found it a little messy to work with . I also look at the Boost Graph Library and I read about it that it is difficult to learn . So I eventually found Lemon Graph Library http : lemon.cs.elte.hu trac lemon . It is in C++ and seems very nice to work with . So I installed the Lemon Graph Library as recommended in the official page . Then using the Rcpp and inline packages I manage myself to run Lemon Graph C++ code from R . Here http : deliriosderayohauno.blogspot.com 2011 02 lemon-graph-library-lgl-instalation.html I write in detail what I had made . But basically I put this : .. . .. . in a myexample inline.R file and then run a R console and write : .. . .. . So it works But now I have the following problem . If I make a C++ function say double func1 g that for example calculates some property to some Lemon graph object . How I call that function from the inlined code I must made func1 as a template function and put it in the include field of cxxfunction Basically : I can t figure out how to call a C++ function inlined in R from another C++ function also inlined in R . Is it possible Is there another way that do not uses inline code Maybe I can do it using Rcpp modules but I couldn t still figure out how to do this . I m having problems with making modules work . I will keep trying with this but maybe I can get some kind of hint from here . I also thought about the possibility to develop my first a package . But I had the problem that the Lemon Graph C++ code call the headers in this way for example : .. . .. . So it means at least I believe this that I can not avoid the installation of the Lemon Graph Library . If I want to make a R package of the Lemon Graph Library I have to rewrite all the code again So this is not my main option . Best Regards Comment : Would something pre-packaged like pinard.progiciels-bpi.ca libR library graph doc index.html http : pinard.progiciels-bpi.ca libR library graph doc index.html work for you Comment : You may want to swap one of your five tags for r . .. . Answer : I have managed to success to this problem . Here http : deliriosderayohauno.blogspot.com 2011 02 r-learning-building-r-packages-that 468.html you can find a detailed explanation about what I have done . Maybe it is trivial to most of the people here but it may be a good starting point for someone that is in the same position that I was . I will post a resume here of what I done . First I installed the Lemon Graph C++ Library LGL . I just downloaded the LGL from its home page from here http : lemon.cs.elte.hu trac lemon . Then I proceed : .. . .. . Then check if it works . So in a file named mycode.cc I put : .. . .. . Then I compile and run it : .. . .. . So it works . Now the idea is to integrate that code into R via Rcpp . So in some directory I open a R console and I do : .. . .. . So in this way I just created a new Rcpp based source package named pkgwithlgl . Now inside the pkgwithlgl directory which is the source of the package that I want to modify and install there is a directory named src . Inside it there are the files with the C++ code of the package . In particular there is one named rcpp hello world.cpp which contains : .. . .. . Now I modify it so it becomes : .. . .. . Then from the linux console in the container directory of the source package I write : .. . .. . which returns : .. . .. . So the package is installed the warnings has to do with the fact that I don t filled in the right way the .Rd file ie the files that contains the helps about the package . The I open a R console and write : .. . .. . so it works That is all . But hey What happens if I build this package and upload it into forexample CRAN I will not do it . If some one install this package from CRAN will it work for him Even if it does not install the LGL package Best Regards Comment : Sorry for my english . Best Regards Comment : In the example you showed there is still no way to use reference the graph object from R .",
"Question : I think that this answer is a bit complex because it involves several things . I want to do high performance computations with R particularly with graphs networks . As a R package igraph is very nice . But R is slow so I want to code the computationally expensive routines in C++ maybe in C . I take a look at the igraph C library and I found it a little messy to work with . I also look at the Boost Graph Library and I read about it that it is difficult to learn . So I eventually found Lemon Graph Library http : lemon.cs.elte.hu trac lemon . It is in C++ and seems very nice to work with . So I installed the Lemon Graph Library as recommended in the official page . Then using the Rcpp and inline packages I manage myself to run Lemon Graph C++ code from R . Here http : deliriosderayohauno.blogspot.com 2011 02 lemon-graph-library-lgl-instalation.html I write in detail what I had made . But basically I put this : .. . .. . in a myexample inline.R file and then run a R console and write : .. . .. . So it works But now I have the following problem . If I make a C++ function say double func1 g that for example calculates some property to some Lemon graph object . How I call that function from the inlined code I must made func1 as a template function and put it in the include field of cxxfunction Basically : I can t figure out how to call a C++ function inlined in R from another C++ function also inlined in R . Is it possible Is there another way that do not uses inline code Maybe I can do it using Rcpp modules but I couldn t still figure out how to do this . I m having problems with making modules work . I will keep trying with this but maybe I can get some kind of hint from here . I also thought about the possibility to develop my first a package . But I had the problem that the Lemon Graph C++ code call the headers in this way for example : .. . .. . So it means at least I believe this that I can not avoid the installation of the Lemon Graph Library . If I want to make a R package of the Lemon Graph Library I have to rewrite all the code again So this is not my main option . Best Regards Comment : Would something pre-packaged like pinard.progiciels-bpi.ca libR library graph doc index.html http : pinard.progiciels-bpi.ca libR library graph doc index.html work for you Comment : You may want to swap one of your five tags for r . .. . Answer : Howdy and thanks for your interest in Rcpp http : dirk.eddelbuettel.com code rcpp.html . To bind calls between different library functions you may want to look into building a package . There are now twenty packages using Rcpp as listed on the Rcpp page on CRAN http : cran r-project.org package Rcpp so you have examples to copy from . At a first appromixation . this is no different from writing a normal program and Rcpp simply helps you getting it to R . .. . .. . If you have more questions please feel free to bring them to the rcpp-devel list . Comment : @Jeremiah Willcock : I have to look more carefully what your answer . But in a first view it is not what I need because it is R code . I work with models that are computationally expensive I m a physicist . In other words I need to implement some functions in C++ maybe C . R is nice for everything else so I like very much to integrate C++ code in R . Thank for your response . @Dirk Eddelbuettel : I will look how to build a package in R . But if I build a package it will depend on Lemon Graph Library then if some one want to install it using install.package it will not work . I m right Comment : @J.I.Perotti : take a look at the manual Writing R Extensions cran.r-project.org doc manuals R-exts.pdf http : cran.r-project.org doc manuals R-exts.pdf They explain how you can work with dependencies and the likes . It asks a bit getting used to but in the end it s pretty straightforward . So in short : dependencies on other packages don t have to be a problem most packages are dependent on others one way or another . Comment : @Every-one I m studying and working with examples in order to build packages that integrate C++ code via Rcpp but I will need time . I just want to say that takes in account your advices . Best Regards .",
"Question : null .. . Answer : I am looking for a way to merge multiple Graphs into a single Graph using LEMON https : lemon.cs.elte.hu trac lemon . If it can not be done I d also be interested in solutions using Boost Graph Library http : www.boost.org doc libs 1 59 0 libs graph doc index.html . The background is that I want to define smaller structural units as graphs annotate them with properties and add multiple copies of them together to create more complex structures . In the example below I have 3 graphs g1 g2 . and g3 consisting of a single vertex . I want to combine them into a single graph and be able to add edges to connect the vertices inside the resulting graph . However I don t know how to specify the copyGraph function correctly so that all vertices of g1 g2 and g3 end up in the same graph at the end . Also if g1 etc . contained multiple connected vertices these edges should remain intact . The example also contains a fourth graph gTest which looks like the result I want to achieve . However gTest here is created from scratch and not by combining the previously exisiting graphs . This is for demonstration clarification and produces the following graphic : Output of the program http : i.stack.imgur.com bIN45.jpg .. . .. . To compile the code using g++ use .. . .. . g++ -lemon main.cpp Comment : I m not sure what your specific question is . It looks like you have accomplished your goal here . Comment : The shown result is only a demonstration of the result I want to achieve . For the demonstration I created the result from scratch . What I am looking for is a way to create the result by combining g1 g2 and g3 . The part that only exists as pseudo-code . I m fairly certain it can be done using some form of copy-operation but I can t figure out how to do it correctly",
"Question : Data structures for directed and undirected graphs are of fundamental importance . Well-known and widely-used implementations such as the Boost Graph Library http : www.boost.org doc libs 1 56 0 libs graph doc table of contents.html and Lemon http : lemon.cs.elte.hu trac lemon are designed such that the contiguous integer indices of nodes and edges are not exposed to the user via the interface . Instead the user identifies nodes and edges by small representative objects . One advantage is that these objects are updated automatically when the indices of nodes and edges change due to the removal of edges or nodes from the graph . In my opinion this advantage is overrated . Users will typically store the representative objects of nodes and or edges in a container e.g . an std : : vector . Now if nodes or edges are removed from the graph and their representative objects become invalid the user needs to either ignore this or rearrange the vector so as to keep valid integer indices contiguous i.e . do exactly the bookkeeping that the design was supposed to make unnecessary . Hence my question is : Does the design choice of hiding the contiguous integer indices of nodes and edges from the user have other advantages Comment : Interesting question but this may only apply to boost-graph using vecS . Boost allows graphs to be created using a variety of different containers . Not all of them requiring contiguous int indexes . The cases you mention adding and removing nodes or edges are poorly suited to the vector container . Comment : I understand that the Boost Graph Library allows us to store adjacency lists in containers that do not offer constant-time random-access but constant-time insertion and deletion of elements . This in turn allows us to insert and delete edges in logarithmic time in the degree of the graph provided that the containers are kept sorted . Constraining ourselves to containers with constant-time random-access renders the time-complexity for the insertion and deletion of edges linear in the degree of the graph . However in practice the absolute runtime can be kept small by using e.g . memmove . .. . Answer : I m at home in the Java world but hope that it is OK to give an answer that is not focussed on the particular libraries in question .. . .. . There are several possible advantages of such an abstraction . One of the most important ones was already mentioned in the question : The consistency when performing modifications in a graph is much harder to accomplish when indices have to be maintained . The reason why this may be hard lies in the different possible graph representations : It may be easy to maintain consistent indices if the internal representation only and always consisted of random-access lists of Vertex and Edge objects . But for other representations determining an index may be difficult . This directly related to the second main advantage : One is free to use different implementations of the graph interface . The section Graph Data Structures in the Review of Elementary Graph Theory http : www.boost.org doc libs 1 36 0 libs graph doc graph-theory review.html of the boost documentation lists several data-structures that are already offered by the BGL and everybody may add his own implementation . The running times for certain operations are given in Big-O-notation and once can see that they vary greatly between the different data-structures . So one can easily imagine that different implementations are better suited for certain tasks . For example consider an algorithm frequently has to check whether a particular vertex is contained in a graph . For an indexed that is list -based vertex storage this would require O n for each test . With a set -based storage of the vertices this could be done in O 1 - but there simply are no sensible indices in this case . Additionally as mentioned in the Graph Concepts http : www.boost.org doc libs 1 56 0 libs graph doc graph concepts.html overview : .. . .. . In fact the BGL interface need not even be implemented using a data-structure as for some problems it is easier or more efficient to define a graph implicitly based on some functions . So suggesting that there is an indexed access even when the graph does not even exist in memory may hinder such a purely-functional implementation .",
"Question : I am looking at Lemon to handle my pathfinding since it has search and shortest paths algorithms among other things . The thing is I am already stuck right at the start in understanding how Lemon works and they have a tutorial but no forum to ask . My understanding of a directed-graph is that you have a node and it can link or not link-to another node and then you have a weight on it . Example : .. . .. . In this A is connected to B with a weight of 1 C is connected to nothing so once you get to C you are stuck and B connects to A with a value of 1 and B connects to C with a value of 5 . The tutorial says to do something like this : .. . .. . So now I have a graph g with the three nodes . Now what Where how do I add the connectivity information as well as the weight values .. . Answer : LEMON uses slightly different terminology than most graph-theory texts but in my opinion that makes using the library a bit easier . Firstly the difference between an edge and an arc in LEMON is simply that an edge is an undirected edge between two nodes and an arc is a directed edge . .. . .. . As for adding edges and weights and whatnot graphs themselves only manage nodes and edges arcs the only data associated with each is an integral identifier . You can find this identifier using : .. . .. . To attach pieces of data to the nodes edges you use maps . There are a few different types of maps but they generally boil down to a NodeMap EdgeMap or ArcMap - and as you probably guessed they are associative maps of Node V Edge V and Arc V respectively where V is the value-type which can be anything that has a default constructor . .. . .. . To add edges in an undirected graph or arcs in a digraph you simply create the two nodes and then use .addEdge n1 n2 or .addArc n1 n2 . For example : .. . .. . And to associate a some value with that arc :",
"Question : When building an opensource project with CMake in my case it was the lemon-graph-library I got this error when I tried to build shared libaries via -DBUILD SHARED LIBS 1 : .. . .. . Where does this error come from and how do I fix it .. . Answer : I got this error because the project had a CMakeLists.txt file that needed fixing . A call to the cmake INSTALL command had an ARCHIVE parameter but no LIBRARY parameter . In my case I wanted the libraries placed in lib so changing this : .. . .. . to this : .. . .. . fixed my problem .",
"Question : When building an opensource project with CMake in my case it was the lemon-graph-library I got this error when I tried to build shared libaries via -DBUILD SHARED LIBS 1 : .. . .. . Where does this error come from and how do I fix it .. . Answer : I got this.. . Another reason this happens is when you create a shared library .. . .. . add library NAME SHARED sources .. . .. . then when Cmake reaches the install command on Windows platform it complains of these error solution is to use RUNTIME instead of LIBRARY like Comment : I think you mean RUNTIME instead of LIBRARY . Comment : right corrected .",
"Question : I am trying to design a network Random Graph in omnet++ where I want to parse the network nodes using Lemon Graph Library . I have installed the library and it works fine if I try to compile any normal c++ file with nodes and edges in any graph using command-line g++ -o file file.cpp cc -lemon . But when i tried it with one of my omnet++ project which has nothing in it now the code is as below .. . .. . the include headers are in angle brackets not to be confused with double quotes . So when i build the code I get the following errors : .. . .. . Why doesn t the Omnet++ code get compatible with Lemon graph Library Comment : stackoverflow.com questions 19912682 http : stackoverflow.com questions 19912682 c-error-no-matching-function-for-call-to .. . Answer : OMNeT++ includes a macro definition for ev in cEnvir.h https : omnetpp.org doc omnetpp api group Envir.html which is included from omnetpp.h .. . .. . Because you include omnetpp.h before graph extender.h this macro is expanded in the library s header file which conflicts with its use as a variable name in .. . .. . A simple solution would be to include graph extender.h before omnetpp.h so the macro is not yet defined when graph extender.h is read . If this is not possible you might have some luck with manually undefining the macro before and possibly restoring the definition after as follows . Comment : Thank you very much it worked",
"Question : I have a map with many polygons . I want to do a pathfinding with the center of these polygones . So I try to use Lemon Graph Library in order to generate my graph and the Dijkstra s algorithm . I see in the Lemon Tutorial : .. . .. . My question is : How can I add coordinates in a Node Like : .. . Answer : You have to include the lemon dim2.h header file and a ListDigraph : : NodeMap . For example to assign coordinate values to your nodes you would do this :",
"Question : Data structures for directed and undirected graphs are of fundamental importance . Well-known and widely-used implementations such as the Boost Graph Library http : www.boost.org doc libs 1 56 0 libs graph doc table of contents.html and Lemon http : lemon.cs.elte.hu trac lemon are designed such that the contiguous integer indices of nodes and edges are not exposed to the user via the interface . Instead the user identifies nodes and edges by small representative objects . One advantage is that these objects are updated automatically when the indices of nodes and edges change due to the removal of edges or nodes from the graph . In my opinion this advantage is overrated . Users will typically store the representative objects of nodes and or edges in a container e.g . an std : : vector . Now if nodes or edges are removed from the graph and their representative objects become invalid the user needs to either ignore this or rearrange the vector so as to keep valid integer indices contiguous i.e . do exactly the bookkeeping that the design was supposed to make unnecessary . Hence my question is : Does the design choice of hiding the contiguous integer indices of nodes and edges from the user have other advantages Comment : Interesting question but this may only apply to boost-graph using vecS . Boost allows graphs to be created using a variety of different containers . Not all of them requiring contiguous int indexes . The cases you mention adding and removing nodes or edges are poorly suited to the vector container . Comment : I understand that the Boost Graph Library allows us to store adjacency lists in containers that do not offer constant-time random-access but constant-time insertion and deletion of elements . This in turn allows us to insert and delete edges in logarithmic time in the degree of the graph provided that the containers are kept sorted . Constraining ourselves to containers with constant-time random-access renders the time-complexity for the insertion and deletion of edges linear in the degree of the graph . However in practice the absolute runtime can be kept small by using e.g . memmove . .. . Answer : I can t speak for Lemon graph but for boost-graph I think the main goal is to be generic . So abstracting away the vertex edge access helps to achieve that goal . It is stated in the documentation that boost-graph is based on Dietmar K hl s Masters Thesis on generic graph algorithms . See my answer to Do property maps remain necessary for BGL http : stackoverflow.com questions 23540786 do-property-maps-remain-necessary-for-bgl 23677823 23677823 . So the main goal behind the library is to be generic and extensible . The choice of encapsulating access is part of abstracting the algorithms from the graph representation . To me continuous integer indices are an implementation detail . Boost doesn t make any assumptions on how you will use the graph or what performance trade offs are important to you . It lets you choose or implement the container that will best fit your needs . If you want to break this encapsulation you are free to do so . In fact my most common use of boost-graph involves vecS containers and a vector of struct s . I usually work with graphs where the size is fixed . I could just as easily use a map of vertex descriptor s or edge descriptor s to objects to achieve the same goal . So in summary I would say that this not so much a design choice but rather a consequence of achieving the broader goal of being generic . So the hiding of access has the benefit of being more generic .",
"Question : null .. . Answer : Basically consider that we have two graphs to be merged . The graph-nodes are colored and the colors are given as an array . For eg : G1 has a color config conf1 - 1 2 3 1 G2 has a color config conf2 - 4 5 6 5 What I wish to do is for each i draw an edge between conf1 i and conf2 i . So iteratively we add edges between 1 4 2 5 3 6 and 1 5 . So this new graph G12 should have 6 vertices 1 to 6 and 4 edges mentioned above . Problem is that I don t know how to pass the numbers in the configurations as Node Ids for the graph G12 in Lemon .",
"Question : I am looking at Lemon to handle my pathfinding since it has search and shortest paths algorithms among other things . The thing is I am already stuck right at the start in understanding how Lemon works and they have a tutorial but no forum to ask . My understanding of a directed-graph is that you have a node and it can link or not link-to another node and then you have a weight on it . Example : .. . .. . In this A is connected to B with a weight of 1 C is connected to nothing so once you get to C you are stuck and B connects to A with a value of 1 and B connects to C with a value of 5 . The tutorial says to do something like this : .. . .. . So now I have a graph g with the three nodes . Now what Where how do I add the connectivity information as well as the weight values .. . Answer : From the Lemon tutorial .. . .. . Never used this library mind I m just quoting what I ve read . Comment : yeah I read this. . and in my question I have the code you have written. . but how dose this answer my question Comment : Your first was question how do i add the connectivity info . It s there in my answer the last three lines its not in the code you quoted . Comment : I also do not know this library . However you asked how to add connectivity information to the graph . It looks like that this method addArc does just that -- except that there is no weight . Comment : oh I thought this was some kind of curved line.. . so this is saying X connected to Y and Y to Z and Z to X.. . So in my example. . it would be g.addArc a b b a b c . . is that correct But istill see no infomation on weights Comment : Seems for weight you must use a data structure called an ArcMap . But as I say no experience with this library .",
"Question : Is there a possibility to create a lemon graph using a loop in C++ My Problem : .. . .. . 1 . A database-table let s call it t nodes with column : node .. . 2 . A database-table let s call it t edges with graph information : node1 node2 edgeScore .. . 3 . More than 10000 entries .. . .. . My desired outcome : .. . .. . 1 . A directed-graph : e.g . N1 - N2 N2 - N3 N3 - N1 .. . .. . My Question .. . .. . 1 . Is it possible to use a loop for each entry within the t nodes table to add a node to a graph .. . .. . So far I just found implementations where they add each node manually see example below .. . Is there really no opportunity to use a loop to add nodes to a lemon graph 2 . How can I use a loop for all the relations mentioned in t edges Thanks for your time and any help is greatly appreciated .. . .. . After having some free time over the weekend and spending some time on my bike I found the solution : .. . .. . My Solution : .. . .. . It seems that lemon did not offer the possibility to support additional information to the edges within the graph . Therefore I just created a additional vector for storing this information . However for some purposes it may be more wise to use a hashmap for accessing the nodes . Have a look at the developed example script very trivial .. . .. . .. . .. . Lemon C++-Code example reference : http : lemon.cs.elte.hu pub tutorial a00022.html : .. . Answer : Of course you can execute AddNode and AddArc in a loop . Or in a recursive function . Or in any other way you want to . Did you try it Was there some error Comment : Thanks for you answer rici ...but how can I do that ...sorry maybe I just need a little implementation hint . How would you write the loop and especially add a Node within the loop",
"Question : null .. . Answer : I am writing a generic function to export a lemon : : concept : : Digraph to a dot file . In my code I am using a specific implementation SmartDigraph http : lemon.cs.elte.hu pub doc 1.2.3 a00337.html but I would like the function to accept the Digraph concept http : lemon.cs.elte.hu pub doc 1.2.3 a00106.html so that it may be used with other graphs as well . This example before running the function with a specific graph implementation compiles normally . However when I un-comment exportToDot g I get the following compilation error : .. . .. . I cannot clearly understand why this will not compile since SmartDigraph complies to concept : : Digraph . Most likely I feel that complying doesn t mean that it also inherits the actual concept in that case how can I use a concept graph as an argument NB : I have already tried the alternative way of writing a template function and it works . Nevertheless I would like to also know how I could implement such a function using concepts .",
"Question : I am an absolute newbie with C++ and Lemon and I have the following problem with lemon-graph-library . I would like to create a function that gets a map as an input variable . Something like this : .. . .. . But when I try to build it I get the following error : .. . .. . Does it mean that it is not possible to create a function with a map-type argument Thanks for any kind of help .. . Answer : You have to pass it by reference :",
"Question : Currently I try to incorporate lemon library in our project . Most developers are on Windows they compile with MSVC but I am in charge for this part to compile with gcc and clang . I came across an error with clang that gcc does not reproduce and I managed to reduce the code : .. . .. . With gcc no errors . But with clang : .. . .. . Notes : .. . .. . SRC ROOT BIN ROOT TMP ROOT are replaced for readability .. . the snippet source code won t work but should compile I will correct the real big code .. . I really need the c++11 features for the real source code . gcc 5 .. . clang 3.7 .. . lemon 1.3.1 .. . .. . Questions : .. . .. . Did I forget to clang a flag Does lemon is fully compatible with clang How to solve this error Comment : which lemon release development version did you use Comment : Edited lemon 1.3.1 Comment : Thanks that error can be effortlessly reproduced with clang++-3.5 which widens the audience a little . It s about the old problem of trying to assign ReverseIterators To ForwardIterators the forward it block just above in lemon path.h compiles without warning . Comment : No it s not at least the unspecialized RevIt has a cast operator Arc . Comment : What is weird i tried to compile without -std c++11 neither -stdlib libc++ and it works without warnings with modifying original code not to use initializer lists . .. . Answer : It s a double dispatch https : en.wikipedia.org wiki Double dispatch related problem .. . .. . The code in http : lemon.cs.elte.hu hg lemon file 9fd86ec2cb81 lemon path.h l443 .. . .. . relies on this user-defined cast-operator http : en.cppreference.com w cpp language cast operator of the iterator on the right hand side .. . .. . http : lemon.cs.elte.hu hg lemon file 9fd86ec2cb81 lemon bits path dump.h l139 .. . .. . but the left hand type of the assigment expression .. . .. . http : lemon.cs.elte.hu hg lemon file 9fd86ec2cb81 lemon list graph.h l89 .. . .. . doesn t have a custom assignment-operator but a single-argument custom ctor that clang tries to match against conversions of the right side . And fails . Patching the right side of above shown lemon path.h line 443 with an simple explicit cast operator invocation .. . .. . makes the code at least compile with clang 3.5 . The lemon-developers must decide whether this is desired behavior a bug report should be filed for this . Comment : Wow thanks for taking that time . Links were useful to understand the mechanisms in-place . But I don t understand why gcc and msvc are ok with that but not clang . Does a workaround exist without modifying the library I am not a maintainer of lemon Comment : Yw . I m not connected to lemon either I use boost : : graph almost exclusively . In fact I leaned about lemon s mere existence from your post . About the whys and what-abouts - I suggest you formulate another question with a minimal core language no lemon or any external libs example that reproduces that difference between those compiler s behavior and tag that with c++11 g++ clang++ conversion-operator and language-lawyer . I haven t found any duplicate amazingly enough although I would not rule out that one exists but this may be important for the g++ or clang++ teams . Comment : that long comment was directed @Isammoc . Comment : @Isammoc I tracked that issue down a little and posted a related question here stackoverflow.com questions 33673158 http : stackoverflow.com questions 33673158 assignment-fails-to-use-a-cast-op-to-const-unrelated-type-with-clang-but-sucee Comment : I tried to reproduce too : goo.gl dQ7EFa http : goo.gl dQ7EFa",
"Question : I am trying to extract a graph of network from omnet++ and feed the information of nodes and links to the Lemon graph . The part of the problem is easy to deal with . Using the code : .. . .. . Somehow I am getting the list of nodes and now I am trying to get the link information as well . That is nodes and the links between them as well . How do I get the links information and feed it to Lemon graph and what is wrong in the approach I used in the code Comment : what is the questions here Comment : How do I extract link information and feed it to an empty graph ListGraph g with the corresponding nodes Basically I am trying to extract the topology of given network and then feed this information to the Lemon Library Graph . .. . Answer : The method extractByNedTypeName needs the fully qualified NED type name i.e . including the package . In INET the StandardHost is usually in package inet.node.inet therefore you should write : .. . .. . EDIT .. . The loop for ListDigraph : : NodeIt n g n INVALID ++n is never executed because graph g has been just created and it is empty . The outer loop should be something like : .. . for int j 0 j numOutLinks j++ . EDIT2 .. . Because of lack of find for NodeMap one has to write own function for example : .. . .. . An example of using it : Comment : Oh yes you are right Comment : But at the same time I want the links to be extracted as well . I tried out the code by parsing through node list and checking for its remote node if any and adding it to the Lemon Graph using g.addarc u v but still its ineffective . Some hints would be good . Comment : Could you explain what do you mean writing ineffective Are there compile-time or run-time errors Does extractByNedTypeName method recognize all nodes you expected Which type of network do you use - wired or wireless Comment : Yes I think it is the best way . Comment : I do not see other possibility than add own method for searching in NodeMap . I have extended my answer with an example of this function .",
"Question : null .. . Answer : Lemon is equipped with a MaxWeightedPerfectMatching algorithm which as the name suggests computes a maximum weight perfect matching in a graph . How do I check whether a maximum weight perfect matching exists in the first place Attached is some code which constructs a graph consisting of 4 vertices : 0 1 2 3 and 2 edges : 0 1 1 2 . Vertex 3 is not connected to any of the other vertices so per definition the graph does not contain a perfect matching . When I run the code I get the following output : .. . .. . Found matching with weight : 0 dual value : 0 Edges in matching : 13177072 0 valid : 0 .. . .. . This result obviously doesn t make sense . What would be a proper way to check whether the graph contained a perfect matching before I query the details of the matching such as weight and edges I m using Lemon version 1.3.1 .. . .. . Here s the test code I ve no idea why the formatting is so messed up : .. . .. . 1 . test.cpp .. . .. . include LemonMaxWeightPerfectMatching.h .. . .. . include .. . .. . using namespace std .. . .. . Compile with : g++ -I opt lemon include -I opt lemon lib .cpp -o test .. . .. . int main LemonMaxWeightPerfectMatching solver new LemonMaxWeightPerfectMatching noName solver- buildGraph 4 solver- addEdge 0 1 solver- addEdge 1 2 .. . .. . solver- setEdgeWeight 0 1 3 solver- setEdgeWeight 1 2 4 .. . .. . Solve and print solution solver- findMaxWeightPerfectMatching cout Found matching with weight : getMatchingWeight dual value : solver- getMatchingDualValue endl cout Edges in matching : endl solver- printEdgesInMatching .. . .. . delete solver return 0 .. . .. . 2 . LemonMaxWeightPerfectMatching.h .. . .. . ifndef LemonMaxWeightPerfectMatching H .. . .. . define LemonMaxWeightPerfectMatching H .. . .. . include .. . .. . include .. . .. . include .. . .. . include .. . .. . include .. . .. . using lemon : : INVALID .. . .. . typedef lemon : : ListGraph Graph typedef Graph : : Edge Edge typedef Graph : : Node Node typedef Graph : : EdgeMap WeightMap typedef Graph : : EdgeIt EdgeIt .. . .. . class LemonMaxWeightPerfectMatching public : const char solverName Graph graph std : : vector nodes std : : vector edges WeightMap weights lemon : : MaxWeightedPerfectMatching maxWeightedPerfectMatching int n int matching .. . .. . LemonMaxWeightPerfectMatching const char solverName virtual LemonMaxWeightPerfectMatching void buildGraph int nrVertices void addEdge int edgeSource int edgeTarget void removeEdge int edgeSource int edgeTarget void setEdgeWeight int edgeSource int edgeTarget double edgeWeight void findMaxWeightPerfectMatching double getMatchingWeight double getMatchingDualValue void printEdgesInMatching .. . .. . .. . .. . endif LemonMaxWeightPerfectMatching H .. . .. . 3 . LemonMaxWeightPerfectMatching.cpp .. . .. . include LemonMaxWeightPerfectMatching.h .. . .. . include .. . .. . LemonMaxWeightPerfectMatching : : LemonMaxWeightPerfectMatching const char solverName : solverName solverName weights graph maxWeightedPerfectMatching graph weights .. . .. . LemonMaxWeightPerfectMatching : : LemonMaxWeightPerfectMatching for int i 0 i n ++i delete matching i delete matching .. . .. . .. . .. . Creates an empty graph consisting of nrVertices vertices .. . void LemonMaxWeightPerfectMatching : : buildGraph int nrVertices n nrVertices edges.resize n matching new int n for int i 0 i n ++i edges i .resize n Node node graph.addNode nodes.push back node matching i new int 2 .. . .. . .. . .. . Adds an edge to the graph void LemonMaxWeightPerfectMatching : : addEdge int edgeSource int edgeTarget Edge edge graph.addEdge nodes.at edgeSource nodes.at edgeTarget edges edgeSource edgeTarget edges edgeTarget edgeSource edge .. . .. . .. . .. . Removes an edge from the graph void LemonMaxWeightPerfectMatching : : removeEdge int edgeSource int edgeTarget Edge edge edges edgeSource edgeTarget graph.erase edge .. . .. . .. . .. . Sets the weight of an edge void LemonMaxWeightPerfectMatching : : setEdgeWeight int edgeSource int edgeTarget double edgeWeight Edge edge edges edgeSource edgeTarget weights edge edgeWeight .. . .. . .. . .. . Runs the matching algorithm void LemonMaxWeightPerfectMatching : : findMaxWeightPerfectMatching maxWeightedPerfectMatching.run .. . .. . .. . .. . Gets the weight of the perfect matching . Returns -1 if no perfect matching could be found . double LemonMaxWeightPerfectMatching : : getMatchingWeight double matchingWeight double maxWeightedPerfectMatching.matchingWeight .. . .. . if std : : abs matchingWeight maxWeightedPerfectMatching.dualScale - maxWeightedPerfectMatching.dualValue 0.0000001 Check optimality . This equality doesn t hold if the graph does NOT contain a perfect matching . return matchingWeight else Return -1 if no perfect matching could be found . return -1 .. . .. . .. . .. . Returns dual value .. . double LemonMaxWeightPerfectMatching : : getMatchingDualValue return maxWeightedPerfectMatching.dualValue .. . .. . .. . .. . Prints the perfect matching void LemonMaxWeightPerfectMatching : : printEdgesInMatching std : : set edgesInMatching for int i 0 i n ++i Edge edge maxWeightedPerfectMatching.matching nodes i edgesInMatching.insert edge .. . .. . for std : : set : : iterator it edgesInMatching.begin it edgesInMatching.end ++it std : : cout graph.id graph.u it graph.id graph.v it valid : graph.valid it std : : endl",
"Question : null .. . Answer : I am new in the library Lemon i created a digraph and i want to count the number of arcs between each node of the arc i dont find a function in Lemon library who do this then i have the idea to use this two functions : .. . .. . and .. . .. . But i think it will not work .",
"Question : I have a lot of topologies in GML format and want to process them with Lemon http : lemon.cs.elte.hu trac lemon but it doesn t support GML files . Is there a library .. . Answer : I just found a solution called GML2LGF converter . It s a standalone app which you can convert your gml files into Lemon Graph Format . http : csikor.tmit.bme.hu GML2LGF .. . .. . Cheers . Comment : Thanks exactly what I was looking for"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
data-structures
|
UNK_RELATION
|
triplestore@http@138
|
triplestore -- a triplestore is a purpose-built database for the storage and retrieval of resource description framework rdf metadata -- @placeholder : en.wikipedia.org wiki triplestore .
|
{
"confidence": [
100.6417007446289,
59.10190200805664,
54.47583770751953,
54.450531005859375,
54.450531005859375,
53.4323616027832,
53.4323616027832,
53.40705871582031,
49.429107666015625,
48.38563537597656,
47.13500213623047,
47.13500213623047,
45.73613357543945,
44.48550033569336,
44.20410919189453,
42.64031219482422,
42.631202697753906,
42.631202697753906,
42.631202697753906,
41.58772659301758,
40.94422149658203,
39.9129524230957,
38.470733642578125,
38.470733642578125,
37.481689453125,
33.810855865478516,
33.810855865478516,
33.21665954589844,
32.76737976074219,
32.76737976074219,
32.226287841796875,
28.75164222717285,
27.708168029785156,
27.612974166870117,
27.367351531982422,
27.186420440673828,
26.946548461914062,
26.048076629638672,
25.609874725341797,
24.63727569580078,
23.519763946533203,
23.14851188659668,
22.828149795532227,
22.532438278198242,
22.45779800415039,
22.305980682373047,
22.17380142211914,
22.084062576293945,
22.032285690307617,
21.931236267089844,
21.799345016479492,
21.779376983642578,
21.6950626373291,
21.632667541503906,
21.56011390686035,
21.56011390686035,
21.56011390686035,
21.530895233154297,
21.42829704284668,
21.41124725341797,
21.378032684326172,
21.02825927734375,
20.957393646240234,
20.887760162353516,
20.887760162353516,
20.887760162353516,
20.731338500976562,
20.659011840820312,
20.4874210357666,
20.309480667114258,
20.309480667114258,
20.309480667114258,
20.120437622070312,
20.011871337890625,
19.984783172607422,
19.984783172607422,
19.984783172607422,
19.984783172607422,
19.984783172607422,
19.984783172607422,
19.87969207763672,
19.805126190185547,
19.805126190185547,
19.805126190185547,
19.805126190185547,
19.805126190185547,
19.805126190185547,
19.805126190185547,
19.805126190185547,
19.789955139160156,
19.730480194091797,
19.730480194091797,
19.637126922607422,
19.577932357788086,
19.415903091430664,
19.236787796020508,
19.236787796020508,
19.236787796020508
],
"content": [
"There is also a pretty good list of triple stores here : en.wikipedia.org wiki Triplestore http : en.wikipedia.org wiki Triplestore",
"So is it possible to create one for triplestore database",
"Assuming your Triplestore is populated with the correct statements then try -",
"How do I store null values in a triplestore database",
"You can convert an arbitrary sql database to a triplestore on this basis .",
"I think this depends a bit on the triplestore that you are using .",
"I have a Sesame triplestore with an ontology imported in it .",
"We would like to migrate our project on a triplestore database such as OpenRDF Sesame .",
"In my triplestore there should be no case where something linked is used by another point .",
"I send queries to a Sesame triplestore and render the results on a webpage .",
"I had sesame triplestore installed on my computer and it was working fine .",
"I am trying to access FactForge from Sesame triplestore .",
"Now for educational purposes I want to substitute the relational db with a pure triplestore database but I m not sure about the procedure to follow .",
"Which I guess means that I should be using either a triplestore or a graph database such as Neo4j",
"Additionally should a triplestore be allowed to store twice the same triple within the same context",
"As OWL files are RDF any RDF triplestore will do for storing them - though not every triple store will support OWL reasoning but then again you might not even need that .",
"I have a question about the deletion of elements from a triplestore in my case a Virtuoso using SPARQL .",
"I m new to Jena and triplestore when I deployed my application in tomcat 7 I m getting the following exception .",
"Alternatively how would you keep track of revision while using a context-aware triplestore",
"But what types of use cases would lead one to choose a triplestore over a property graph",
"However when I try to imagine this going on in a triplestore database I can t figure out how this would be happening without ending up with very fragmented storage of the data .",
"I can t give you a full list of features for either tool but I reckon that an important difference for your use-case given what little you ve told us is that wile 4Store is an RDF database implementation or triplestore Sesame is a framework API for handling RDF in Java giving access to multiple triplestore implementations including some of its own but also many third-party products .",
"Also I highly recommend looking at D2RQ http : d2rq.org which accesses data in your existing relational store through a triplestore overlay .",
"Have a look at this page http : answers.semanticweb.com questions 397 what-are-specific-triplestore-strengths-and-weaknesses for an overview of some of the strengths and weaknesses of the various offerings .",
"I already used the search and all results tell me that it s not possible to import Freebase into any triplestore without usage of 3rd Party Tools like BaseKB http : basekb.com or Freebase to RDF https : github.com castagna freebase2rdf .. . .. . As I can see the dump is already available as RDF so where is the problem if I want to import the dump into my 4store triplestore and access the data via SPARQL",
"I am trying to add triples in triplestore 4store with .. . .. . but I am getting this error .. . .. . I searched and found it is related to ipv6 problem but could not find proper solution for the same",
"So which triplestore API you pick depends on your requirements in terms of things like ease of use scalability reasoning support required and just generally which one you think looks cool .",
"If you re not worried about reasoning then you can drop it into any triplestore out there access it via Sesame http : openrdf.org or Jena http : jena.sourceforge.com if you re using Java and still be able to query the explicit facts via SPARQL http : www.w3.org TR rdf-sparql-query .",
"To fetch all the triples of a named graph in my triplestore openlink virtuoso I have wrote the SPARQL query : .. . .. . But it seems I can t define the graph URI in the GRAPH declaration the query doesn t return any triples .",
"If I try to access the triplestore from another computer say computer B using computer A s IP address I get this error : .. . .. . How can I resolve this issue",
"RDF Resource Description Framework is a conceptual data model which can be rendered physically serialized using various formats such N3 Turtle RDF XML etc .",
"It s somewhat more complex than that but it s described in this whitepaper : http : 4store.org publications harris-ssws09.pdf .. . .. . There s a number of indexes 2 are tables of 4 elements indexed by a Patricia Trie the quadstore part one is an index from graph IDs to lists of triples the triplestore part .",
"So to speed up the query you can filter some of the triples based on the named graph : .. . .. . I have found that this approach speeds up the query although as I mentioned before it is triplestore dependent as I have only played with a number of triplestores .",
"Considering the below conceptual triples : .. . .. . .. . Elephant is a pachyderm .. . Eagle is a bird .. . Monkey is a mammel .. . .. . .. . ...and the following conceptual inferences : .. . .. . .. . pachyderm is a animal .. . bird is a animal .. . mammel is a animal .. . .. . .. . From what I can guess in order to identify each of Elephant Eagle and Monkey as animal s then we have to run the triplestore through a Reasoner https : en.wikipedia.org wiki Semantic reasoner .",
"fyi people sometimes refer to a database that is implementing the property graph model as a property graph which is different than a triplestore containing RDF triples because in a triple store essentially all verbs are edges whereas the property graph has the distinction between attributes that identify an entity properties and attributes that identify a relationship between entities an edge .",
"RDF has no built-in concept of such kind .",
"The semantic-web is built using this concept RDF .",
"RDFS RDF Schema is a general-purpose language for representing simple RDF vocabularies on the Web .",
"RDF Store Benchmarking http : www.w3.org wiki RdfStoreBenchmarking",
"How Wikidata is represented in RDF and thus in SPARQL is described at MediaWiki.org page Wikibase Indexing RDF Dump Format https : www.mediawiki.org wiki Wikibase Indexing RDF Dump Format .",
"The way I m imagining it is as a cross between defragmenting a hard drive and performing a join in SQL to give : .. . .. . .. . Elephant is a pachyderm .. . Elephant is a animal .. . Eagle is a bird .. . Eagle is a animal .. . Monkey is a mammel .. . Monkey is a animal .. . .. . .. . If it s something along these lines then is a triplestore effectively some sort of massive normalised three field table that gets written out in full by the reasoner",
"RDF is a concept .. . .. . RDF is a concept or a way of describing things .",
"Using the W3C XML Validator http : validator.w3.org validate by input I get the following errors : .. . .. . Error Line 2 Column 8 : Namespace prefix rdf on RDF is not defined rdf : RDF .. . .. . Error Line 3 Column 19 : Namespace prefix rdf on Description is not defined .. . rdf : Description .. . .. . Error Line 4 Column 57 : Namespace prefix rdf on subject is not defined rdf : subject resource http : www.w3.org Home Lassila .. . .. . Error Line 5 Column 66 : Namespace prefix rdf on predicate is not defined .. . rdf : predicate resource http : description.org schema Creator .. . .. . Error Line 6 Column 14 : Namespace prefix rdf on object is not defined .. . rdf : object Ora Lassila rdf : object .. . .. . Error Line 7 Column 76 : Namespace prefix rdf on type is not defined .. . rdf : type resource http : www.w3.org 1999 02 22-rdf-syntax-ns Statement .. . .. . Error Line 8 Column 18 : Namespace prefix a on attributedTo is not defined .. . a : attributedTo Ralph Swick .. . .. . Similarly using the W3C RDF XML Validator http : www.w3.org RDF Validator I get the following error : .. . .. . FatalError : The prefix rdf for element rdf : RDF is not bound .",
"RDF can be divided into separate graphs of triples analogous to tables in a database .",
"RDF is a concept .",
"Does the related Modelling an equivalent of database NULL in RDF http : stackoverflow.com q 16873174 1281433 question help here",
"I ve been reading about semantic-web technologies such as RDF and OWL and am intrigued about the possibilities of building an RDF triple-store semantic database on top of my existing relational DBs .",
"Some popular open-source choices for RDF storage querying are OpenRDF Sesame Apache Jena OpenLink Virtuoso Redland 4store and dotNetRdf .",
"However most rdf stores are actually quad stores sets of rdf graphs also known as datasets and in that case the triple may appear multiple times .",
"RDF Repository http : i.stack.imgur.com 07fFv.png",
"In RDF you ll tend to identify things by URI in neo4j it s a database object that gets a database ID automatically .",
"Moreover Freebase allows you to export data in RDF so you could potentially use that data directly in an RDF database and query it with SPARQL .",
"Sesame is a quadstore framework which comes with a few built-in database types in-memory and native but of course numerous third-party Sesame-compatible RDF databases exist that each have their own performance characteristics .",
"RDF defines the abstract model of subject- predicate- object and advocates that non-proprietary standards are used for their exchange and description .",
"RDF and RDFS is not interchangeable .",
"RDF is also a NAME of a vocabulary .",
"RDF XML is hard to work with .",
"possible duplicate of import of rdf data in 4store http : stackoverflow.com questions 30658547 import-of-rdf-data-in-4store",
"See this guide to the bulk loader http : virtuoso.openlinksw.com dataspace doc dav wiki Main VirtBulkRDFLoader and this page of RDF loading methods http : virtuoso.openlinksw.com dataspace doc dav wiki Main VirtRDFInsert .",
"You can play around with the RDF Validator http : www.w3.org RDF Validator to see what RDF triples result from a piece of RDF XML .",
"RDF is a language for expressing factual claims organized and grouped into graphs .",
"Neo4j http : neo4j.org or RDF triple stores e.g .",
"RDF and triple stores are mostly built for the kinds of architectural challenges you d run into with the semantic-web .",
"This is not how RDF S ontologies work .",
"RDF RDFS and ontology are not interchangeable terms .",
"RDF is a way of modelling your data .",
"I resorted to using Pubby directly since the jena framework is fast enough to handle the rdf about 1.2 GB",
"A good news for freebase dump users is that Freebase now offer RDF dump now : http : wiki.freebase.com wiki Data dumps .",
"Note : Some RDF terms are defined using RDFS terms and some RDFS terms are defined using RDF terms .",
"Same situation with RDF .",
"SPARQL queries RDF triples .",
"So this is a snippet of the rdf file .",
"However there is a fundamental difference between RDF and neo4j maybe other non-RDF graphs too in that in RDF you have directed graphs .",
"It is in turtle format so it is very convenient to use any graph database designed for RDF .",
"The RDF dump has been improving over time .",
"Is there a problem with the turtle syntax of the Freebase RDF in common",
"RDF in general is a method of conceptual data modelling .",
"So in essence RDFS is a semantic extension of RDF .",
"RDF is a standard vocabulary that provides a set of terms .",
"OWL terms are defined using RDF and RDFS terms .",
"In RDF it would be something like this : .. . .. . In a graph database like neo4j it would be this : .. . .. . Notice that in RDF it s 3 relationships but only one of those relationships actually expresses semantics between two entities .",
"could you provide a small sample new1.rdf that shows this behavior",
"I am having a problem with my Virtuoso RDF Store .",
"What is the preferred method for mapping these into triples RDF in MarkLogic 8",
"But are you sure that s it s OWL XML and not RDF XML",
"Yeah the file was OWL XML but now I changed it to RDF XML .",
"Do you know the base concept of triples in RDF knowledge bases",
"I need to store RDF triples while keeping track of modifications .",
"Is that available in the RDF view of the data and if so how can it be queried using SPARQL",
".. . .. . Can Blazegraph store 4-column Quad data natively or am I mis-understanding the nature of RDF Triple Quad storage",
"that I can import ttl or rdf file then query0 .. . .. . but now I want to connect the remote neo4j .",
"An RDF triple store is a set of triples so the same triple cannot be present twice by definition .",
"Turtle is often preferred by the rdf community .",
"Metadata such as the original source of the triple possible strength of connection information etcetera .",
"I am asking this because I tried to insert a couple of duplicate RDF statements and I was expecting an increase in the count of rdf statements but there was no increase in count",
"You re making a classic mistake : confusing RDF which is what SPARQL queries with one of its serialisation namely RDF XML .",
"rdf : about and rdf : ID rdf : Description rdf : resource are part of RDF XML a way RDF is written down .",
"Note : If I load this rdf as a static rdf file directly onto Pubby it works fine ."
]
}
|
{
"confidence": [
108.17035675048828,
69.62847137451172,
69.25336456298828,
63.76195526123047,
62.847286224365234,
62.55082702636719,
62.3641357421875,
62.147274017333984,
59.708370208740234,
58.53816604614258,
58.53617477416992,
56.735267639160156,
56.32481384277344,
55.943695068359375,
55.49184799194336,
55.22138977050781,
54.6781005859375,
54.6781005859375,
52.56245803833008,
52.02167892456055
],
"content": [
"Question : I m new with triple stores and I need a good recommendation for an open-source triple store where I can store OWL files . Does someone have some recommendations for me Thank you a lot Bests M .. . Answer : As OWL files are RDF any RDF triplestore will do for storing them - though not every triple store will support OWL reasoning but then again you might not even need that . Some popular open-source choices for RDF storage querying are OpenRDF Sesame Apache Jena OpenLink Virtuoso Redland 4store and dotNetRdf . It s probably worth pointing out that several of these e.g . Sesame Jena dotNetRdf are storage-neutral APIs which means that several other open-source commercial triplestores can be accessed via them . So which triplestore API you pick depends on your requirements in terms of things like ease of use scalability reasoning support required and just generally which one you think looks cool . Have a look at this page http : answers.semanticweb.com questions 397 what-are-specific-triplestore-strengths-and-weaknesses for an overview of some of the strengths and weaknesses of the various offerings . Comment : I d also add that you have the option of using a dedicated OWL reasoner such as Pellet or HermiT . These won t provide persistent-storage and won t scale to the same level a database will but they ll probably give you the best performance for reasoning and are your only options if you need DL reasoning . There is also a pretty good list of triple stores here : en.wikipedia.org wiki Triplestore http : en.wikipedia.org wiki Triplestore",
"Question : null .. . Answer : I see that SPARQL and RDF are all about standards which is cool . But what types of use cases would lead one to choose a triplestore over a property graph Comment : what s a property graph as in Property Graph Model https : github.com tinkerpop blueprints wiki Property-Graph-Model Based on the definition at the end of that document I d say that they re about the same except that if your edges end up having lots of properties you ve essentially got reified triples or n-ary relations . Comment : yes thats exactly what I meant . fyi people sometimes refer to a database that is implementing the property graph model as a property graph which is different than a triplestore containing RDF triples because in a triple store essentially all verbs are edges whereas the property graph has the distinction between attributes that identify an entity properties and attributes that identify a relationship between entities an edge . property graph enthusiasts tout its strengths in network-analysis and all of the popular algorithms that go along with it . Comment : Interesting question but it seems to me that this is rather too broad not to mention likely to attract subjective opinionated answers for StackOverflow . Comment : fwiw property graphs are easily represented in RDF so you can use a triple store as the backend and use either model you want",
"Question : null .. . Answer : With a relational-database I can roughly visualise in my mind how the data on tables would be stored referenced and updated . However when I try to imagine this going on in a triplestore database I can t figure out how this would be happening without ending up with very fragmented storage of the data . Considering the below conceptual triples : .. . .. . .. . Elephant is a pachyderm .. . Eagle is a bird .. . Monkey is a mammel .. . .. . .. . ...and the following conceptual inferences : .. . .. . .. . pachyderm is a animal .. . bird is a animal .. . mammel is a animal .. . .. . .. . From what I can guess in order to identify each of Elephant Eagle and Monkey as animal s then we have to run the triplestore through a Reasoner https : en.wikipedia.org wiki Semantic reasoner . The way I m imagining it is as a cross between defragmenting a hard drive and performing a join in SQL to give : .. . .. . .. . Elephant is a pachyderm .. . Elephant is a animal .. . Eagle is a bird .. . Eagle is a animal .. . Monkey is a mammel .. . Monkey is a animal .. . .. . .. . If it s something along these lines then is a triplestore effectively some sort of massive normalised three field table that gets written out in full by the reasoner Comment : This is probably too broad for Stack Overflow . The short answer is yes a triple store s data is a massive three field table . Triple stores are typically going to efficiently index that in various ways to make query efficient . Reasoners might be built-in to a triple store or compatible with it but conceptually it s a distinct and optional thing . A triple store just needs to store triples . Comment : Oh isn t that an oversimplification . Granted some triplestores use a relational model under the hood but aren t there any that actually use a graph model Or something in between Comment : @TomaszPluskiewicz But conceptually what s the difference A graph of labelled edges is isomorphic to a set of triples source label destination . So yes a triple store is also a graph . But as far as the user is concerned the implementation doesn t really matter a triple store just has to be able to store triples . Comment : It s also important to note there s no reason that a reasoner needs to save the inferences ie materialize them they can all be computed on the fly at query time .",
"Question : I m currently planning a big project containing big data . I already used the search and all results tell me that it s not possible to import Freebase into any triplestore without usage of 3rd Party Tools like BaseKB http : basekb.com or Freebase to RDF https : github.com castagna freebase2rdf .. . .. . As I can see the dump is already available as RDF so where is the problem if I want to import the dump into my 4store triplestore and access the data via SPARQL Comment : Did you import the freebase data into triple store If yes how much time it took to complete the process and what is the machine configuration that you used . I am also planning to import the data . So please let me know the details . Thanks .. . Answer : For everybody having Problems importing the Freebase Dump : .. . .. . 1 Keep your RDF Turtle Parser updated . Latest Version of raptor 2 can recognize the . e.g . at ns : common.topic.notable for.example .. . .. . 2 The dump must be cleaned up before you can import it . I used this scipt : http : people.apache.org andy Freebase20121223 fixit .. . .. . 3 The Turtle specification only allows these characters for URIs : .. . .. . So it s very important to add this line to the fixit script at line 80 : .. . .. . As a result invalid syntax like this : .. . .. . becomes",
"Question : How do I store null values in a triplestore database Should I use no triples for null values or use something like rdf : nil If I use no triples how do I query then for non existing triples Comment : Does the related Modelling an equivalent of database NULL in RDF http : stackoverflow.com q 16873174 1281433 question help here There are several answers and I think that question is a bit more comprehensive . .. . Answer : You can use the FILTER NOT EXISTS syntax to check for non-existence .. . .. . For example assuming you know the subject and predicate and want to check for a null value i.e . non-existence of the relevant triple you could do the following :",
"Question : We have to work on a JPA-based project using Hibernate . For now it is running on the default H2 database with the default H2 dialect . We would like to migrate our project on a triplestore database such as OpenRDF Sesame . I was wondering if the best way is to find create a custom dialect for OpenRDF Possible Or if we have to stop using Hibernate I am quite new in Hibernate dialect but I saw some custom ones.. . So is it possible to create one for triplestore database Comment : FWIW we are currently investigating the possibility of a Sesame implementation for Hibernate OGM . Early days though . .. . Answer : You might try using Empire https : github.com mhgrove Empire which is an implementation of JPA for RDF SPARQL as opposed to RDBMS SQL . Empire is API agnostic so you can easily use any Sesame or Jena API compatible database with it which requires only changes to configuration . It should be pretty straightforward to implement support for other providers . It doesn t cover all of JPA there s some mismatch between parts which is currently omitted but the basics are covered . There are a few RDF specific annotations you d need to include to make an existing Hibernate implementation work but it should be an easy transition . I ve done a migration via Empire from an RDBMS to Sesame in the past including a step where I was persisting to both and it went quite well . disclaimer I m the author of Empire Comment : Nice project I didn t know it . I just had a meeting for this project and we won t store the whole data on Sesame . Is it possible to have a JPA project with 2 JPA data providers Comment : I did just that using the Play framework Sesame and mysql which worked out fine Play made it quite easy for me to make that happen but ymmv",
"Question : I m currently planning a big project containing big data . I already used the search and all results tell me that it s not possible to import Freebase into any triplestore without usage of 3rd Party Tools like BaseKB http : basekb.com or Freebase to RDF https : github.com castagna freebase2rdf .. . .. . As I can see the dump is already available as RDF so where is the problem if I want to import the dump into my 4store triplestore and access the data via SPARQL Comment : Did you import the freebase data into triple store If yes how much time it took to complete the process and what is the machine configuration that you used . I am also planning to import the data . So please let me know the details . Thanks .. . Answer : The problem with freebase turtle dump is this they are not COMPLIANT with w3c turtle specification . 1 according to http : www.w3.org TR turtle sec-grammar character . can only appear at the end of the triple however freebase dump has lots of . before end of the triple . I read somewhere that is not allowed as well outside uri so they instead chose to use . latest raptor2 library can get around this . but not the older ones .. . .. . 2 I think the way emit blank node is also not valid for e.g . line 141567 ns : m.01000m1 ns : common.topic.notable for . Comment : 1 Update Raptor2",
"Question : null .. . Answer : I am trying to add triples in triplestore 4store with .. . .. . but I am getting this error .. . .. . I searched and found it is related to ipv6 problem but could not find proper solution for the same Comment : could you provide a small sample new1.rdf that shows this behavior Comment : apparently you should stop 4s-httpd before the import . https : groups.google.com forum topic 4store-support 1soAFzqNy-0 Comment : possible duplicate of import of rdf data in 4store http : stackoverflow.com questions 30658547 import-of-rdf-data-in-4store",
"Question : I m currently planning a big project containing big data . I already used the search and all results tell me that it s not possible to import Freebase into any triplestore without usage of 3rd Party Tools like BaseKB http : basekb.com or Freebase to RDF https : github.com castagna freebase2rdf .. . .. . As I can see the dump is already available as RDF so where is the problem if I want to import the dump into my 4store triplestore and access the data via SPARQL Comment : Did you import the freebase data into triple store If yes how much time it took to complete the process and what is the machine configuration that you used . I am also planning to import the data . So please let me know the details . Thanks .. . Answer : You are probably getting search results from at least two if not three different data sets : .. . .. . 1 . the old quad format dump .. . 2 . the early RDF dumps .. . 3 . perhaps the current RDF dump .. . .. . The format in 1 is what required conversion . The early RDF dumps 2 were syntactically invalid so wouldn t import to most tools . The RDF dump has been improving over time . I m not sure whether it s still true that it won t import at all without preprocessing but regardless it ll almost be more useful if you pre-process it to remove redundancy normalize to the format that works best for your application etc . Did you try importing the current dump What were your results Comment : Thanks for your fast answer . Today I ordered a root server installed 4store DL Freebase Dump and splitted it by 10.000.000 triples for each file . Now I m getting an error while importing : URI file : root freebase xaa : 8 raptor error - syntax-error . Is there a problem with the turtle syntax of the Freebase RDF in common Comment : The first line causes a syntax-error : ns : american football.football historical roster position.number ns : type.property.expected type ns : type.int . Comment : I fixed it.. . After updating Raptor2 it works right now with the help of this nice fix : people.apache.org andy Freebase20121223 http : people.apache.org andy Freebase20121223",
"Question : I need to store RDF triples while keeping track of modifications . Is there anything out there for this service Alternatively how would you keep track of revision while using a context-aware triplestore Edit : please note that I don t need only the changeset . I also need to see the triples at any time in the past . .. . Answer : I tried to address this sort of thing by storing additional triples describing who said what when . But you need reification named graphs or quads which can ruin decidability .",
"Question : I need to store RDF triples while keeping track of modifications . Is there anything out there for this service Alternatively how would you keep track of revision while using a context-aware triplestore Edit : please note that I don t need only the changeset . I also need to see the triples at any time in the past . .. . Answer : Take a look at this Semantic Overflow question on the same subject - http : www.semanticoverflow.com questions 453 how-to-implement-semantic-data-versioning 462 462 - there s a variety of relevant links there .. . .. . Generally versioning in Triple stores relies on either using named graphs and storing meta-data about each named graph in a separate graph or the Triple Store having some in-built mechanism for versioning such as the Talis platform though that s not a context aware store so not suitable for you",
"Question : I m looking for a triple store to use with Java EE . I ended with 2 possibilities 4Store and Sesame but can t see the real difference between the two in term of features . I don t mind about performances details . Comment : Your question is likely to be closed as this kind of opinion-based question is considered off-topic for this site . I recommend that you try and determine what your requirements are then find out how each tool meets those requirements and then pick one . If you have more specific questions about either tool you might also try answers.semanticweb.com . Comment : Thx for your comment . I m asking what are the differences in term of features I don t think this is opinion-based that s facts . Comment : I don t dispute that but any answer you get is likely to be opinion-based in the sense that it will highlight a particular feature of one tool . Without knowing more about your use-case requirements it s not really possible to make a valid objective recommendation . Having said that I gave it a stab hope it s useful I ve tried to be as objective as possible . Comment : My use-case is quite simple : import RDF store in a triple store setup a SPARQL end point . .. . Answer : I can t give you a full list of features for either tool but I reckon that an important difference for your use-case given what little you ve told us is that wile 4Store is an RDF database implementation or triplestore Sesame is a framework API for handling RDF in Java giving access to multiple triplestore implementations including some of its own but also many third-party products . The possible advantage of this is that it allows you switching to a different database if you so require without major changes to your code . I would also imagine that Sesame s API being developed in and for Java is slightly more feature-rich and easy to use in a Java EE environment but this is merely an assumption as I am not sufficiently familiar with 4Store to make an actual comparison . disclosure : I am on the Sesame development team Comment : Thanks I see the main difference between the two system and can guess that for a simple use-case there isn t big differences .",
"Question : Can somebody please describe the steps neccessary to convert a SQLite Database to a triple store Is there a tool that can accomplish the task .. . Answer : This is a more complicated question then it seemed when I asked it but the simple answer is that you normalize your database completely . After it is completely normalized each table stands for a predicate one columns values represent the subject and one columns values represent the object . You can convert an arbitrary sql database to a triplestore on this basis .",
"Question : I m new to Jena and triplestore when I deployed my application in tomcat 7 I m getting the following exception . Appreciate your help thank you . Exception is .. . .. . And the code where it is failing is .. . .. . TDBFactory.createDataset datasetPath .. . Answer : You have probably been updating the dataset non-transactionally and not sync ed it . The database has become corrupted and you ll need to rebuild it . Using transactions will mean the database on disk is robust against server exit .",
"Question : if a triple store contains twice the same triple what is if any exist the authoritative position about this redundancy Additionally should a triplestore be allowed to store twice the same triple within the same context I ask this because in rdflib apparently you can store the same triple twice or more . This is the reader .. . .. . and this is the writer .. . .. . This is what I obtain .. . .. . To me it appears as a bug . A modified version shows me that both triples belong to the same context and there are indeed two triples as well .. . Answer : One should keep in mind that any particular triple may have different metadata than other - otherwise identical - triples . Metadata such as the original source of the triple possible strength of connection information etcetera . It may also be feasible to merely count the number of copies of a triple in order to judge the relative strength of a connection compared to other possible contradictory connections . So as always it all depends upon what you intend to do with your data .",
"Question : if a triple store contains twice the same triple what is if any exist the authoritative position about this redundancy Additionally should a triplestore be allowed to store twice the same triple within the same context I ask this because in rdflib apparently you can store the same triple twice or more . This is the reader .. . .. . and this is the writer .. . .. . This is what I obtain .. . .. . To me it appears as a bug . A modified version shows me that both triples belong to the same context and there are indeed two triples as well .. . Answer : An RDF triple store is a set of triples so the same triple cannot be present twice by definition . However most rdf stores are actually quad stores sets of rdf graphs also known as datasets and in that case the triple may appear multiple times . That is sometimes called context depending on the store eg mine Redland http : librdf.org . Authority is really up to the user to define what meaning a particular graph name context name has . Comment : That was my thought as well but apparently I found a bug in rdflib since I am pushing the same triples again and again and I get duplicates .",
"Question : i m trying to create a sparql query that returns every column where the column subject is http : purl.org dc elements 1.1 creator . In sql it should be something like this : .. . .. . The sparql query that comes close to what I want looks like this : .. . .. . It returns a table with all the three columns but the subject column is empty for some reason . The predicate and the object column are not empty and show the correct data . Anyone who can help me with this Thanks a lot : D Comment : Actually purl.org dc elements 1.1 creator http : purl.org dc elements 1.1 creator is supposed to be a property so do you really want to get all triples about this property Do you know the base concept of triples in RDF knowledge bases .. . Answer : Assuming your Triplestore is populated with the correct statements then try - Comment : Awesome This worked like a charm : D Thanks a lot : D",
"Question : I need to store RDF triples while keeping track of modifications . Is there anything out there for this service Alternatively how would you keep track of revision while using a context-aware triplestore Edit : please note that I don t need only the changeset . I also need to see the triples at any time in the past . .. . Answer : in addition to the other answers also take a look at the Lensfield system http : www.dspace.cam.ac.uk bitstream 1810 223838 1 ieee-lensfield.pdf research software at the moment developed by Jim Downing et al. . Lensfield will not only keep track of different versions of your data but also of any scripts transformation instructions you use to process your data and change your graph . In short it s a mixture of version-control maven and make for semantic data . Maybe that helps . Comment : Yes that was my plan if PMR granted me the help I asked .",
"Question : I need to know how 4store make the persistence of it s triples in the database if it s like a table of 3 coluns one for each element in the triple or if it s another way .. . Answer : It s somewhat more complex than that but it s described in this whitepaper : http : 4store.org publications harris-ssws09.pdf .. . .. . There s a number of indexes 2 are tables of 4 elements indexed by a Patricia Trie the quadstore part one is an index from graph IDs to lists of triples the triplestore part . There s also a distributed hash which holds URIs and so on .",
"Question : I send queries to a Sesame triplestore and render the results on a webpage . The server is set up on a local computer . Everything works fine when I access the server from the same computer say computer A . If I try to access the triplestore from another computer say computer B using computer A s IP address I get this error : .. . .. . How can I resolve this issue Comment : Someone please help . I need to present this soon and can t find a way out . This net : : ERR EMPTY RESPONSE is not specific to Chrome . Firefox doesn t return anything for the queries as well . I ve looked at some solutions to net : : ERR EMPTY RESPONSE but they don t work . Comment : There s not enough information here to answer this but my guess would be assuming that you have either jsonp callbacks or CORS headers working properly in principle that you should have a look at firewall settings and proxy settings on your server . Look in the Apache Tomcat and Sesame logs to try and determine where the request stops or where an error occurs . .. . Answer : You nailed the problem on its head Jeen . The problem was with Windows Firewall . To solve I had to let Tomcat server communicate through the firewall . This meant creating rules to enable Tomcat.exe in the Apache Folder to be allowed inbound communication inbound port rule ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
http
|
UNK_RELATION
|
patricia-trie@trie@115
|
patricia-trie -- patricia trees are a term for a specialised kind of radix tree.a radix tree is a space-optimized @placeholder data structure where each node with only one child is merged with its child .
|
{
"confidence": [
76.37970733642578,
73.30980682373047,
73.30980682373047,
71.14971923828125,
71.02750396728516,
70.72027587890625,
68.03077697753906,
66.2914810180664,
65.52716064453125,
62.917938232421875,
61.83012390136719,
61.71205139160156,
61.618255615234375,
59.872467041015625,
58.65320587158203,
57.311317443847656,
56.99261474609375,
56.78649139404297,
56.03211975097656,
54.39805603027344,
53.914878845214844,
53.65211486816406,
53.13031768798828,
52.900367736816406,
52.26050567626953,
51.581687927246094,
51.31330108642578,
50.37016296386719,
49.96598815917969,
49.28923034667969,
48.62471008300781,
48.3272705078125,
47.49673080444336,
46.94855499267578,
46.819122314453125,
46.063236236572266,
46.063236236572266,
45.08892059326172,
44.682830810546875,
43.77593994140625,
43.36061477661133,
43.117889404296875,
43.058509826660156,
43.02789306640625,
42.997589111328125,
42.95173645019531,
42.379844665527344,
42.311580657958984,
42.249900817871094,
42.23002243041992,
40.2199592590332,
40.196678161621094,
40.196678161621094,
39.59174346923828,
39.24517822265625,
39.115745544433594,
39.115745544433594,
38.639122009277344,
38.101707458496094,
38.041812896728516,
38.0403938293457,
37.658485412597656,
37.658485412597656,
37.363525390625,
37.161376953125,
36.567691802978516,
36.567691802978516,
36.44719696044922,
36.39142608642578,
36.25957489013672,
35.6658935546875,
35.43779754638672,
35.212860107421875,
35.138031005859375,
34.684532165527344,
34.65376281738281,
33.680702209472656,
33.680702209472656,
33.48558807373047,
33.2469482421875,
32.91539764404297,
32.700927734375,
32.639427185058594,
32.01605224609375,
31.32806396484375,
31.30887222290039,
30.557247161865234,
30.503982543945312,
30.167978286743164,
30.028390884399414,
29.98408317565918,
29.812875747680664,
29.559326171875,
29.559326171875,
29.16277313232422,
28.91190528869629,
28.86431121826172,
28.64609146118164,
28.548294067382812,
28.49917221069336
],
"content": [
"Similarly PATRICIA denotes a specific type of radix trie but not all radix tries are PATRICIA tries .",
"If they are same then what is the meaning of radix trie AKA Patricia trie",
"If they are n t same then what is the meaning of Radix trie aka Patricia Trie",
"To do this I m going to use a data structure very similar to a Radix Tree http : en.wikipedia.org wiki Radix tree AKA a Patricia Trie .",
"In a trie on each edge you write a single letter while in a PATRICIA tree or radix tree you store whole words .",
"I m currently implementing a radix tree patricia-trie whatever you want to call it .",
"Balanced tree vs patricia-trie",
"Is there a document that will help me understand how ipv4 addresses are inserted into the patricia radix trees",
"I explored the Internet a bit to determine that the best answer would be a Patricia Radix trie .",
"A PATRICIA trie is a variant of radix tries for which there should only ever be n nodes used to contain n items .",
"As I understand also from here http : stackoverflow.com questions 14708134 what-is-the-difference-between-trie-and-radix-trie-data-structures memory-complexity of these DSs can be ordered like Trie Radix Patricia .",
"In a PATRICIA trie there should only be four .",
"This is an implementation of a Patricia trie to look up IP addresses .",
".. . .. . What is a PATRICIA trie",
"A radix tree is a compressed version of a trie .",
"10.10.110.3 .. . .. . Trie example uncompressed .. . .. . Patricia Trie compressed",
"How to get Patricia Trie work in case-sensitive fashion .",
"Here s another nice page : csse.monash.edu.au lloyd tildeAlgDS Tree PATRICIA http : www.csse.monash.edu.au lloyd tildeAlgDS Tree PATRICIA",
"This is a radix trie .",
"Take a look at Net-Patricia .",
"In order to implement this I need to design a Patricia Trie .",
"You re right that what I wrote talks about a trie in general PATRICIA tries use less space but are more complicated .",
".. . .. . What is a radix trie",
"Detailed descriptions of B-trees shouldn t be hard to come by and the Index Fabric really isn t much more than a mash-up of a Patricia trie and a B-tree .",
"Maybe I should just compare those two solutions to each other considering that my patricia-trie is basically done .",
"This algorithm will will require only 5 of the code of a Patricia trie and will be easy to maintain understand and update .",
"Because in TRIE if you wan to search the next char you need to see the ith index in the child array of the current node but in radix tree you need search for all the child nodes sequentially .",
"can i say that searching in TRIE is faster than Radix tree",
"Your diagram looks like some other kind of radix trie .",
"That being said Patricia Trie seems to be a bit overloaded in it s definition .",
"It turns out the GNU extensions for the standard c++ lib includes a Patricia trie implementation .",
"algs4.cs.princeton.edu lectures 52Tries.pdf http : algs4.cs.princeton.edu lectures 52Tries.pdf Page 51 He also mentions that Patricia tree is Also known as : crit-bit tree radix tree .",
"I am making modifications to the way a radix tree is implemented a multiway trie where M 2 k where k is the number of bits used for lookup .",
"For good understanding of Patricia trie I would suggest reading Robert Sedgewick s Algorithms book http : www.cs.princeton.edu rs which is a great source of knowledge .",
"I d also love to hear any ideas on potential uses for Patricia tries .",
"What I have made is perhaps not a pure Patricia trie implementation but I like my way better .",
"I also tried google but couldn t find enough information about adding layers to the patricia-trie there either .",
"BTW a nice article on Radix Trees in general with some mention of applications is at en.wikipedia.org wiki Radix tree http : en.wikipedia.org wiki Radix tree",
"Searching on google I ve seen that this problem is solved using a patricia-trie but it does only prefix search so if I create a trie with firstname+lastname how can I search not only by firstname but also by lastname",
"In a radix tree you will have : .. . .. . and you need only five nodes .",
"The references I have read Knuth Sedgewick and this https : web.archive.org web 20140129124956 http : www.mcdowella.demon.co.uk Patricia.html all seem to suggest Patricia creates a binary-tree with one node per string stored but it seems to me as though your PATRICIA creates more than one node per string stored.. .",
"Looking around for python implementations of tries just so that I can understand what they are and how they work I came across Justin Peel s patricia-trie http : stackoverflow.com questions 2406416 implementing-a-patricia-trie-for-use-as-a-dictionary 2412468 2412468 and found it very instructive : it s straightforward enough for one as new as I am to play around with it and learn from it .",
"@Seb I d assume they refer to the compressed version of the Patricia Trie as seen in my second example above .",
"EDIT Making the question clearer sorry for the lack of details I am using a multiway trie like radix tree and making some modifications to it .",
"Simple PATRICIA diagram http : i.stack.imgur.com fO57k.gif .. . .. . A more complex PATRICIA algorithm involving keys of variant length is possible though some of the technical properties of PATRICIA are lost in the process namely that any node contains a common prefix with the node prior to it : .. . .. .",
"Can anyone point me to a detailed description on implementing a prefix search on radix trees",
"Radix trie seems to describe a form of trie that condenses common prefix parts as Ivaylo Strandjev described in his answer .",
"Other Patricia tries in other languages use just a list for the children and check each child to see there is a match but I thought this was rather inefficient so I use dictionaries .",
"I m attempting to implement a Patricia Trie with the methods addWord isWord and isPrefix as a means to store a large dictionary of words for quick retrieval including prefix search .",
"It s quite possible that my understanding of patricia tries is flawed but I believe that such tries store - in contrast to normal tries - complete words and always have two child nodes .",
"Basically a PATRICIA complresses out many of the nodes by storing strings for long chains of single nodes .",
"It can be implement using a binary radix tree DAG or many other ways .",
"So overall a radix tree takes less memory but it is harder to implement .",
"Complex PATRICIA diagram http : i.stack.imgur.com EH2AS.png .. . .. . By branching like this there are a number of benefits : Every node contains a value .",
"Please note that I did find a similar question here http : stackoverflow.com questions 911947 algorithm-steps-to-find-longest-prefix-search-in-patricia-trie .",
"I m having trouble understanding your explanation of PATRICIA tries .",
"These properties make PATRICIA my favourite algorithm so far.. .",
"Trie describes a tree data structure suitable for use as an associative-array where branches or edges correspond to parts of a key .",
"requires pointer to parent from each node .. . .. . Also note : I explained about simple tries but there is really no reason why not to use patricia tries instead using the same approach .",
"Say I had a prefix string rom and a set of candidate words .. . .. . var dataset random rapid romance romania rome rose .. . .. . that would like this in a radix trie : .. . .. . This means for every node I will be using the prefix match function to determine which node has a value that matches the prefix string at the index .",
"However there s something I think I m not understanding : .. . .. . using Justin s class patricia thus : .. . .. . I get a trie as a dictionary looking like this : .. . .. . addWord and isWord work as expected but isPrefix shows the following behavior which puzzles me : .. . .. . good as expected and then .. . .. . also good but then : .. . .. . and furthermore : .. . .. . Something here I m not understanding",
"It s often better to use binary tries with path compression Patricia tries based on the binary representation of your keys .",
"I just want to say that I wanted to explore Patricia tries once too and wound up giving up .",
"I also have a copy of PATRICIA - Practical Algorithm to Retrieve Information Coded in Alphanumeric which is historically speaking the authoritive definition of PATRICIA written by D . R . Morrison and submitted to the Journal of ACM .",
"Additionally there is a radix tree implementation in Java http : code.google.com p radixtree that has an implemented prefix search in RadixTreeImpl.java http : code.google.com p radixtree source browse trunk RadixTree src ds tree RadixTreeImpl.java .",
"The interface is perl but the underlying code is in C . Here is a link but many CPAN archives should have it : .. . .. . http : cpansearch.perl.org src PHILIPP Net-Patricia-1.15 5F07 libpatricia patricia.c",
"There s a fairly-readable C implementation in the test code for LLVM : https : llvm.org svn llvm-project test-suite trunk MultiSource Benchmarks MiBench network-patricia",
"Here s a simple diagram of such a tree though PATRICIA really is more of a cyclic graph than a tree as you ll see which was included in Sedgewick s book mentioned below : .. . .. .",
"Increasing your alphabet set only means that your each trie node will be bigger now .",
"Take this user input for example : .. . .. . I like icecream .. . .. . From that my goal is to generate the following data structure : .. . .. . This is essentially a Radix Tree with some extra information allowing me to weigh the probability of the learned possibilities that the user might want to type next .",
"This trie is designed to store binary-data but you are interested only in getting the whole bytes .",
"In our crudely demonstrated radix trie pseudocode above there are five nodes in total : root root e which is a nullary node it contains no actual value root e d root e s and root i .",
"The category Radix Trie describes a particular kind of Trie but that doesn t mean that all tries are radix tries .",
"I m currently trying to implement the Index Fabric for a dna-sequence data search system : .. . .. . Index fabric algorithm http : xml.coverpages.org ShadmonVLDB2001.pdf .. . .. . I could implement the normal patricia-trie but I still couldn t understand how to add layers .",
"In my example I have a root node which has a self reference and illness as a child .",
"Let s take a look at how these prefixes might differ by looking at them in binary since PATRICIA is a binary algorithm .",
"illness in turn has in as a child and also a self reference .",
"imaginary is a child of in and has a reference to illness as well as to imitation .",
"For example if I build a radix tree from these words : .. . .. . illness .. . imaginary .. . imagination .. . imagine .. . imitation .. . immediate .. . immediately .. . immense .. . in .. . .. . I will get the exact same best match for the prefixes i and in so that it seems difficult to me to gather all matching words just by traversing the tree from that best match .",
"I don t know about document Design and Implementation of 4.4 BSD Unix by Sam Leffler might be a good source but I don t have it handy but have a look at this C code : http : cpansearch.perl.org src PHILIPP Net-Patricia-1.15 07 libpatricia patricia.c .. . .. . If you re good at C you can probably consider it a document .",
"I would not use a partial trie but just a balanced tree .",
"Actually in a radix tree you can t have more than a single edge starting with the same letter so you can use the same constant indexing .",
"If you would like to know what a PATRICIA tree looks like it s much more like a cyclic graph http : flylib.com books 3 55 1 html 2 images 15fig11.gif .",
"At each node you have the path that lead you to that node so in your example you start at that s a capital Lambda this greek font kind of sucks the root node corresponding to an empty string .",
"All you have to do is to store the common part while traversing the trie .",
"The values corresponding with each key are lists where the first item is a string which gives the rest of the string that matches with this branch of the trie and the second item is a dictionary leading to further branches from this node .",
"Note that once you have a pointer to the node one can simply go back on the trie until you get to the root to get the word this sign is representing .",
"Think about what your trie encodes .",
"Another thing I should mention is that if a given node has branches but also is a word in the trie itself then that is denoted by having a key in the dictionary that leads to a node with the list .",
"I saw one person who implemented it with an array of 26 child nodes set to null None .",
"In case it already exists in the trie I intend to merge the data of the IP address in the trie with the new addresses data .",
"I am implementing Patricia tries for IP prefix lookup I could get the code working for complete key match but facing problems with prefix search when there are keys which are prefixes of other keys like : .. . .. . Can anyone help me with the algorithm for prefix searches in the above case Should I consider these as keys of separate length i.e 24 and 16",
"If you use this trie for storing IP numbers as elements of the fixed length then it is definitely not the right way .",
"Just make sure that while going down the trie you store the common part somewhere in the parameters of the recursive function .",
"Basic trie http : i.stack.imgur.com EmJmU.png .. . .. . If this trie were to store items for the keys t te i or in there would need to be extra information present at each node to distinguish between nullary nodes and nodes with actual values .",
"This means that .. . .. . will return whether abc in the trie or not .",
"Patricia tries solve the problem of finding the best covering prefix for a given IP address they are used by routers to quickly determine that 192.168.0.0 16 is the best choice for 192.168.14.63 for example .",
"has children for each letter used so in your data set you have one branch for i .",
"Someone else asked a question about Patricia tries a while ago and I thought about making a Python implementation then but this time I decided to actually give it a shot Yes this is way overboard but it seemed like a nice little project .",
"For example a binary trie has two edges per node that correspond to a 0 or a 1 while a 16-way trie has sixteen edges per node that correspond to four bits or a hexidecimal digit : 0x0 through to 0xf ."
]
}
|
{
"confidence": [
105.865966796875,
104.89970397949219,
99.74098205566406,
97.50012969970703,
96.67277526855469,
91.66602325439453,
84.6606216430664,
84.29056549072266,
83.36521911621094,
82.1923599243164,
78.96916961669922,
75.92920684814453,
74.66470336914062,
74.62648010253906,
73.78924560546875,
72.21014404296875,
68.92138671875,
68.61866760253906,
67.94490814208984,
67.72896575927734
],
"content": [
"Question : Are the trie and radix trie data-structures the same thing If they are same then what is the meaning of radix trie AKA Patricia trie .. . Answer : A radix tree is a compressed version of a trie . In a trie on each edge you write a single letter while in a PATRICIA tree or radix tree you store whole words . Now assume you have the words hello hat and have . To store them in a trie it would look like : .. . .. . And you need nine nodes . I have placed the letters in the nodes but in fact they label the edges . In a radix tree you will have : .. . .. . and you need only five nodes . In the picture above nodes are the asterisks . So overall a radix tree takes less memory but it is harder to implement . Otherwise the use-case of both is pretty much the same . Comment : Thanks...Can you provide me with a good resource to study trie DS .. . That would be of great help .. . Comment : I believe only thing I used when I first implemented Trie was the wikipedia article http : en.wikipedia.org wiki Trie . I am not saying it is perfect but it is good enough . Comment : can i say that searching in TRIE is faster than Radix tree Because in TRIE if you wan to search the next char you need to see the ith index in the child array of the current node but in radix tree you need search for all the child nodes sequentially . See the implementation code.google.com p radixtree source browse trunk RadixTree src https : code.google.com p radixtree source browse trunk RadixTree src ds tree RadixTreeImpl.java Comment : Actually in a radix tree you can t have more than a single edge starting with the same letter so you can use the same constant indexing . Comment : Suppose we have a forth word hatchet how would it fit in the upper structures",
"Question : I m currently implementing a radix tree patricia-trie whatever you want to call it . I want to use it for prefix searches in a dictionary on a severely underpowered piece of hardware . It s supposed to work more or less like auto-completion i . e . showing a list of words that the typed prefix matches . My implementation is based on this article http : www.codeproject.com KB string PatriciaTrieTemplateClass.aspx but the code therein doesn t include prefix searches though the author says : .. . .. . .. . Say you want to enumerate all the nodes that have keys with a common prefix AB . You can perform a depth-first-search starting at that root stopping whenever you encounter back edges . But I don t see how that is supposed to work . For example if I build a radix tree from these words : .. . .. . illness .. . imaginary .. . imagination .. . imagine .. . imitation .. . immediate .. . immediately .. . immense .. . in .. . .. . I will get the exact same best match for the prefixes i and in so that it seems difficult to me to gather all matching words just by traversing the tree from that best match . Additionally there is a radix tree implementation in Java http : code.google.com p radixtree that has an implemented prefix search in RadixTreeImpl.java http : code.google.com p radixtree source browse trunk RadixTree src ds tree RadixTreeImpl.java . That code explicitly checks all nodes starting from a certain node for a prefix match - it actually compares bytes . Can anyone point me to a detailed description on implementing a prefix search on radix trees Is the algorithm used in the Java implementation the only way to do it .. . Answer : Think about what your trie encodes . At each node you have the path that lead you to that node so in your example you start at that s a capital Lambda this greek font kind of sucks the root node corresponding to an empty string . has children for each letter used so in your data set you have one branch for i . .. . i .. . .. . At the i node there are two children one for m and one for n . The next letter is n so you take that .. . .. . i n .. . .. . and since the only word that starts i n in your data set is in there are no children from n . That s a match . Now let s say the data set instead of having in had infindibulum . What SF I m referencing is left as an exercise . You d still get to the n node the same way but then if the next letter you get is q you know the word doesn t appear in your data set at all because there s no q branch . At that point you say okay no match . Maybe you then start adding the word maybe not depending on the application . But if the next letter is f you can keep going . You can short circuit that with a little craft though : once you reach a node that represents a unique path you can hang the whole string off that node . When you get to that node you know that the rest of the string must be findibulum so you ve used the prefix to match the whole string and return it . How your you use that in a lot of non-UNIX command interpreters like the old VAX DCL you could use any unique prefix of a command . So the equivalent of ls 1 was DIRECTORY but no other command started with DIR so you could type DIR and that was as good as doing the whole word . If you couldn t remember the correct command you could type just D and hit I think ESC the DCL CLI would return you all the commands that started with D which it could search extremely fast . Comment : It s quite possible that my understanding of patricia tries is flawed but I believe that such tries store - in contrast to normal tries - complete words and always have two child nodes . In my example I have a root node which has a self reference and illness as a child . illness in turn has in as a child and also a self reference . imaginary is a child of in and has a reference to illness as well as to imitation . And so on.. . Comment : You re right that what I wrote talks about a trie in general PATRICIA tries use less space but are more complicated . The basic idea is the same though . Here s another nice page : csse.monash.edu.au lloyd tildeAlgDS Tree PATRICIA http : www.csse.monash.edu.au lloyd tildeAlgDS Tree PATRICIA Comment : Basically a PATRICIA complresses out many of the nodes by storing strings for long chains of single nodes . Comment : Which means that I have to compare the string s characters with the prefix I search for right Comment : well you re pretty much going to ahve to no matter what . i m not sure I understand the question .",
"Question : Are the trie and radix trie data-structures the same thing If they are same then what is the meaning of radix trie AKA Patricia trie .. . Answer : My question is whether Trie data structure and Radix Trie are the same thing In short no . The category Radix Trie describes a particular kind of Trie but that doesn t mean that all tries are radix tries . If they are n t same then what is the meaning of Radix trie aka Patricia Trie I assume you meant to write aren t in your question hence my correction . Similarly PATRICIA denotes a specific type of radix trie but not all radix tries are PATRICIA tries . .. . .. . What is a trie Trie describes a tree data structure suitable for use as an associative-array where branches or edges correspond to parts of a key . The definition of parts is rather wide here because different implementations of tries use different bit-lengths to correspond to edges . For example a binary trie has two edges per node that correspond to a 0 or a 1 while a 16-way trie has sixteen edges per node that correspond to four bits or a hexidecimal digit : 0x0 through to 0xf . This diagram retrieved from Wikipedia seems to depict a trie with at least the keys A to tea ted ten and inn inserted : .. . .. . Basic trie http : i.stack.imgur.com EmJmU.png .. . .. . If this trie were to store items for the keys t te i or in there would need to be extra information present at each node to distinguish between nullary nodes and nodes with actual values . .. . .. . What is a radix trie Radix trie seems to describe a form of trie that condenses common prefix parts as Ivaylo Strandjev described in his answer . Consider that a 256-way trie which indexes the keys smile smiled smiles and smiling using the following static assignments : .. . .. . Each subscript accesses an internal node . That means to retrieve smile item you must access seven nodes . Eight node accesses correspond to smiled item and smiles item and nine to smiling item . For these four items there are fourteen nodes in total . They all have the first four bytes corresponding to the first four nodes in common however . By condensing those four bytes to create a root that corresponds to s m i l four node accesses have been optimised away . That means less memory and less node accesses which is a very good indication . The optimisation can be applied recursively to reduce the need to access unnecessary suffix bytes . Eventually you get to a point where you re only comparing differences between the search key and indexed keys at locations indexed by the trie . This is a radix trie . To retrieve items each node needs a position . With a search key of smiles and a root.position of 4 we access root smiles 4 which happens to be root e . We store this in a variable called current . current.position is 5 which is the location of the difference between smiled and smiles so the next access will be root smiles 5 . This brings us to smiles item and the end of our string . Our search has terminated and the item has been retrieved with just three node accesses instead of eight . .. . .. . What is a PATRICIA trie A PATRICIA trie is a variant of radix tries for which there should only ever be n nodes used to contain n items . In our crudely demonstrated radix trie pseudocode above there are five nodes in total : root root e which is a nullary node it contains no actual value root e d root e s and root i . In a PATRICIA trie there should only be four . Let s take a look at how these prefixes might differ by looking at them in binary since PATRICIA is a binary algorithm . Let us consider that the nodes are added in the order they are presented above . smile item is the root of this tree . The difference bolded to make it slightly easier to spot is in the last byte of smile at bit 36 . Up until this point all of our nodes have the same prefix . smiled node belongs at smile node 0 . The difference between smiled and smiles occurs at bit 43 where smiles has a 1 bit so smiled node 1 is smiles node . Rather than using NULL as branches and or extra internal information to denote when a search terminates the branches link back up the tree somewhere so a search terminates when the offset to test reduces rather than increasing . Here s a simple diagram of such a tree though PATRICIA really is more of a cyclic graph than a tree as you ll see which was included in Sedgewick s book mentioned below : .. . .. . Simple PATRICIA diagram http : i.stack.imgur.com fO57k.gif .. . .. . A more complex PATRICIA algorithm involving keys of variant length is possible though some of the technical properties of PATRICIA are lost in the process namely that any node contains a common prefix with the node prior to it : .. . .. . Complex PATRICIA diagram http : i.stack.imgur.com EH2AS.png .. . .. . By branching like this there are a number of benefits : Every node contains a value . That includes the root . As a result the length and complexity of the code becomes a lot shorter and probably a bit faster in reality . At least one branch and at most k branches where k is the number of bits in the search key are followed to locate an item . The nodes are tiny because they store only two branches each which makes them fairly suitable for cache locality optimisation . These properties make PATRICIA my favourite algorithm so far.. . I m going to cut this description short here in order to reduce the severity of my impending arthritis but if you want to know more about PATRICIA you can consult books such as The Art of Computer Programming Volume 3 by Donald Knuth or any of the Algorithms in your-favourite-language parts 1-4 by Sedgewick .",
"Question : I m currently implementing a radix tree patricia-trie whatever you want to call it . I want to use it for prefix searches in a dictionary on a severely underpowered piece of hardware . It s supposed to work more or less like auto-completion i . e . showing a list of words that the typed prefix matches . My implementation is based on this article http : www.codeproject.com KB string PatriciaTrieTemplateClass.aspx but the code therein doesn t include prefix searches though the author says : .. . .. . .. . Say you want to enumerate all the nodes that have keys with a common prefix AB . You can perform a depth-first-search starting at that root stopping whenever you encounter back edges . But I don t see how that is supposed to work . For example if I build a radix tree from these words : .. . .. . illness .. . imaginary .. . imagination .. . imagine .. . imitation .. . immediate .. . immediately .. . immense .. . in .. . .. . I will get the exact same best match for the prefixes i and in so that it seems difficult to me to gather all matching words just by traversing the tree from that best match . Additionally there is a radix tree implementation in Java http : code.google.com p radixtree that has an implemented prefix search in RadixTreeImpl.java http : code.google.com p radixtree source browse trunk RadixTree src ds tree RadixTreeImpl.java . That code explicitly checks all nodes starting from a certain node for a prefix match - it actually compares bytes . Can anyone point me to a detailed description on implementing a prefix search on radix trees Is the algorithm used in the Java implementation the only way to do it .. . Answer : An alternative algorithm : Keep It Simple Stupid Just make a sorted list of your keywords . When you have a prefix binary-search to find where that prefix would be located in the list . All of your possible completions will be found starting at that index ready to be accessed in-place . This algorithm will will require only 5 of the code of a Patricia trie and will be easy to maintain understand and update . It is almost certain this simple list search will be more efficient as well . The only downside is if you have huge numbers of long keywords with similar prefixes a trie can save some storage since it doesn t need to keep the full prefix for every entry . In practice if you have less than a few million words this is not a savings because the pointer overhead of the tree will dominate . This savings is more for applications like searching databases of DNA strings with millions of characters not text keywords . Comment : Maybe I should just compare those two solutions to each other considering that my patricia-trie is basically done .",
"Question : I m currently implementing a radix tree patricia-trie whatever you want to call it . I want to use it for prefix searches in a dictionary on a severely underpowered piece of hardware . It s supposed to work more or less like auto-completion i . e . showing a list of words that the typed prefix matches . My implementation is based on this article http : www.codeproject.com KB string PatriciaTrieTemplateClass.aspx but the code therein doesn t include prefix searches though the author says : .. . .. . .. . Say you want to enumerate all the nodes that have keys with a common prefix AB . You can perform a depth-first-search starting at that root stopping whenever you encounter back edges . But I don t see how that is supposed to work . For example if I build a radix tree from these words : .. . .. . illness .. . imaginary .. . imagination .. . imagine .. . imitation .. . immediate .. . immediately .. . immense .. . in .. . .. . I will get the exact same best match for the prefixes i and in so that it seems difficult to me to gather all matching words just by traversing the tree from that best match . Additionally there is a radix tree implementation in Java http : code.google.com p radixtree that has an implemented prefix search in RadixTreeImpl.java http : code.google.com p radixtree source browse trunk RadixTree src ds tree RadixTreeImpl.java . That code explicitly checks all nodes starting from a certain node for a prefix match - it actually compares bytes . Can anyone point me to a detailed description on implementing a prefix search on radix trees Is the algorithm used in the Java implementation the only way to do it .. . Answer : It turns out the GNU extensions for the standard c++ lib includes a Patricia trie implementation . It s found under the policy-based data-structures extension . See http : gcc.gnu.org onlinedocs libstdc++ ext pb ds trie based containers.html Comment : What a find I never imagined gcc has such implementations in its ext namespace Please note that it is available only in later version 4.x series gcc .",
"Question : I am writing a program in C++ that requires IP addresses all IPv4 to be looked up and stored in a fast way . Every IP address has a data associated with it . In case it already exists in the trie I intend to merge the data of the IP address in the trie with the new addresses data . If it is not present I intend to add it as a new entry to the trie . Deletion of IP address is not necessary . In order to implement this I need to design a Patricia Trie . However I am unable to visualize the design beyond this . It seems quite naive of me but the only idea that came to my mind was to change the IP address to their binary form and then use the trie . I am however clueless about HOW exactly to implement this . I would be really thankful to you if you could help me with this one . Please note that I did find a similar question here http : stackoverflow.com questions 911947 algorithm-steps-to-find-longest-prefix-search-in-patricia-trie . The question or more specifically the answer was beyond my understanding as the code in the CPAN web site was not clear enough for me . Also note my data is the following format .. . .. . 10.10.100.1 : Tom Jack Smith .. . .. . 192.168.12.12 : Jones Liz .. . .. . 12.124.2.1 : Jimmy George .. . .. . 10.10.100.1 : Mike Harry Jennifer Comment : How many if a few million : use a hash table Comment : I ve added an example if that helps . .. . Answer : I think you are referring to a RadixTree http : en.wikipedia.org wiki Radix tree . I have an implementation of a RadixTrie https : github.com phishman3579 java-algorithms-implementation blob master src com jwetherell algorithms data-structures RadixTrie.java in Java if you want to use that as a starting point which does the actual key to value mapping . It uses a PatriciaTrie https : github.com phishman3579 java-algorithms-implementation blob master src com jwetherell algorithms data-structures PatriciaTrie.java as it s backing structure . Example using the following strings . 1 . 10.10.101.2 .. . 2 . 10.10.100.1 .. . 3 . 10.10.110.3 .. . .. . Trie example uncompressed .. . .. . Patricia Trie compressed Comment : I m having trouble understanding your explanation of PATRICIA tries . The references I have read Knuth Sedgewick and this https : web.archive.org web 20140129124956 http : www.mcdowella.demon.co.uk Patricia.html all seem to suggest Patricia creates a binary-tree with one node per string stored but it seems to me as though your PATRICIA creates more than one node per string stored.. . Comment : @Seb I d assume they refer to the compressed version of the Patricia Trie as seen in my second example above . That being said Patricia Trie seems to be a bit overloaded in it s definition . The version I wrote follows along with the explanation here : youtu.be jXAHLqQthKw t 244 https : youtu.be jXAHLqQthKw t 244 Comment : Make no mistake I have read Knuth and Sedgewick s books on this subject and I understand their explanation precisely . I also have a copy of PATRICIA - Practical Algorithm to Retrieve Information Coded in Alphanumeric which is historically speaking the authoritive definition of PATRICIA written by D . R . Morrison and submitted to the Journal of ACM . Your diagram is using five nodes to store three strings according to Morrison Corollaries state that as the library grows each new end brings into the library with it exactly one new branch .. . The emphasis is mine . Comment : If you would like to know what a PATRICIA tree looks like it s much more like a cyclic graph http : flylib.com books 3 55 1 html 2 images 15fig11.gif . Your diagram looks like some other kind of radix trie . Comment : @Seb I think you are arguing implementation . It can be implement using a binary radix tree DAG or many other ways . If you look at the slides from Sedwick himself while at Princeton his graph looks exactly like a my example above . algs4.cs.princeton.edu lectures 52Tries.pdf http : algs4.cs.princeton.edu lectures 52Tries.pdf Page 51 He also mentions that Patricia tree is Also known as : crit-bit tree radix tree .",
"Question : Inspired by iOS7 iMessage s next-word-prediction I ve decided to try to write a script that will learn based on user input which words letters are most likely wanted to complete the user s current word or which word might most likely be desired next . To do this I m going to use a data structure very similar to a Radix Tree http : en.wikipedia.org wiki Radix tree AKA a Patricia Trie . Take this user input for example : .. . .. . I like icecream .. . .. . From that my goal is to generate the following data structure : .. . .. . This is essentially a Radix Tree with some extra information allowing me to weigh the probability of the learned possibilities that the user might want to type next . From the above extremely limited data set when the user types an I our best and only guess is that the next character will be a . So now that I ve explained my goal and method here s my question : .. . .. . How can I build this data structure from any given user input This is as far as I ve gotten but I m not sure how to insert the next values at the proper positions recursively . .. . Answer : Just make a simple recursive function something like this : .. . .. . Of course you could also make it iterative instead of recursive . Would output something like this :",
"Question : Looking around for python implementations of tries just so that I can understand what they are and how they work I came across Justin Peel s patricia-trie http : stackoverflow.com questions 2406416 implementing-a-patricia-trie-for-use-as-a-dictionary 2412468 2412468 and found it very instructive : it s straightforward enough for one as new as I am to play around with it and learn from it . However there s something I think I m not understanding : .. . .. . using Justin s class patricia thus : .. . .. . I get a trie as a dictionary looking like this : .. . .. . addWord and isWord work as expected but isPrefix shows the following behavior which puzzles me : .. . .. . good as expected and then .. . .. . also good but then : .. . .. . and furthermore : .. . .. . Something here I m not understanding .. . Answer : I believe the bug is in the following snippet of the code you re looking at : .. . .. . it should actually be : Comment : You re quite right Alex . This looks like precisely the bug . I did warn that it wasn t tested very well . It was just something I scratched up and haven t really used since then . I fixed the code in my original posted answer . Comment : @Justin great thanks for confirming this Comment : Alex Thanks very much for finding that now it seems to work as expected . And thanks Justin for building this . Having access to the root as a dictionary I found very instructive : I think in outlines indented text this is the result-of training in the humanities not experience with python however this was exactly what drew me to python in the first place so being able to prettyprint the trie really helped illustrate what was going on . I hope you ll post any further work you do on this : benchmark testing or whatever . I d also love to hear any ideas on potential uses for Patricia tries . Comment : @jjon you re welcome BTW a nice article on Radix Trees in general with some mention of applications is at en.wikipedia.org wiki Radix tree http : en.wikipedia.org wiki Radix tree",
"Question : I m currently implementing a radix tree patricia-trie whatever you want to call it . I want to use it for prefix searches in a dictionary on a severely underpowered piece of hardware . It s supposed to work more or less like auto-completion i . e . showing a list of words that the typed prefix matches . My implementation is based on this article http : www.codeproject.com KB string PatriciaTrieTemplateClass.aspx but the code therein doesn t include prefix searches though the author says : .. . .. . .. . Say you want to enumerate all the nodes that have keys with a common prefix AB . You can perform a depth-first-search starting at that root stopping whenever you encounter back edges . But I don t see how that is supposed to work . For example if I build a radix tree from these words : .. . .. . illness .. . imaginary .. . imagination .. . imagine .. . imitation .. . immediate .. . immediately .. . immense .. . in .. . .. . I will get the exact same best match for the prefixes i and in so that it seems difficult to me to gather all matching words just by traversing the tree from that best match . Additionally there is a radix tree implementation in Java http : code.google.com p radixtree that has an implemented prefix search in RadixTreeImpl.java http : code.google.com p radixtree source browse trunk RadixTree src ds tree RadixTreeImpl.java . That code explicitly checks all nodes starting from a certain node for a prefix match - it actually compares bytes . Can anyone point me to a detailed description on implementing a prefix search on radix trees Is the algorithm used in the Java implementation the only way to do it .. . Answer : Another alternative algo is a ternary search tree http : en.wikipedia.org wiki Ternary search tree more memory efficient https : github.com varunpant TernaryTree tree master TernaryTree",
"Question : Is there a document that will help me understand how ipv4 addresses are inserted into the patricia radix trees I am confused around calculating mask length and if the mask length is for the complete address or one octet in the address . Any explaination would be appreciated . .. . Answer : I don t know about document Design and Implementation of 4.4 BSD Unix by Sam Leffler might be a good source but I don t have it handy but have a look at this C code : http : cpansearch.perl.org src PHILIPP Net-Patricia-1.15 07 libpatricia patricia.c .. . .. . If you re good at C you can probably consider it a document .",
"Question : As I understand also from here http : stackoverflow.com questions 14708134 what-is-the-difference-between-trie-and-radix-trie-data-structures memory-complexity of these DSs can be ordered like Trie Radix Patricia . But what about time-complexity I assume they are almost same . If to mention my problem I want to do a lot of prefix search queries from pre-constructed dictionary . Memory is not a big concern for me . I want to use the fastest DS . HAT-trie is best suit for me but it is too complex to implement . Should I use Ternary Search Trees instead of any DSs mentioned above Thanks a lot Comment : youtube.com watch v jXAHLqQthKw https : www.youtube.com watch v jXAHLqQthKw Time measure on last slide for Trie and PatriciaTrie Also PatriciaTrie consumes less memory than Trie .. . Answer : Hat-trie could be not so hard . Look at finite-state-machine and aho-corasick algorithm . Basically it s a breadth-first search of a trie . Comment : thanks for your attention and effort but you did not answer neither of my questions .",
"Question : I m currently trying to implement the Index Fabric for a dna-sequence data search system : .. . .. . Index fabric algorithm http : xml.coverpages.org ShadmonVLDB2001.pdf .. . .. . I could implement the normal patricia-trie but I still couldn t understand how to add layers . I also tried google but couldn t find enough information about adding layers to the patricia-trie there either . In the paper mentioned above they came straightly with the layered trie which seems like witchcraft to me just kidding last part . Does anyone have experience in implementing the Index Fabric architecture and if so can you guys kindly share your experience with me Thanks in advance .. . Nuwan .. . Answer : Are you at all familiar with B-trees Detailed descriptions of B-trees shouldn t be hard to come by and the Index Fabric really isn t much more than a mash-up of a Patricia trie and a B-tree . Comment : Thanks Dave . You really provided me a path to travel . I hope you don t mind me asking some questions later . Nuwan",
"Question : I have written down a simple function that determines if str1 is a prefix of str2 . It s a very simple function that looks like this in JS : .. . .. . As you can see it loops through the entire length of the prefix string to gauge if it is a prefix of the candidate string . This means it s complexity is O N which isn t bad but this becomes a problem when I have a huge data set to consider looping through to determine which strings have the prefix string as a part of the prefix . This makes the complexity multiple like O M N where M is the total number of strings in a given data set . Not good . I explored the Internet a bit to determine that the best answer would be a Patricia Radix trie . Where strings are stored as prefixes . Even then when I attempt to insert look-up a string there will be a considerable overhead in string-matching if I use the aforementioned prefix gauging function . Say I had a prefix string rom and a set of candidate words .. . .. . var dataset random rapid romance romania rome rose .. . .. . that would like this in a radix trie : .. . .. . This means for every node I will be using the prefix match function to determine which node has a value that matches the prefix string at the index . Somehow this solution still seems arduous and does not sit too well with me . Is there something better or anyway I can improve the core prefix matching function .. . Answer : Looks like you ve got two different problems . One is to determine if a string is contained as a prefix in another string . For this I would suggest using a function already implemented in the language s string library . In JavaScript you could do this .. . .. . See documentation for String.indexOf here : https : developer.mozilla.org en-US docs Web JavaScript Reference Global Objects String indexOf .. . .. . For the other problem in a bunch of strings find out which ones have a given string as a prefix building a data structure like a Trie or the one you mention seems like the way to go if you want fast look-ups . Comment : marking as correct coz it s a whole lot better than my prefix match solution and that was the primary question not the Data structure also because you need some points desperately @Ram : Comment : Oh Yeah You need some Hadoop desperately : P",
"Question : I have to make a dictionary using tries the number of letters in the alphabet will increase from 26 to 120 and hence the numb er of leaf nodes will increase exponentially . What optimisations can I use so that my lookup insertion and deletion time doesn t increase exponentially EDIT Making the question clearer sorry for the lack of details I am using a multiway trie like radix tree and making some modifications to it . My question is if I know that the word size will increase for sure from 26 to 120 it will increase the depth of the tree . Is it possible to decrease the increase in depth by increasing the key to more than 64 bits the register can gold maximum 64 bits Comment : why will it increase exponentially Comment : It s unclear what you re asking . Is your alphabet expanding or is the length of the words growing A concrete example would be helpful . Comment : Initially the trie was designed to handle words of length say 32 chars now the trie has to handle words of length 120 chars . The length of words is growing . .. . Answer : It s often better to use binary tries with path compression Patricia tries based on the binary representation of your keys . That way you get the benefits of the smallest possible alphabet and you still only have 2 nodes one leaf and one internal per key . Comment : I am making modifications to the way a radix tree is implemented a multiway trie where M 2 k where k is the number of bits used for lookup . If k 6 then it fits the size of registers of the 64 bit CPU Architecture but suppose I increase k to 10 how can I implement that Note : I want to increase M instead of depth to decrease the time .",
"Question : I have written down a simple function that determines if str1 is a prefix of str2 . It s a very simple function that looks like this in JS : .. . .. . As you can see it loops through the entire length of the prefix string to gauge if it is a prefix of the candidate string . This means it s complexity is O N which isn t bad but this becomes a problem when I have a huge data set to consider looping through to determine which strings have the prefix string as a part of the prefix . This makes the complexity multiple like O M N where M is the total number of strings in a given data set . Not good . I explored the Internet a bit to determine that the best answer would be a Patricia Radix trie . Where strings are stored as prefixes . Even then when I attempt to insert look-up a string there will be a considerable overhead in string-matching if I use the aforementioned prefix gauging function . Say I had a prefix string rom and a set of candidate words .. . .. . var dataset random rapid romance romania rome rose .. . .. . that would like this in a radix trie : .. . .. . This means for every node I will be using the prefix match function to determine which node has a value that matches the prefix string at the index . Somehow this solution still seems arduous and does not sit too well with me . Is there something better or anyway I can improve the core prefix matching function .. . Answer : Check out this thread on stackoverflow - Javascript StartsWith http : stackoverflow.com questions 646628 javascript-startswith . Mark Byers solution seems to be very efficient . Also for Java there are built-in String functions endsWith and startsWith - http : docs.oracle.com javase tutorial java data comparestrings.html",
"Question : I m attempting to implement a Patricia Trie with the methods addWord isWord and isPrefix as a means to store a large dictionary of words for quick retrieval including prefix search . I ve read up on the concepts but they just aren t clarifying into an implementation . I want to know in Java or Python code how to implement the Trie particularly the nodes or should I implement it recursively . I saw one person who implemented it with an array of 26 child nodes set to null None . Is there a better strategy such as treating the letters as bits and how would you implement it Comment : Is this a homework assignment Comment : It is based off a homework assignment but the scope of this question is only a fraction of that assignment and is particularly now more relevant to my personal understanding of how tries work than getting a grade . Comment : I just want to say that I wanted to explore Patricia tries once too and wound up giving up . I found the Knuth exposition too terse and the original paper made no sense to me at all . Comment : Based on trying this out in JavaScript I think a realistic Python implementation would actually be a C extension . The same API on a sorted array was much faster than a trie in JavaScript and I d expect the same to hold true for Python . .. . Answer : Someone else asked a question about Patricia tries a while ago and I thought about making a Python implementation then but this time I decided to actually give it a shot Yes this is way overboard but it seemed like a nice little project . What I have made is perhaps not a pure Patricia trie implementation but I like my way better . Other Patricia tries in other languages use just a list for the children and check each child to see there is a match but I thought this was rather inefficient so I use dictionaries . Here is basically how I ve set it up : .. . .. . I ll start at the root node . The root is just a dictionary . The dictionary has keys that are all single characters the first letters of words leading to branches . The values corresponding with each key are lists where the first item is a string which gives the rest of the string that matches with this branch of the trie and the second item is a dictionary leading to further branches from this node . This dictionary also has single character keys that correspond with the first letter of the rest of the word and the process continues down the trie . Another thing I should mention is that if a given node has branches but also is a word in the trie itself then that is denoted by having a key in the dictionary that leads to a node with the list . Here s a small example that shows how words are stored the root node is the variable d : .. . .. . Notice that in the last case a key was added to the dictionary to denote that abc is a word in a addition to abcdef and abcabc . Source Code .. . .. . You may have noticed that at the end I set getitem to the isWord method . This means that .. . .. . will return whether abc in the trie or not . I think that maybe I should make a module out of this and submit it to PyPI but it needs more testing and at least a removeWord method . If you find any bugs let me know but it seems to be working pretty well . Also if you see any big improvements in efficiency I would also like to hear about them . I ve considered doing something about having empty dictionaries at the bottom of each branch but I m leaving it for now . These empty dictionaries may be replaced with data linked to the word to expand the uses of the implementation for instance . Anyway if you don t like the way I implemented it at least maybe this will give you some ideas about how you would like to implement your own version . Comment : @John Yes but I labeled those that way to make the code easier for other to figure out . I might make those sorts of changes for the final version . Thanks for the input . Comment : @Justin : Sorry in my haste I left one out : wlen - l Comment : @John Irony doesn t transmit well through text . You could have been someone truly trying to be helpful like most people on here and I try to respond nicely even if it isn t a great comment idea . Please don t waste my time with something as stupid as this . Comment : @Justin please see stackoverflow.com questions 3121916 http : stackoverflow.com questions 3121916 python-implementation-of-patricia-tries 3122502 3122502 -- there s a bug in this code of yours which the OP encountered I believe I found the bug and posted it in the answer there -- you may want to check my fix and either supply the correct one or confirm that mine is right and in either case fix the code in this answer too - -- thanks . Comment : @John : Say something interesting or useful .",
"Question : I am implementing Patricia tries for IP prefix lookup I could get the code working for complete key match but facing problems with prefix search when there are keys which are prefixes of other keys like : .. . .. . Can anyone help me with the algorithm for prefix searches in the above case Should I consider these as keys of separate length i.e 24 and 16 .. . Answer : If you use this trie for storing IP numbers as elements of the fixed length then it is definitely not the right way . The point here is that PT is especially useful for storing variable-length data . If you store parts of IP numbers as prefixes of variable-length then PT is a good choice . In this case yes your keys should be of different length . Let s say you are storing prefix 192.168 in binary 0xC0 0xA8 you add this as first key . Then when searching for IP like 192.168.1.1 you can get information that your trie contains 192.168 which is a prefix of what you look for . All you have to do is to store the common part while traversing the trie . This is a minor addition to the this http : www.codeproject.com KB string PatriciaTrieTemplateClass.aspx implementation . Just make sure that while going down the trie you store the common part somewhere in the parameters of the recursive function . For good understanding of Patricia trie I would suggest reading Robert Sedgewick s Algorithms book http : www.cs.princeton.edu rs which is a great source of knowledge . EDIT : There is one problem when storing C strings in PT . This trie is designed to store binary-data but you are interested only in getting the whole bytes . Make sure you are storing common part of the prefix only if its size in bits is multiple of 8 . For a wrong example : you have key in your tree : 0xC0 0xA5 and you are looking fro 0xC0 0xA6 . Your traversal will stop when the common part 0xC0 0xA but you are interested in taking only 0xC0 . So make sure to store common bytes not bits .",
"Question : I am implementing Patricia tries for IP prefix lookup I could get the code working for complete key match but facing problems with prefix search when there are keys which are prefixes of other keys like : .. . .. . Can anyone help me with the algorithm for prefix searches in the above case Should I consider these as keys of separate length i.e 24 and 16 .. . Answer : Take a look at Net-Patricia . This is an implementation of a Patricia trie to look up IP addresses . The interface is perl but the underlying code is in C . Here is a link but many CPAN archives should have it : .. . .. . http : cpansearch.perl.org src PHILIPP Net-Patricia-1.15 5F07 libpatricia patricia.c",
"Question : I m attempting to implement a Patricia Trie with the methods addWord isWord and isPrefix as a means to store a large dictionary of words for quick retrieval including prefix search . I ve read up on the concepts but they just aren t clarifying into an implementation . I want to know in Java or Python code how to implement the Trie particularly the nodes or should I implement it recursively . I saw one person who implemented it with an array of 26 child nodes set to null None . Is there a better strategy such as treating the letters as bits and how would you implement it Comment : Is this a homework assignment Comment : It is based off a homework assignment but the scope of this question is only a fraction of that assignment and is particularly now more relevant to my personal understanding of how tries work than getting a grade . Comment : I just want to say that I wanted to explore Patricia tries once too and wound up giving up . I found the Knuth exposition too terse and the original paper made no sense to me at all . Comment : Based on trying this out in JavaScript I think a realistic Python implementation would actually be a C extension . The same API on a sorted array was much faster than a trie in JavaScript and I d expect the same to hold true for Python . .. . Answer : Here s a recursive implementation using more pythonic methods :",
"Question : I have a question for you . I have to implement a business address book that contains 30000 names . All the names contains firstname and lastname . I have to implement an autocomplete textbox that search not only typing firstname but also by lastname . Searching on google I ve seen that this problem is solved using a patricia-trie but it does only prefix search so if I create a trie with firstname+lastname how can I search not only by firstname but also by lastname Do I have to duplicate entries inserting two strings like this Firstname+lastname And Lastname+firstname .. . .. . Please help me The search have to be very efficient . Thanks . .. . Answer : Yes the simplest solution is to insert both variants . However this should only duplicate the search string not the entry . You probably want to normalize the separation between first and last name somehow remove punctuation chars for the address book and for the user input so you ll find the entries in all cases for input such as John Doe Doe John Doe John etc . I would not use a partial trie but just a balanced tree . In many languages you ll find balanced trees as the sorted map implementation in the library at least Java and C++ . Comment : Thanks for you answer But when I search a string it s possibile to obtain two records tha represent the same person For example marco marchi . So if I search for marc I obtain two records : marco marchi and marchi marco . So what to do Comment : How can a balanced tree give him partial match Also note that balanced trees are less efficient - assymptotically speaking for searching existence of strings . Comment : You could also add parts of the Address or the birth date to the key ideally something that helps the user to select the right entry . To make sure you have a unique key and you don t need a list as value also append a unique record id . You may want to hide the id from the user . Comment : @amit : To get a partial match in a tree start iterating over the keys at the prefix until you find an entry that does not match the prefix . Tries may have a better performance in theory but there is a reason why most standard libraries don t have them : Memory consumption is horrible and the data structure will be scattered over a huge memory area causing cpu-cache issues . Comment : Balanced tree vs patricia-trie Which is the best for my problem Thanks"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
trie
|
UNK_RELATION
|
sim-toolkit@sim-toolkit@166
|
sim-toolkit -- the sim application toolkit is an etsi defined standard gsm 11.14 that defines a framework on top of java card for sim resident application so-called @placeholder applets .
|
{
"confidence": [
83.96719360351562,
79.97721099853516,
79.17008209228516,
76.04373168945312,
76.04373168945312,
74.87739562988281,
72.37714385986328,
71.06987762451172,
70.0326919555664,
69.88276672363281,
69.70018005371094,
69.10303497314453,
66.70602416992188,
66.41263580322266,
66.17694854736328,
66.09921264648438,
65.41887664794922,
65.07667541503906,
64.9275131225586,
64.05131530761719,
61.481712341308594,
61.481712341308594,
60.04808807373047,
57.36309051513672,
57.353057861328125,
57.165626525878906,
57.165626525878906,
56.65769958496094,
55.99443817138672,
55.99443817138672,
55.61946105957031,
55.323516845703125,
55.27357482910156,
54.68500900268555,
54.4146728515625,
54.205299377441406,
53.5042724609375,
52.625526428222656,
52.06096267700195,
52.06096267700195,
52.06096267700195,
51.68598175048828,
51.68598175048828,
51.06346130371094,
50.680908203125,
50.48119354248047,
50.48119354248047,
49.67356872558594,
49.454002380371094,
49.164764404296875,
48.9821891784668,
48.45122528076172,
47.8759765625,
47.6128044128418,
47.019737243652344,
46.976661682128906,
46.976661682128906,
46.976661682128906,
46.976661682128906,
46.820716857910156,
46.72571563720703,
46.17041778564453,
46.13353729248047,
44.09972381591797,
43.751441955566406,
43.18933868408203,
43.04318618774414,
43.04318618774414,
43.04318618774414,
43.04318618774414,
43.04318618774414,
43.04318618774414,
41.96938705444336,
41.88834762573242,
41.88834762573242,
41.60710525512695,
41.60710525512695,
41.24007034301758,
40.19412612915039,
40.099205017089844,
39.690025329589844,
38.675636291503906,
37.954872131347656,
37.954872131347656,
37.6787223815918,
36.98504638671875,
35.51254653930664,
35.43946838378906,
35.43946838378906,
35.286216735839844,
34.84071350097656,
34.78419494628906,
34.12689971923828,
33.84355163574219,
31.815631866455078,
31.094768524169922,
31.094768524169922,
31.094768524169922
],
"content": [
"So it can t install those applets that used SIM Toolkit APIs .",
"I try to develop a Sim Application Toolkit Applet. .",
"Check out SIM Application Toolkit http : en.wikipedia.org wiki SIM 5FToolkit .",
"I m testing a SIM Toolkit application using AT Commands .",
"Recently I m trying to work with SIM Application Toolkit .",
"Not Android specific but there are a whole load of resources referenced in the answers to .. . .. . SIM Application Toolkit development http : stackoverflow.com questions 377877 sim-application-toolkit-development",
"I want my app to open sim-card toolkit so that a user can make payments via mobile provided in the sim-toolkit application Please help",
"I want to build an application that accesses information from the sim-toolkit .",
"In the Sim Toolkit is default a menu entry working fine .",
"My applet is not a SIM Toolkit applet it is a common Java Card applet .",
"My client wants to access SIM card toolkit to recharge mobile .",
"I would like to programmatically access an STK SIM Application Toolkit application without using my handset .",
"You can t run SIM applets in Eclipse IDE without using a simulator and you need to use a SIM card simulator It can be a plugin for your IDE also or try to run your applet on a real SIM card .",
"I have been accessing Sim Toolkit Applications from puTTY terminal using huawei e303f modem and a sim .",
"Dear Android Developers .. . .. . I want to modify Sim toolkit application according to client requirement e.g app checks balance automatically.Manually Our Currier allow this feature in Sim toolkit .",
"As it can t find SIM Toolkit library there it returns this error .",
"Note that : I m afraid if the Java Card Development kit is able to convert applets with proprietary SIM APIs to CAP files .",
"if it says Java card and SIM in the description http : www.smartcardfocus.com shop ilp id 776 smartcafe-expert-6-0-80k-sim p index.shtml is there a good chance it will support Java Card applets and STK APIs",
"Yes It is a ETSI package I downloaded the SIM API packages from this : stackoverflow.com questions 22362327 http : stackoverflow.com questions 22362327 sim-toolkit-application-javacard-development-kit 22471187 22471187",
"For SIM Toolkit it has to be CA tag in INSTALL MAKE SELECTABLE command .",
"Network : Airtel .. . .. . I need to access Airtel SIM toolkit via my android application to recharge .",
"I am trying to run SIM toolkit application with the help of AT commands with a Huawei Modem .",
"Hi I have to design a simple application which has to reside in the SIM card of a GSM mobile .",
"My client is a SIM card distributor in our location .",
"In the final dialogue in the Sim toolkit app there is a choice between OK or Cancel How do I tell the SIM that the user pressed the OK key .",
"You need to use a SIM card simulator or try to run it on a real SIM card .",
"I have a real SIM card and a reader i think i can load my applet into this sim card.. .",
"The wikipedia article http : en.wikipedia.org wiki SIM 5FApplication 5FToolkit contains some information and pointers and the GSM 11.14 standard is available here http : www.3gpp.org ftp Specs html-info 1114.htm .",
"As we know that when we use any menu in sim-toolkit it send command to mobile network in ussd or sms format .",
"Basically right now I am only trying to navigate sim-toolkit menu .",
"Zip the sim folder .. . 6 .",
"Do I need Java Card for SIM based app",
"As far as I know you CAN T run SIM applets in Eclipse IDE without any simulator .",
"For doing that as far I know I have to activate the SIM toolkit functionality using AT+STSF 1 AT command which several GSM developer guides say .",
"While loading an applet to a sim-card i get Authentication failure error .",
"Are there any resources tutorials or even just pointers on how I can access the info in the sim-toolkit .",
"The SimToolkit application which is signed by the manufacturer or mobile operator so that it has special privileges is the only application which is permitted to communicate with the STK application on the SIM card .",
"4 : Get Input reported by SIM card is supported by MT .",
"I have a USB modem that supports SIM Toolkit Class 2 features and is based on the Open AT Firmware .",
"I am able to successfully interact with the SIM Toolkit by using the +STSF +STGI and +STGR commands .",
"I have been trying to install a very small sample applet using SIM toolkit features such as uicc.toolkit.ProactiveHandler .",
"Have you unlocked the SIM",
"Look at SIM tagged questions",
"i am trying to develop a sim-toolkit access software using c .. . .. . then .. . .. . it returns .. . .. . i am expecting a menu selection string but it come like this",
"Because of the limited try of sim-card key i wonder this error means the card is blocked or nor",
"Actually is there any other per-requisite to activate the STK functionality of the SIM card",
"After converting you need to upload this CAP file on the SIM card .",
"AT+STGI is used to open the SIM menu AT+STGR to select the menu .",
"download here : sourceforge.net projects eclipse-jcde files http : sourceforge.net projects eclipse-jcde files I don t have any idea that you can use it for convert applets that contain SIM APIs or not but I m sure that it is sufficient for converting Java Card applets to CAP files",
"If this is very difficult solution can i make other application which Can communicate with sim and perform actions .",
"SmartCafe Expert 3.2 72k http : www.smartcardfocus.com shop ilp id 521 smartcafe-expert-3-2-72k p index.shtml is a simple regular Java Card and does not contain SIM Toolkit APIs inside .",
"I am tyring to automate our SIM based airtime loading facilities by using good-ol AT commands to acccess the Sim Toolkit application in our SIMs My question is regarding the AT Command STGR command type 2 get Inkey .",
"Actually not only displaying text also sms ussd sub items doesn t work too. . .. . .. . I have real sim cards from the manufacturer to develop and test some applets with the auth keys .",
"As far as I know JCDK Converter tool is able to convert pure Java Card APIs to CAP files only and it is not useful for SIM APIs right",
"but for applets that contains only Java Card API you can use it simply .",
"Here is some steps I used to generate SIM API library : .. . .. . 1 .",
"Copy the sim directory into your collection of export files directory .",
"How we can convert SIM API contained packages to CAP files",
"However according to example in documentation STIN : response is being sent by sim .",
"where did you download the SIM APIs",
"Just as you need to know the Javacard version of your card you need to know also what version of SIM API the card support .",
"I am new to STK application and I have SIM card module 500 I wonder if there is any way to load STK application through serial monitor and dgbr RX TX port may be used.Thanks in ADVANCE",
"Hello Abraham I did exactly what David said i extract the Annex B Export Files and copied the sim directory into the export files directory api export files everything work normaly now i can convert applets even with SIM API proprietary .",
"I need to know how can I load this applet into my sim-card",
"The SIM toolkit - .. . .. . An app which makes calls to lower-level libraries which in turn interfaces with the modem firmware - .. . .. . https : github.com android platform packages apps stk .. . .. . Somewhat it depends on handset s Radio Interface Layer RIL implementation .",
"Permission for a SIM to send an SMS is normally device dependent I remember the older Nokia phones had a setting that would prompt the user allow SIM to send message .",
"I would like to access the SIM menus on an Android phone using STK .",
"I am trying to write an APK that shows the SIM Menus and perform operations on it .",
"The STK as in Sim-Tool-Kit is actually available in the source code for AOSP .",
"I want to get the menu list of the services given by the SIM .",
"or is there any other way to select the menu of those services provided by the SIM .",
"After further emails it seems SIM cards for development in small quantities i.e .",
"I have a smart card reader gemplus pc sc .. . .. . I have a SIM card and the administration code .. . .. . I installed eclipse and added JAvaCard and SIM API libraries .. . .. . when i try to run the applet i get this error : .. . .. . and a appletviewer window appear with applet non inisialized as a message .",
"I want to develop an app which can access SIM Tool Kit in android mobile .",
"To load the applet into SIM I use ACR1281U as reader and Giesecke Devrient JLoad 2.3.0 as loader .",
"I also receive +STIN replies as per the message flow shown here http : www.scribd.com doc 61188000 196 Messages-Exchanged-During-a-SIM-Toolkit-Operation .",
"If anyone is familiar with the SIM Toolkit and accessing it through the AT Command set then I would appreciate some insight as to why I do not receive a response when an SMS message is sent out .",
"There is a tool in Java Card development kit named converter that you can use it to convert applets to CAP files .",
"I am a beginner in developpement i am trying to load stk applet into Sim card this is my question : .. . .. . I have an STK applet code source .",
"A lot of SIM cards support STK and yes it can be used to send receive information .",
"@takumar they depend on card manufacturers unless they have been clearly defined by the standard that defines the APDU s such as Global Platform .",
"I want to communicate from my Android app to a Java Card applet loaded on a SIM card using APDUs under Android prior to 5.0 4.2.2 for example .",
"What I do not receive is the Unsolicited Response +STCR from the SIM when an SMS message or USSD message is sent out .",
"i am having problems with my applet because of the SIM APIs any idea to resolve this problem",
"However many current Android devices come with a ready-made SEEK implementation that could be used to access the UICC SIM card many devices by Samsung e.g .",
"In my experience most newer devices both Android and IOS are setup such that the SIM can send SMSs in the background without user awareness .",
"ETSI TS 102 223 defines the Provide Local Information components .",
"If yes is there any other way to communicate from Android to SIM applet apart from SEEK",
"You cannot simply add that functionality RIL extensions to access a UICC SIM-based secure element to an app .",
"Download related SIM API archieve for example 3GPP 43.019 v5.6.0 http : www.3gpp.org ftp Specs archive 43 series 43.019 43019-560.zip .. . 2 .",
"Here is the lead up to when the SIM sends an SMS message : .. . .. . You can see that +STIN : 9 means an SMS message is sent out .",
"If you ll use UICC toolkit you have to use EA tag .",
"If I cannot avoid that I really think SEEK is the best or the only way to communicate with my SIM applet can someone share a step-by-step manual for building such an example APK application including communication with the applet",
"Please refer to ETSI 102 226 standard http : www.etsi.org deliver etsi ts 102200 102299 102226 06.08.00 60 ts 102226v060800p.pdf for full details .",
"And my second question I use the sim.toolkit how can I use the uicc toolkit where can I download it",
"For uploading and installing your applets first of all you need to convert your applet to CAP file .",
"instead of that you can simply use Eclipse-JCDE plugin to convert your applets .",
"Moreover for uploading and installing your applets first of all you need to convert that program to a CAP file ."
]
}
|
{
"confidence": [
108.92102813720703,
106.65711975097656,
102.80673217773438,
100.80943298339844,
96.09803771972656,
85.91799926757812,
84.16690826416016,
83.77725219726562,
82.81543731689453,
79.93035888671875,
79.63410949707031,
75.4704360961914,
75.0361557006836,
74.79686737060547,
74.13772583007812,
73.35423278808594,
72.60175323486328,
69.8388900756836,
69.66633605957031,
68.74737548828125
],
"content": [
"Question : I am a beginner in developpement i am trying to load stk applet into Sim card this is my question : .. . .. . I have an STK applet code source . I have a smart card reader gemplus pc sc .. . .. . I have a SIM card and the administration code .. . .. . I installed eclipse and added JAvaCard and SIM API libraries .. . .. . when i try to run the applet i get this error : .. . .. . and a appletviewer window appear with applet non inisialized as a message . please can someone help I need to know how can I load this applet into my sim-card all suggestions are welcome .. . .. . Thank you . Comment : Take a look at these slides : defcon.org images defcon-21 dc-21-presentations Koscher-Butler https : www.defcon.org images defcon-21 dc-21-presentations Koscher-Butler DEFCON-21-Koscher-Butler-The-Secret-Life-of-SIM-Cards-Updated.pdf I think those are useful for you . Comment : As far as I know you CAN T run SIM applets in Eclipse IDE without any simulator . You need to use a SIM card simulator or try to run it on a real SIM card . For uploading and installing your applets first of all you need to convert your applet to CAP file . You need to work with converter tool in Java Card development kit . instead of that you can simply use Eclipse-JCDE plugin to convert your applets . After converting you need to upload this CAP file on the SIM card . You can use some already-written open-source tools . GlobalPlatformPro is one of them . Google it Comment : Thank you for response I have a real SIM card and a reader i think i can load my applet into this sim card.. . But I think that I should add the JCOP plug-in to eclipse in order to get the .cap file . i cant find the package JCOP in internet i wonder if it is availble in free do you have an idea Comment : No you can t find a free version of it . But you can use Eclipse-JCDE plugin instead . download here : sourceforge.net projects eclipse-jcde files http : sourceforge.net projects eclipse-jcde files I don t have any idea that you can use it for convert applets that contain SIM APIs or not but I m sure that it is sufficient for converting Java Card applets to CAP files Comment : I added Eclipse JCDE plugin and it s work i can now create applet convert it to a .cap file and give it an AID ... . .. . Answer : You can t run SIM applets in Eclipse IDE without using a simulator and you need to use a SIM card simulator It can be a plugin for your IDE also or try to run your applet on a real SIM card . Moreover for uploading and installing your applets first of all you need to convert that program to a CAP file . There is a tool in Java Card development kit named converter that you can use it to convert applets to CAP files . Instead of using converter tool directly you can simply use Eclipse-JCDE http : sourceforge.net projects eclipse-jcde files plugin to work with this tool and convert your applets . After converting you need to upload this CAP file on the SIM card . You can use some already-written open-source tools to aim this goal . GlobalPlatformPro https : github.com martinpaljak GlobalPlatformPro is well-documented one . Note that : I m afraid if the Java Card Development kit is able to convert applets with proprietary SIM APIs to CAP files . but for applets that contains only Java Card API you can use it simply . Comment : Exactly i am having problems with my applet because of the SIM APIs any idea to resolve this problem Comment : @DGz Unfortunately no idea . where did you download the SIM APIs I think in some ETSI packages you can find useful tools . There was some question in this community useful for you . Look at SIM tagged questions Comment : Yes It is a ETSI package I downloaded the SIM API packages from this : stackoverflow.com questions 22362327 http : stackoverflow.com questions 22362327 sim-toolkit-application-javacard-development-kit 22471187 22471187 Comment : @DGz I left a comment there.I Hope David help us : Comment : Hello Abraham I did exactly what David said i extract the Annex B Export Files and copied the sim directory into the export files directory api export files everything work normaly now i can convert applets even with SIM API proprietary . Dont hesitate if you have any questions .",
"Question : I have been trying to install a very small sample applet using SIM toolkit features such as uicc.toolkit.ProactiveHandler . After writing the applet and generating a file sampleapp.cap using the converter tool from the Java Card SDK I was unable to install sampleapp.cap file on the Java Card I was using for development . I am using global platform pro and am getting a 6a88 SW in response when trying to load the applet . To build : .. . .. . converter -classdir build -applet APP AID sampleapp.SampleToolkitApp sampleapp PKG AID 1.0 generates build sampleapp javacard sampleapp.cap .. . .. . To install with java card reader insterted : .. . .. . gp -d -v --install build sampleapp javacard sampleapp.cap .. . .. . output : .. . .. . Using the SmartCafe Expert 3.2 72k which I purchased as a Java Card . Also using JavaCard SDK 2.2.1 which is the supported version for that card and have used both 3GPP TS 43.019 v6.0.0 STK API technical specification and ETSI TS 102 241 13.0.0 UICC API for Java Card . The 6A88 SW indicates referenced data not found . Is this something specific to my card in that it hasn t implemented the STK stack Comment : As a follow up : Abraham s answer is correct . After further emails it seems SIM cards for development in small quantities i.e . 1 or 3 are not available to people who aren t big telcos . However there might be some for sale on alibaba ebay or similar . .. . Answer : SmartCafe Expert 3.2 72k http : www.smartcardfocus.com shop ilp id 521 smartcafe-expert-3-2-72k p index.shtml is a simple regular Java Card and does not contain SIM Toolkit APIs inside . So it can t install those applets that used SIM Toolkit APIs . In the loading process the OPEN on the card is trying to make a link between your applet and the used libraries . As it can t find SIM Toolkit library there it returns this error . Comment : I had a sneaking suspicion as much . Time to go shopping again but I appreciate the answer . Do you have any words of wisdom on knowing which Java Cards will support STK APIs e.g . if it says Java card and SIM in the description http : www.smartcardfocus.com shop ilp id 776 smartcafe-expert-6-0-80k-sim p index.shtml is there a good chance it will support Java Card applets and STK APIs",
"Question : I would like to programmatically access an STK SIM Application Toolkit application without using my handset . GSM modem and or handset is attached to my PC via USB and or RS232 connection . I m looking to automate interaction with the STK application . To this end I have no idea whatsoever regarding ways of accomplishing this operation . Any assistance will be highly appreciated . Thanks . Comment : Nobody has any information that can help .. . Answer : While I have not worked directly with SAT STK myself I can give a little information to where you can read more . The wikipedia article http : en.wikipedia.org wiki SIM 5FApplication 5FToolkit contains some information and pointers and the GSM 11.14 standard is available here http : www.3gpp.org ftp Specs html-info 1114.htm . This discussion thread http : www.bladox.com forum viewtopic.php t 236 sid 23485109e323905ee54acdb5ffb8823e contains some practical information .",
"Question : I try to develop a Sim Application Toolkit Applet. . Many simple examples found in internet but no success. . The problem is My menu entry comes in the STK menu but if I select it nothing happens. . I try to display text on event EVENT MENU SELECTION . Actually not only displaying text also sms ussd sub items doesn t work too. . .. . .. . I have real sim cards from the manufacturer to develop and test some applets with the auth keys . I test it on a Android 2.3 NFC smartphone . To load the applet into SIM I use ACR1281U as reader and Giesecke Devrient JLoad 2.3.0 as loader . In the Sim Toolkit is default a menu entry working fine . Here is my sample code. . Hope anybody has an idea. . Maybe some specific-install parameter on loading applet Thanks in advance Kutschka Comment : Where did you get the STK development kit Is it open like the jcdk you can find at Oracle s page .. . Answer : In order to use STK commands you have to properly install your applet . For SIM Toolkit it has to be CA tag in INSTALL MAKE SELECTABLE command . If you ll use UICC toolkit you have to use EA tag . Please refer to ETSI 102 226 standard http : www.etsi.org deliver etsi ts 102200 102299 102226 06.08.00 60 ts 102226v060800p.pdf for full details . Comment : Hello thank you ok after making selectable it works. . I can display the text. . I use the sim.toolkit and have read the Global Platform specification . The selectable install ..etc parameters are ok but I couldn t understand the install tokens the last part of the install parameter . Could you refer me please And my second question I use the sim.toolkit how can I use the uicc toolkit where can I download it Thank you .",
"Question : Hi I have to design a simple application which has to reside in the SIM card of a GSM mobile . But I dont have any idea how to get started . Till now I have only designed apps using J2ME . Do I need Java Card for SIM based app Thanks in advance for the help . .. . Answer : Check out SIM Application Toolkit http : en.wikipedia.org wiki SIM 5FToolkit . Check this simlar question too : http : stackoverflow.com questions 536682 getting-started-with-stk-programming Comment : sorry - but wikipedia isn t helpful at all in this case :",
"Question : null .. . Answer : I want my app to open sim-card toolkit so that a user can make payments via mobile provided in the sim-toolkit application Please help Comment : possible duplicate of Android STK Menu using APK http : stackoverflow.com questions 9227732 android-stk-menu-using-apk",
"Question : I want to build an application that accesses information from the sim-toolkit . My carrier allows you to access services like checking your account balance sending and receiving cash and a whole lot of services . Are there any resources tutorials or even just pointers on how I can access the info in the sim-toolkit . .. . Answer : Not Android specific but there are a whole load of resources referenced in the answers to .. . .. . SIM Application Toolkit development http : stackoverflow.com questions 377877 sim-application-toolkit-development Comment : Hi..i need get ussd code response and that response i need to do some modification.its possible bro. .",
"Question : Im developing an android application for my client . My client is a SIM card distributor in our location . My client wants to access SIM card toolkit to recharge mobile . I dont have any idea how to do it Can anyone guide me in right direction . Network : Airtel .. . .. . I need to access Airtel SIM toolkit via my android application to recharge . .. . Answer : You can use STK service from platform packages . Take a look over the source of STK App that comes default with android . https : github.com android platform packages apps stk .. . An old documentation over this app can be found here http : www.kandroid.org online-pdk guide stk.html Comment : Thanks tushar I will look into the samples . Comment : @AnanthavelSundararajan Hey did you manage to get any help from the source code",
"Question : I would like to programmatically access an STK SIM Application Toolkit application without using my handset . GSM modem and or handset is attached to my PC via USB and or RS232 connection . I m looking to automate interaction with the STK application . To this end I have no idea whatsoever regarding ways of accomplishing this operation . Any assistance will be highly appreciated . Thanks . Comment : Nobody has any information that can help .. . Answer : Have a look at this -- http : www.mobitek-system.com SIMToolKit STK.html .. . .. . Hope it helps",
"Question : I would like to programmatically access an STK SIM Application Toolkit application without using my handset . GSM modem and or handset is attached to my PC via USB and or RS232 connection . I m looking to automate interaction with the STK application . To this end I have no idea whatsoever regarding ways of accomplishing this operation . Any assistance will be highly appreciated . Thanks . Comment : Nobody has any information that can help .. . Answer : This can be done by using AT commands like AT+STGI AT+STGR . AT+STGI is used to open the SIM menu AT+STGR to select the menu . This can also be done prorammatically using Serial Port Interface to GSM Modem . For more info click on the following link : http : www.google.co.in url sa t rct j q esrc s source web cd 1 cad rja ved 0CCIQFjAA url http 3A 2F 2Fwww.telit.com 2Fmodule 2Finfopool 2Fdownload.php 3Fid 3D2086 ei Ko2OUKa3KYyErQe7xIHICA usg AFQjCNFiEu0rPGDlv4AbRCBjEeO8 zbO5Q sig2 v44cGvc0JiqnouQRXcpBmg http : www.google.co.in url sa t rct j q esrc s source web cd 1 cad rja ved 0CCIQFjAA url http 3A 2F 2Fwww.telit.com 2Fmodule 2Finfopool 2Fdownload.php 3Fid 3D2086 ei Ko2OUKa3KYyErQe7xIHICA usg AFQjCNFiEu0rPGDlv4AbRCBjEeO8 zbO5Q sig2 v44cGvc0JiqnouQRXcpBmg",
"Question : null .. . Answer : Recently I m trying to work with SIM Application Toolkit . I want to get the menu list of the services given by the SIM . For doing that as far I know I have to activate the SIM toolkit functionality using AT+STSF 1 AT command which several GSM developer guides say . But While giving that command to set the functionality I m getting an ERROR result . Meanwhile I m using a modem which is STK supported . Whats the actual problem here or is there any other way to select the menu of those services provided by the SIM . I ve googled a lot about it but unfortunately not getting the real answer . Please help me in this regards . Thanks in advance . Comment : Have you entered ATI to check that you are on the right port you should see modem details Have you unlocked the SIM Can you send other AT commands What error-code are you seeing view the error-code by first entering AT+CMEE 1 and then re-trying AT+STSF 1 What happens if you try AT+STSF or AT+STSF Comment : Also see this question stackoverflow.com questions 536682 http : stackoverflow.com questions 536682 getting-started-with-stk-programming Comment : The modem is on the right port i m sure . The other basic AT command work fine such as sending sms . AT+CMEE 1 returns OK AT+STSF AT+STSF returns nothing but the AT+STSF 1 returns ERROR . Actually is there any other per-requisite to activate the STK functionality of the SIM card Comment : Does the 3rd answer in the question linked above help Comment : @HabiburRahman did you get to solve this problem I am also experiencing similar issues .",
"Question : I want to communicate from my Android app to a Java Card applet loaded on a SIM card using APDUs under Android prior to 5.0 4.2.2 for example . My applet is not a SIM Toolkit applet it is a common Java Card applet . Following this post http : stackoverflow.com questions 30325663 send-apdu-commands-to-usim-sim-card-in-android thanks to @vojta and @jean and SEEK https : github.com seek-for-android pool wiki UsingSmartCardAPI I would like to build my app using RIL Radio Interface Layer . Where can I get those libs The only ones I can get is for Nexus - here https : developers.google.com android nexus drivers . If I understand it well I will have a different .apk file for each mobile manufacturer . Am I right If yes is there any other way to communicate from Android to SIM applet apart from SEEK If I cannot avoid that I really think SEEK is the best or the only way to communicate with my SIM applet can someone share a step-by-step manual for building such an example APK application including communication with the applet .. . Answer : You cannot simply add that functionality RIL extensions to access a UICC SIM-based secure element to an app . Instead the mobile phone has to support this functionality . You typically cannot replace the radio interface library telephony framework on the fly you could probably do such kind of patching on rooted devices but still that s not something you would typically integrate in your app . However many current Android devices come with a ready-made SEEK implementation that could be used to access the UICC SIM card many devices by Samsung e.g . GS3 and later Sony HTC and Motorola . When it comes to Nexus devices the Nexus 6 is the first that supports SEEK . On devices that support SEEK i.e . that come with the SEEK smartcard service preinstalled you can use SEEK by linking your application to the SEEK SDK-addon http : seek-for-android.googlecode.com svn-trunk repository 19 addon.xml or by integrating the Open Mobile API directly either as a library-project or by adding the source files into your application you can find the latest version here https : github.com seek-for-android platform packages apps SmartCardService tree android-5.0.0 r3-scapi openmobileapi src org simalliance openmobileapi . You can find a sample application for access to smartcard applications through SEEK here : https : github.com seek-for-android open-mobile-api-sample",
"Question : I m trying to develop a STK application but I don t know where to get the development kit . Right now for Javacard I m getting the one from Oracle s website but it doesn t have the sim.toolkit package . I don t want to buy it from Gemalto etc . Is there any free implementation I have found the ETSI - 3GPP http : www.3gpp.org DynaReport 0319.htm a zip file with some code and libraries but I don t know if this would be enough . Do I generate the cap jar file from the code there Thanks .. . Answer : The files from 3GPP should be enough to complement the Javacard libraries that you ve downloaded from Oracle . Just as you need to know the Javacard version of your card you need to know also what version of SIM API the card support . Check it againsts the 3GPP TS 03.19 that you ve mentioned or you may also check for 3GPP TS 43.019 http : www.3gpp.org DynaReport 43019.htm . Download the correct version . Here is some steps I used to generate SIM API library : .. . .. . 1 . Download related SIM API archieve for example 3GPP 43.019 v5.6.0 http : www.3gpp.org ftp Specs archive 43 series 43.019 43019-560.zip .. . 2 . Extract the 43019-560.zip file .. . 3 . Extract Annex A java.zip under it .. . 4 . Open the extracted Annex A java directory .. . 5 . Zip the sim folder .. . 6 . Rename the sim.zip extension to sim v5.6.0.jar .. . .. . Besides the JAR file you also need to copy the export files required when generating CAP file . 1 . Extract Annex B Export Files.zip .. . 2 . Open Annex B Export Files directory .. . 3 . Copy the sim directory into your collection of export files directory . Hope it helps Comment : How we can convert SIM API contained packages to CAP files As far as I know JCDK Converter tool is able to convert pure Java Card APIs to CAP files only and it is not useful for SIM APIs right Comment : We don t need to convert API to CAP file . What we need to do is to convert class files to CAP file . JCDK is able to convert any APIs . Just make sure that you put the JAR and the EXPort files of the API . Comment : I must add the JAR files to my project . but what about the Exp files where I must put them I know that I must put the in the directory of other export files but where are those Comment : You can add it under java card kit-2 2 2 api export files along with com java javacard and javacardx directory .",
"Question : I m testing a SIM Toolkit application using AT Commands . I have a USB modem that supports SIM Toolkit Class 2 features and is based on the Open AT Firmware . I am able to successfully interact with the SIM Toolkit by using the +STSF +STGI and +STGR commands . I also receive +STIN replies as per the message flow shown here http : www.scribd.com doc 61188000 196 Messages-Exchanged-During-a-SIM-Toolkit-Operation . What I do not receive is the Unsolicited Response +STCR from the SIM when an SMS message or USSD message is sent out . I am using the following Terminal Profile during initialization : .. . .. . Based on the Terminal Profile the Call Control bit is set to 1 or enabled . You will also notice that the Autoresponse is set to 1 . Therefore I receive an +STGI response when a message is sent . Here is the lead up to when the SIM sends an SMS message : .. . .. . You can see that +STIN : 9 means an SMS message is sent out . I believe based on my initialization I should also see an +STCR and there should be some text in the +STGI . If anyone is familiar with the SIM Toolkit and accessing it through the AT Command set then I would appreciate some insight as to why I do not receive a response when an SMS message is sent out . Thanks . Reference : 1 : Wavecom AT Commands Interface Guide for X51a - WM ASW OAT UGD 00016 Comment : Whats your modem .. . Answer : I think the USB modem is busy for doing other task . If you send response with 0x91xx instead of 0x9000 again and again while you don t receive Instruction byte ie 0x12 ie FETCH command . where XX means no of STK byte .",
"Question : null .. . Answer : I have been accessing Sim Toolkit Applications from puTTY terminal using huawei e303f modem and a sim . I am writing AT commands specific to huawei modems . Basically right now I am only trying to navigate sim-toolkit menu . However according to example in documentation STIN : response is being sent by sim . But the same response I am not getting in my puTTY terminal . I am only getting OK response but no STIN : response . Here is my code--- .. . .. . Please Help I am stuck Comment : After AT STGR 0 0 1 3 try AT STGI . This will show you the possible STGI values . Are you supposed to get the result as a SMS",
"Question : I want to build an application that accesses information from the sim-toolkit . My carrier allows you to access services like checking your account balance sending and receiving cash and a whole lot of services . Are there any resources tutorials or even just pointers on how I can access the info in the sim-toolkit . .. . Answer : The SIM toolkit - .. . .. . An app which makes calls to lower-level libraries which in turn interfaces with the modem firmware - .. . .. . https : github.com android platform packages apps stk .. . .. . Somewhat it depends on handset s Radio Interface Layer RIL implementation . NOTE : .. . .. . On many devices the RIL is proprietary so third-party developers only spend time getting the basic stuff like calls SMS data etc working rather than spending all their time reverse-engineering some crazy closed-source hardware . WIKI link that can be helpful - .. . .. . http : en.wikipedia.org wiki SIM Toolkit Comment : Hi..i need get ussd code response and that response i need to do some modification.its possible bro. . Comment : @ved-prakash spent days combing that code . . is there any specific part of it that makes the actual calls to the lower-level libs",
"Question : I am tyring to automate our SIM based airtime loading facilities by using good-ol AT commands to acccess the Sim Toolkit application in our SIMs My question is regarding the AT Command STGR command type 2 get Inkey . In the final dialogue in the Sim toolkit app there is a choice between OK or Cancel How do I tell the SIM that the user pressed the OK key . I have tried to following to no success .. . .. . The documentation for my moden sierra gl6110 says that : For a GET INKEY with format set to Yes No the data shall contain : the value y when the answer is positive the value n when the answer is negative . If anybody could help out It would be greatly appreciated . Comment : did you find any solution to this problem Comment : Sorry this was years ago I believe we abandoned the idea as doing transactions over SIMs was too slow for our needs we commissioned a direct connection api to one of our local telcos to perform transactions instead of using the SIM .. . Answer : Try AT+STGR 1 It is a best way for confirmation .",
"Question : I would like to programmatically access an STK SIM Application Toolkit application without using my handset . GSM modem and or handset is attached to my PC via USB and or RS232 connection . I m looking to automate interaction with the STK application . To this end I have no idea whatsoever regarding ways of accomplishing this operation . Any assistance will be highly appreciated . Thanks . Comment : Nobody has any information that can help .. . Answer : Please note different manufacturers have different AT commands to access the STK functions . And not all of the devices are supporting the running of STK applications . So far i ve managed to get ZTE MF100 working : After opening the following commands come handy : .. . .. . You should open the dev ttyUSBx non-blocking and poll the input for data as the modem is not only answering your requests but also sends status updates to your client . Comment : Love you : D you leave an answer after 3 years Good job . Comment : searched for the solution no answer found . So i did it myself and posted the solution for others who s looking for the same thing .. .",
"Question : null .. . Answer : I am trying to run SIM toolkit application with the help of AT commands with a Huawei Modem . I am OK with : .. . .. . I am suppose to get a SMS once the item is selected but I get no response . What could be wrong . All I see is OK in the terminal .",
"Question : While loading an applet to a sim-card i get Authentication failure error . Because of the limited try of sim-card key i wonder this error means the card is blocked or nor Comment : Depends what status word do you receive Comment : the word is just like authentication failure . What happens when the card is blocked Comment : The ISO 7816 status word SW is normally printed in binary two bytes e.g . 6982 . Comment : There are many reasons why a load application could fail . The status word will give you a hint maybe but these values depend on card manufacturers . Comment : @takumar they depend on card manufacturers unless they have been clearly defined by the standard that defines the APDU s such as Global Platform . ISO 7816-4 which defines most APDU s is however not much help I grant you that . Worst specification ever . .. . Answer : Before loading an applet you must to do an authentication with the Card Manager on Smartcard . In order to do the authentication you have to know the card issuer keys . There is a limit number of attempt to authenticate . Usually this number is 10 . If you exceed this limit the card will block . Once you do a successfully authentication this limit is reset . Comment : Actually i successfully load an applet to the same card before . When i want to load the other applet i get this error . is it necessary to configure the card again and i get this error more than 10 times . Is it possible to repair the card Comment : The amount of attempts is specific to the implementation . The problem with limiting the number of attempts is that it makes the card susceptible to denial-of-service attacks . Not blocking the card will however open the card up to side channel attacks brute forcing keys is normally not feasible . Normally when the card manager is blocked then the game is over unless the card has a proprietary unblocking mechanism implemented . Check the user-manual of the card you are trying to use ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
sim-toolkit
|
UNK_RELATION
|
vips@image-processing@27
|
vips -- libvips is a fast @placeholder library with low memory needs .
|
{
"confidence": [
42.157413482666016,
40.96202087402344,
37.977909088134766,
36.30564498901367,
35.09303665161133,
34.001712799072266,
33.94770050048828,
33.7449836730957,
32.13983154296875,
32.121253967285156,
31.94818878173828,
31.49077606201172,
31.49077606201172,
30.6949462890625,
30.567747116088867,
30.567747116088867,
29.076406478881836,
29.051847457885742,
28.41155242919922,
28.30538558959961,
28.25566864013672,
27.971975326538086,
27.884000778198242,
27.840675354003906,
27.822402954101562,
27.349815368652344,
27.094715118408203,
27.090538024902344,
26.862276077270508,
26.787155151367188,
26.695341110229492,
26.38756561279297,
26.38756561279297,
25.94938087463379,
25.94938087463379,
25.86825180053711,
25.86825180053711,
25.86825180053711,
25.86825180053711,
25.86825180053711,
25.79981231689453,
25.216238021850586,
24.741680145263672,
24.741680145263672,
24.676027297973633,
24.584575653076172,
24.5766658782959,
24.5766658782959,
24.49181365966797,
24.137374877929688,
24.137374877929688,
24.070903778076172,
24.070903778076172,
24.070903778076172,
24.070903778076172,
24.070903778076172,
24.000272750854492,
23.86951446533203,
23.72222900390625,
23.629610061645508,
23.629610061645508,
23.629610061645508,
23.629610061645508,
23.629610061645508,
23.629610061645508,
23.629610061645508,
23.629610061645508,
23.629610061645508,
23.482280731201172,
23.185245513916016,
22.85812759399414,
22.810474395751953,
22.810474395751953,
22.790340423583984,
22.790340423583984,
22.790340423583984,
22.69818878173828,
22.69818878173828,
22.69818878173828,
22.69818878173828,
22.484275817871094,
22.484275817871094,
22.484275817871094,
22.484275817871094,
22.484275817871094,
22.484275817871094,
22.484275817871094,
22.273534774780273,
21.960247039794922,
21.91088104248047,
21.91088104248047,
21.713775634765625,
21.712791442871094,
21.712791442871094,
21.712791442871094,
21.64500617980957,
21.492431640625,
21.492431640625,
21.492431640625
],
"content": [
"I m one of the maintainers of libvips the image-processing library that ruby-vips wraps .",
"ruby-vips uses pkg-config to find libvips .",
"There s the vips tracker as well it s quite active : github.com jcupitt libvips issues https : github.com jcupitt libvips issues",
"The code : .. . .. . will construct a pipeline of image-processing operations : a series of vips add http : www.vips.ecs.soton.ac.uk supported current doc html libvips libvips-conversion.html vips-cast to sum the array then a vips linear http : www.vips.ecs.soton.ac.uk supported current doc html libvips libvips-conversion.html vips-cast to do the divide and finally a vips cast http : www.vips.ecs.soton.ac.uk supported current doc html libvips libvips-conversion.html vips-cast to knock it back to uchar .",
"Yet another family would be based on correlation see spcor http : www.vips.ecs.soton.ac.uk supported current doc html libvips libvips-convolution.html vips-spcor and friends .",
"There are so many Vips : : Image http : www.rubydoc.info gems ruby-vips8 Vips Image methods and only here http : www.vips.ecs.soton.ac.uk supported current doc html libvips libvips-conversion.html vips-bandmean I could find some minimal description on what do they all mean .",
"You could also open an issue on the vips tracker it s a better place for debugging : github.com jcupitt libvips issues https : github.com jcupitt libvips issues",
"I have a fork here that works with current libvips : .. . .. . https : github.com jcupitt ruby-vips .. . .. . There s another ruby-vips example on the main vips site on the benchmarks page .",
"You can solve your problem like this : .. . .. . There s a searchable list of all the vips operators here : .. . .. . http : www.vips.ecs.soton.ac.uk supported current doc html libvips func-list.html .. . .. . The docs for insert are here : .. . .. . http : www.vips.ecs.soton.ac.uk supported current doc html libvips libvips-conversion.html vips-insert .. . .. . Although you seem to be making a new huge image for every iteration in fact behind your back vips will share the images and only create the bits it needs .",
"It creates a log mask vips.ecs.soton.ac.uk supported current doc html libvips http : www.vips.ecs.soton.ac.uk supported current doc html libvips libvips-create.html vips-logmat use from Python as for example Vips.Image.logmat 2 0.1 .",
"You can t really do it in one step from the command-line with vips https : github.com jcupitt libvips issues 325 unfortunately .",
"@lepe I made you a sample program gist.github.com jcupitt 279ac81956b864e03e6c https : gist.github.com jcupitt 279ac81956b864e03e6c VIPS C++ docs here vips.ecs.soton.ac.uk supported current doc html libvips http : www.vips.ecs.soton.ac.uk supported current doc html libvips using-from-cpp.html open an issue on the vips tracker if you have problems",
"When we want to render text an vips image you do something like this with vips text http : www.vips.ecs.soton.ac.uk supported 7.42 doc html libvips libvips-create.html vips-text : .. . .. . But here Arial 12px is a fontconfig string name and assumes that the system has this font installed .",
"vips might be useful for the actual resampling .",
"https : github.com jcupitt libvips issues .. . .. . Edit : there s now an official 64-bit Windows build of libvips and vips.exe it might help : .. . .. . http : www.vips.ecs.soton.ac.uk supported current win32 vips-dev-w64-8.1.1-2.zip",
"I m currently using the following settings : .. . .. . vips sharpen http : www.vips.ecs.soton.ac.uk supported 7.42 doc html libvips libvips-convolution.html vips-sharpen has a number of additional parameters which i m trying to replicate the same sharpening results .",
"This issue has been discussed on the vips issue tracker : .. . .. . https : github.com jcupitt libvips issues 393 .. . .. . But briefly : .. . .. . radius is the same as sigma in IM .",
"It sounds like the vips operation cache : vips keeps the last few operations in memory and reuses the results if it can .",
"The node module sharp uses libvips .",
"Also ruby-vips was released at rubygems : rubygems.org gems ruby-vips http : rubygems.org gems ruby-vips",
"I m the libvips maintainer .",
"I m also willing to use nip2 http : www.vips.ecs.soton.ac.uk index.php title Nip2 tool which also uses libvips https : github.com jcupitt libvips .",
"I m writing a shell script to concatenate some images and I m using the vips http : www.vips.ecs.soton.ac.uk command-line because it has low memory requirements and I intend to work with extremely large images .",
"You could experiment with bandrank http : www.vips.ecs.soton.ac.uk supported current doc html libvips libvips-conversion.html vips-bandrank This does something like a median filter over a set of images : you give it an array of images and at each pixel position it sorts the images by pixel value and selects the Nth one .",
"ruby-vips8 https : github.com jcupitt ruby-vips8 is a wrapper of libvips https : github.com jcupitt libvips .",
"The vips docs have a checklist and an explanation of what happens when Python tried to import vips : .. . .. . http : www.vips.ecs.soton.ac.uk supported current doc html libvips using-from-python.html .. . .. . But briefly you need to : .. . .. . You have several Pythons installed make sure you are invoking the brew one .",
"When I run gem install ruby-vips -v 0.3.9 I get this error : .. . .. . From my simple knowledge maybe this means that the gem cannot find the installation of libvips-dev I know it is required .",
"The C docs are here : .. . .. . http : www.vips.ecs.soton.ac.uk supported 8.0 doc html libvips VipsImage.html vips-image-write-to-memory .. . .. . http : www.vips.ecs.soton.ac.uk supported 8.0 doc html libvips VipsImage.html vips-image-new-from-memory .. . .. . You use them in Python like this : .. . .. . So that s sending the JPEG file off to a string then creating a new image back from the string again .",
".. . .. . UPDATE .. . .. . Much has happened since I asked this question : .. . .. . Ruby-vips is a gem : http : libvips.blogspot.co.uk 2012 06 ruby-vips-launches.html .. . Source code repository is here : https : github.com jcupitt ruby-vips .. . The examples of usage : https : github.com jcupitt ruby-vips wiki Examples .. . Basic concepts of vips image-processing : https : github.com jcupitt ruby-vips wiki Basic-concepts .. . Ruby-vips integration into CarrierWave uploader plugin for Ruby on Rails : https : github.com eltiare carrierwave-vips",
"This is the VIPS command that I was running to convert to DZI : vips dzsave test.jp2 test",
"in fact there is a destructive paste operation : .. . .. . http : www.vips.ecs.soton.ac.uk supported current doc html libvips libvips-draw.html vips-draw-image .. . .. . it s there for paintbox-style programs that really do need to modify images it s not really suitable for general use",
"ruby-vips looks abandoned on github .",
"But how do I do that with vips",
"I would use the vips Python binding http : www.vips.ecs.soton.ac.uk supported current doc html libvips using-from-python.html it s very like PIL but can handle these huge images .",
"You can control the cache size with vips cache set max and friends : .. . .. . http : www.vips.ecs.soton.ac.uk supported current doc html libvips VipsOperation.html vips-cache-set-max .. . .. . From Python it s : .. . .. . To turn off the cache completely .",
"Working tree is on github.com jcupitt ruby-vips https : github.com jcupitt ruby-vips .",
"d11wtq please see github.com eltiare carrierwave-vips https : github.com eltiare carrierwave-vips",
"Nice : .. . .. . UPDATE width VIPS .. . .. . Thanks to Mark s post I give it a try to VIPS http : www.vips.ecs.soton.ac.uk .",
"UPDATE : with VIPS 8.0 .. . .. . Compiled from source vips-8.0 gets practically the same performance than 7.38 : .. . .. . Configure command :",
"Edit : .. . .. . I used ruby-vips to join the images and call the VIPS command-line tool to generate the DZI .",
"It s compiled into the Windows nip2 binary or on linux you have to download a binary plugin and put it in the vips lib area .",
"I say from gi.repository import Vips .",
"VIPS is truly amazing .",
"I m the vips maintainer .",
"Vips.leak set True makes vips report leaked objects on exit and also report peak pixel buffer memory use .",
"I d suggest Python http : www.vips.ecs.soton.ac.uk supported current doc html libvips using-from-python.html .",
"I have looked through some of the documentation available Here http : www.vips.ecs.soton.ac.uk supported current doc html libvips using-from-python.html for Vips but have not found an answer yet .",
"After consulting the Python VIPS manual http : www.vips.ecs.soton.ac.uk supported current doc html libvips using-from-python.html and some trial-and-error I ve come up with my own answer .",
"I need to find the transformation from one to another so that I can resample and compare subtract using VIPS to see the difference .",
"I indeed already heard that compiling libvips on Windows was quite a challenge .",
"Maybe a bit offtopic but what tiff version does libvips use",
"Should I be closing vips after processing a request",
"Vips is not like this though the interface looks similar .",
"I suppose this can t be handled by Vips itself",
"I m now moving to VIPS due to performance reasons .",
"vips picks a radius for you based on the sigma setting .",
"libvips has a fairly large test suite all written in Python and one of the tests is does the entire test suite complete with no memory-leaks",
"VIPS finished the task in 0.0025 second .",
"You should see low memory use and good CPU utilization .",
"If there are alternatives to ruby-vips I would be thankful for them too .",
"Tim s ruby-vips repository hasn t been touched for a while .",
"Hi I m the vips maintainer im vips2jpeg is the old vips7 interface .",
"VIPS has a LRJOIN function but I don t see a sharp implementation of it .",
"I ended up using ruby-vips to make a tiff and dzi .",
"Does Vips look for jpeglib.h in addition to the place I specified",
"This is all because I need Vips http : www.vips.ecs.soton.ac.uk index.php title Build on OS X .",
"usr local lib girepository-1.0 contains Vips-8.0.typelib .",
"I knew something was wrong so I uninstalled Python 3 and Vips .",
"I found another library file named libjpeg.so.62 I tried uninstalling Vips and rebuild again with this file but the problem persists .",
"It was 1120 bytes per call it s 512 with this patch : github.com jcupitt libvips commit https : github.com jcupitt libvips commit 3b32200cc112d55b5ebb87043bc4fcdd9af96223 .. . thanks for raising this issue it s a nice improvement .",
"I am running Elementary OS and I just installed libvips-dev using apt-get .",
"using Vips.leak set True vips only reports peak memory usage when the server is stopped this is also when the Python script exits .",
"The work for each thread is : open a file read a chunk in binary save in .jxr call JxrDecApp to decode and save in .tiff call Vips to read into memory .",
"github.com jcupitt ruby-vips issues 63 https : github.com jcupitt ruby-vips issues 63 looks similar and suggests PKG CONFIG PATH may need to be set manually .",
"After installing the package I configure Vips with .. . .. . When I tried either loading jpeg file or saving jpeg file I had this error message : .. . .. . Did I build the VIPS the wrong way",
"http : www.rubydoc.info gems ruby-vips8 0.1.0 Vips http : www.vips.ecs.soton.ac.uk index.php title VIPS .. . .. . UPDATE : .. . .. . With the answer of the user Aetherus I just realized I don t even need ruby-vips8 to do such task .",
"This is what I have for Vips so far.. .",
"I m wondering how to implement this in VIPS especially these lines",
"That VIPS I would certainly looks interesting .",
"Did you see the vips logmat function",
"I am trying to automatically center a Zoomify image created through VIPS .",
"I m wondering if similar operation can be achieved in VIPS with Python",
"The app takes a request for an image url resizes it using Vips and returns the image .",
"I d leave vips running you ll save the startup shutdown time .",
"I think your problem has to do with the way vips calculates pixels .",
"To make an analogy with programming-languages systems like OpenCV are imperative vips is functional .",
"I used the VIPS command-line tool to create DZI files .",
"I am especially interested in how this can be accomplished using ruby-vips library .. . https : github.com ender672 ruby-vips .. . .. . My goal - to learn how to perform basic image-processing operations using ruby-vips gamma correction brightness tint .. . .. . .. . Any links to working examples more complex than hello world -like one on ruby-vips s github page would be highly appreciated",
"I haven t got a full solution in VIPS that s why I ask about how to perform logical operation and indexing in VIPS .",
"However if one image is RGB and the other is RGBA it fails : .. . .. . How can I convert the input image to RGBA when using vips",
"Not the best solution but as a workaround if the input images are small enough : .. . .. . Essentially I m using ImageMagick to convert to a temporary RGBA file and then using vips on that file .",
"libvips is having to keep two complete lines of tiles in memory so 4096 x 131072 x 3 x 2 pixels which is 3GB straight away .",
"I posted my question here because LibVIPS is an opensource software package that seems to have problems reading my image .",
"Please open an issue on the libvips tracker if you still have problems it s easier to debug stuff there .",
"The sources to vipsthumbnail might be a useful reference : .. . .. . https : github.com jcupitt libvips blob master tools vipsthumbnail.c",
"In Photoshop I think your parameters correspond to Radius 0.5 Amount 25 and Threshold 2 so you may have more chances of getting to VIPS if anyone can do Photoshop to VIPS : -",
"Try running this at the command-line : .. . .. . If you get an error pkg-config is not finding vips correctly .",
"Thought 2 .. . .. . Try experimenting with using VIPS from the command-line to convert your images .",
"I benchmarked it like this : .. . .. . Convert to JPEG with ImageMagick .. . .. . Convert to JPEG with VIPS .. . .. . Mmm seems a good bit faster ."
]
}
|
{
"confidence": [
55.09736633300781,
55.03925704956055,
54.2427864074707,
53.379905700683594,
53.11685562133789,
50.09818649291992,
48.429622650146484,
47.7698974609375,
46.183311462402344,
45.02361297607422,
44.9915657043457,
44.586212158203125,
42.55725860595703,
41.36576843261719,
41.03614044189453,
40.45264434814453,
38.30451965332031,
36.83959197998047,
34.99115753173828,
34.59397888183594
],
"content": [
"Question : How do I apply a function to corresponding pixels of two images of the same resolution Like Photoshop does when covering one layer with another one . What about more than two images If it was Wolfram Mathematica I would take a List of those images and transpose them to get a single image where each pixel would be an array of N pixels -- there I would apply a Mean function to them . But how do I do that with vips There are so many Vips : : Image http : www.rubydoc.info gems ruby-vips8 Vips Image methods and only here http : www.vips.ecs.soton.ac.uk supported current doc html libvips libvips-conversion.html vips-bandmean I could find some minimal description on what do they all mean . So for example : .. . .. . I wanted it to mean calculating an average image but I m not sure what I ve done here . Comment : Could you explain what you are trying to accomplish Are you trying to load a set of images and find the average value of each pixel Comment : @user894763 specifically yes . Imagine them as noisy photos of the same object and that I want to clean it . But in general I would like to know the way to apply any my custom function pixel1 pixel2 .. . pixelN . .. . Answer : ruby-vips8 comes with a complete set of operator overloads http : www.rubydoc.info gems ruby-vips8 0.1.0 Vips Image -instance method so you can just do arithmetic on images . It also does automatic common-subexpression elimination so you don t need to be too careful about ordering or grouping you can just write an equation and it should work well . In your example : .. . .. . +- with a constant always makes a float image so you might want to cast the result down to uchar before saving or maybe ushort or you ll have a HUGE output tiff . You could write : .. . .. . By default new from file opens images for random-access . If your sources images are JPG or PNG this will involve decompressing them entirely to memory or to a disk temp if they are very large before processing can start . In this case you only need to scan the input images from top to bottom as you write the result so you can stream the images through your system . Change the new from file to be : .. . .. . to hint that you will only be using the image pixels sequentially and you should see a nice drop in memory and CPU use . PNG is a horribly slow format I would use tiff if possible . You could experiment with bandrank http : www.vips.ecs.soton.ac.uk supported current doc html libvips libvips-conversion.html vips-bandrank This does something like a median filter over a set of images : you give it an array of images and at each pixel position it sorts the images by pixel value and selects the Nth one . It s a very effective way to remove transitory artifacts . You can use condition .ifthenelse http : www.rubydoc.info gems ruby-vips8 0.1.0 Vips Image ifthenelse-instance method then else to compute more complex functions . For example to set all pixels greater than their local average equal to the local average you could write : .. . .. . You might be curious how vips will execute the program above . The code : .. . .. . will construct a pipeline of image-processing operations : a series of vips add http : www.vips.ecs.soton.ac.uk supported current doc html libvips libvips-conversion.html vips-cast to sum the array then a vips linear http : www.vips.ecs.soton.ac.uk supported current doc html libvips libvips-conversion.html vips-cast to do the divide and finally a vips cast http : www.vips.ecs.soton.ac.uk supported current doc html libvips libvips-conversion.html vips-cast to knock it back to uchar . When you call write to file each core on your machine will be given a copy of the pipeline and they will queue up to process tiles from the source images as they arrive from the decompressor . Each time a line of output tiles is completed a background-thread will use the selected image write library libtiff in my example to send those scanlines back to disk . You should see low memory use and good CPU utilization . Comment : Your hints about existing +- operators are very useful thanks . But what if my function is not that simple as .reduce : + .size but has if-branches etc . Would it be enough easily implementable in Ruby or I d have to jump down to C Comment : You can use .ifthenelse to add branches and there are a whole series of operators to build various local filters . Most things should be easy maybe start another question if you get stuck . There s the vips tracker as well it s quite active : github.com jcupitt libvips issues https : github.com jcupitt libvips issues Comment : I added a silly ifthenelse example .",
"Question : I ve been using Python 3 and Numpy to handle an image-processing task where I m assembling small tiles into a large complete image . I d do this : .. . .. . Where max x max y are the maximum starting coordinates of individual image tiles . Then I d paste images into this large canvas like this : .. . .. . Where jj is an entry of the filelist that records where each tile beblongs . I m wondering if similar operation can be achieved in VIPS with Python .. . Answer : VIPS has no destructive operations : you can only build new images you can t modify existing images . This restriction is why vips can do things like automatic parallelisation and operation caching . Behind the scenes it has some extra machinery to make this less inefficient than it sounds . You can solve your problem like this : .. . .. . There s a searchable list of all the vips operators here : .. . .. . http : www.vips.ecs.soton.ac.uk supported current doc html libvips func-list.html .. . .. . The docs for insert are here : .. . .. . http : www.vips.ecs.soton.ac.uk supported current doc html libvips libvips-conversion.html vips-insert .. . .. . Although you seem to be making a new huge image for every iteration in fact behind your back vips will share the images and only create the bits it needs . Additionally setting the sequential hint on open means vips can stream the sub images in as it writes the final tiff . Run like this : .. . .. . That s pasting in 8 large jpg images . The reported memory use is for pixel buffers it doesn t include all memory . This script will break if you try pasting in a mix of RGB and RGBA images you ll need to add some stuff to handle alpha channels . in fact there is a destructive paste operation : .. . .. . http : www.vips.ecs.soton.ac.uk supported current doc html libvips libvips-draw.html vips-draw-image .. . .. . it s there for paintbox-style programs that really do need to modify images it s not really suitable for general use",
"Question : I m writing a shell script to concatenate some images and I m using the vips http : www.vips.ecs.soton.ac.uk command-line because it has low memory requirements and I intend to work with extremely large images . However if one image is RGB and the other is RGBA it fails : .. . .. . How can I convert the input image to RGBA when using vips I ve been searching through the documentation but I can t find it . I m also willing to use nip2 http : www.vips.ecs.soton.ac.uk index.php title Nip2 tool which also uses libvips https : github.com jcupitt libvips . I m not willing to use ImageMagick or similar tools because the script will end up working with images as large as 20k 20k pixels which take several gigabytes of RAM more than I have now . Comment : I presume you are aware of ImageMagick s stream function that may be useful here.. . imagemagick.org script stream.php http : www.imagemagick.org script stream.php .. . Answer : Not the best solution but as a workaround if the input images are small enough : .. . .. . Essentially I m using ImageMagick to convert to a temporary RGBA file and then using vips on that file . It only works for small files .",
"Question : I am running Elementary OS and I just installed libvips-dev using apt-get . When I run gem install ruby-vips -v 0.3.9 I get this error : .. . .. . From my simple knowledge maybe this means that the gem cannot find the installation of libvips-dev I know it is required . What does this error mean and how do I install this library Comment : github.com jcupitt ruby-vips issues 63 https : github.com jcupitt ruby-vips issues 63 looks similar and suggests PKG CONFIG PATH may need to be set manually . .. . Answer : ruby-vips uses pkg-config to find libvips . Try running this at the command-line : .. . .. . If you get an error pkg-config is not finding vips correctly . You need to check that you have a vips.pc file and that it s on your PKG CONFIG PATH .",
"Question : I m writing a shell script to concatenate some images and I m using the vips http : www.vips.ecs.soton.ac.uk command-line because it has low memory requirements and I intend to work with extremely large images . However if one image is RGB and the other is RGBA it fails : .. . .. . How can I convert the input image to RGBA when using vips I ve been searching through the documentation but I can t find it . I m also willing to use nip2 http : www.vips.ecs.soton.ac.uk index.php title Nip2 tool which also uses libvips https : github.com jcupitt libvips . I m not willing to use ImageMagick or similar tools because the script will end up working with images as large as 20k 20k pixels which take several gigabytes of RAM more than I have now . Comment : I presume you are aware of ImageMagick s stream function that may be useful here.. . imagemagick.org script stream.php http : www.imagemagick.org script stream.php .. . Answer : You can t really do it in one step from the command-line with vips https : github.com jcupitt libvips issues 325 unfortunately . You need to use one of the bindings C C++ nip2 Ruby Python and join several operations together . I d suggest Python http : www.vips.ecs.soton.ac.uk supported current doc html libvips using-from-python.html . You could do : .. . .. . On this laptop Dell XPS-13 I see : .. . .. . That s joining 100 2500x2000 RGB tiffs side-by-side to make a HUGE strip . It runs in about 800MB of ram . I would use TIFF rather than PNG if you can . PNG is extremely slow .",
"Question : I m trying to diagnose why my Python server app is leaking memory . The app takes a request for an image url resizes it using Vips and returns the image . After every request the memory usage grows roughly by the size of the original image . I ve tried using muppy the pympler tracker but each diff after the image open close operations showed only a couple of bytes being used . Could the external C libraries be the cause of the memory leak if so how does one debug that . If it s anything related I m running the python server inside a docker-container .. . Answer : I m the libvips maintainer . It sounds like the vips operation cache : vips keeps the last few operations in memory and reuses the results if it can . This can be a huge performance win in some cases . For a web service you re probably caching elsewhere so you won t want this or you won t want a large cache at least . You can control the cache size with vips cache set max and friends : .. . .. . http : www.vips.ecs.soton.ac.uk supported current doc html libvips VipsOperation.html vips-cache-set-max .. . .. . From Python it s : .. . .. . To turn off the cache completely . You can set the cache to limit by memory use file-descriptor use or number of operations . There are a couple of other useful things you can set to watch resource usage . Vips.leak set True makes vips report leaked objects on exit and also report peak pixel buffer memory use . Vips.cache set trace True makes it trace all operations as they are called and shows cache hits . In your code I would also enable sequential mode . Add access Vips.Access.SEQUENTIAL to your new from buffer . The default behaviour is to open images for full random-access since vips doesn t know what operations you ll end up running on the image . For things like JPG this means that vips will decode the image to a large uncompressed array on open . If the image is under 100mb it ll keep this array in memory . However for a simple resize you only need to access pixels top-to-bottom so you can hint sequential access on open . In this mode vips will only decompress a few scanlines at once from your input and won t ever keep the whole uncompressed image around . You should see a nice drop in memory use and latency . There are a lot of other things you could handle like exif autorotate colour management transparency jpeg shrink-on-load and many others I m sure you know . The sources to vipsthumbnail might be a useful reference : .. . .. . https : github.com jcupitt libvips blob master tools vipsthumbnail.c Comment : using Vips.leak set True vips only reports peak memory usage when the server is stopped this is also when the Python script exits . Should I be closing vips after processing a request Comment : I d leave vips running you ll save the startup shutdown time . The peak memory reporting is handy for testing not so useful in production . The C API has a thing to get current peak memory but it s not exposed to Python I ll add this . libvips has a fairly large test suite all written in Python and one of the tests is does the entire test suite complete with no memory-leaks so hopefully you shouldn t see leaks in your server and it s more of a double-check .",
"Question : I m currently working on a project where I have an image of around 3.9gb . I want to create a google-maps like view for this image which is something LibVIPS can generate by executing the following command : .. . .. . However when doing this some warnings are shown and after that the program crashes : .. . .. . Crash http : i.imgur.com x295u45.png .. . .. . Anyone got a clue what I could do to be able to process an image of this size using Vips Or any other library . I ve done some investigation myself and it seems we need to have BigTiff I ve looked in the VIPS source code and saw the term BigTiff being used a number of times so I suppose it should be supported When opening the image in a tool like VLIV Very Large Image Viewer the image opens fine . Comment : how much memory do you have What windows is this x64 is the vips.exe 32bit some reasons : from win Vista and later the Process scheduler changes a lot and now older programs that does not response inside much smaller time limit will be freezed . you can try run the program in XP SP3 compatibility-mode wtih turned off advanced gfx stuff that sometime helps prevents the program has stop working message . If you got 32bit App then you are limited to 4 or 2 GB of memory depends on used memory manager of the app and allocation of chunks above 1GB can be problem sometimes . Comment : In that case try to find 64bit version of the App if you got 64 bit OS of coarse or cut the image to smaller pieces . As this is not a programing question I vote to close Comment : Thanks for your answer : . There seems to be only a 32-bit version of the program I have 32gb of memory though the reason I would like to not close this topic is because it s not solved . I posted my question here because LibVIPS is an opensource software package that seems to have problems reading my image . I don t really see a difference between including the library in my project or directly calling VIPS.exe . To make my question as simple and focussed as possible I chose to use their version of the compiled program instead of using their library in my own project . Comment : 1 . 32-bit programs runing on x64 windows are running inside WoW64 emulator and have access only up to 4 GB of memory does not matter if you have 8GB or 128GB installed . Some memory managers depends what with your program was compiled can use only 2GB address space . I also found out that sometimes under WoW64 if you want to allocate single block with more than 1 GB in size that sometimes crashes even if you got that much of memory from that 4GB . This site is for questions related to programing . I think you should post this in different Stack Exchange site not sure which may be super user Comment : But if LibVIPS is OpenSource than you could try to build it as 64bit app that is perfectly suitable for this site.. . just download the package source code repository tortoise is good for this then install some 64bit compiler compatible with this package I guess some MSVC++ or GCC and compile 64 bit binaries .. . I am afraid you will need some aditional stuff like frameworks SDK s as nowdays programmers are unable to do standalone stuff instead you need to include countless crappy libs to make helo world example .. . and need tons of crap installed to run exe .. . .. . Answer : I m the libvips maintainer . The vips.exe binary includes bigtiff support and should be easily able to process an image of this size . It s challenging to build yourself on Windows perhaps a week s work I wouldn t try to make your own unless you are very expert . I think the problem is probably your input image . I think it is using very large tiles 4096 x 4096 . libvips is having to keep two complete lines of tiles in memory so 4096 x 131072 x 3 x 2 pixels which is 3GB straight away . I would remake your source image . Use smaller tiles perhaps 512 x 512 and make sure you are writing a bigtiff image . Please open an issue on the libvips tracker if you still have problems it s easier to debug stuff there . https : github.com jcupitt libvips issues .. . .. . Edit : there s now an official 64-bit Windows build of libvips and vips.exe it might help : .. . .. . http : www.vips.ecs.soton.ac.uk supported current win32 vips-dev-w64-8.1.1-2.zip Comment : Ah this explains a LOT . I indeed already heard that compiling libvips on Windows was quite a challenge . I will try to decrease the tile size and recreate the image to see what happens then . Maybe a bit offtopic but what tiff version does libvips use Is that 4.0.6 from remotesensing.org libtiff http : www.remotesensing.org libtiff which follows the Tiff 6.0 spec or is it something completely different Comment : Hi again the windows vips is built by this : github.com jcupitt build-win32 https : github.com jcupitt build-win32 You can see the tiff library here : github.com jcupitt build-win32 blob master 8.1 https : github.com jcupitt build-win32 blob master 8.1 vips.modules L265 So it s libtiff 4.0.6 .",
"Question : I want to use VIPS to append a directory of many smaller images in to one massive image . The node module sharp uses libvips . Is there any way to use sharp to append 2 images together VIPS has a LRJOIN function but I don t see a sharp implementation of it . I really just to know the fastest possible way to have VIPS append a directory of images to one big TIFF . The image is too big to use ImageMagick etc . because of memory issues . Edit : .. . .. . I used ruby-vips to join the images and call the VIPS command-line tool to generate the DZI . I found the code on a ruby-sharp github issue and modified it a bit . The results just the joining part for 550 4096x256 images : Comment : github.com lovell sharp blob master https : github.com lovell sharp blob master CONTRIBUTING.md submit-a-new-feature-request or even better github.com lovell sharp blob master https : github.com lovell sharp blob master CONTRIBUTING.md submit-a-pull-request-with-a-new-feature : Comment : Just wanted to make sure I wasn t missing anything I ended up using ruby-vips to make a tiff and dzi . Sharp is great though I m very interested in running it on AWS Lambda . Comment : Re : AWS Lambda there are some suggestions for how to compile the required static library at github.com lovell sharp issues 169 https : github.com lovell sharp issues 169 .. . Answer : If Ruby or Python are OK you could try them . For example : .. . .. . Joining 100 2000x2500 rgb tif images needs 1gb of memory and 30s or so on this desktop : .. . .. . Most of the time is obviously spent in disc IO . Comment : I had trouble getting the python binding working on Amazon Linux so I used Ruby . Interesting that yours spent so much time in IO . Comment : It s a mechanical HDD and the data wasn t in cache . If I run the command a second time it s only 3s I think .",
"Question : I have looked through some of the documentation available Here http : www.vips.ecs.soton.ac.uk supported current doc html libvips using-from-python.html for Vips but have not found an answer yet . I want to put the image into a numpy 3D array similar to how PIL images automatically get processed this way : .. . .. . . This is what I have for Vips so far.. . So I get that error at the end because I m not pulling the data in the right format from the Vips Image object . Comment : Check the type of the image with type image see if they are both the same . Post an update . Comment : I did and I got gi.overrides.Vips.Image so one is a PIL Image object the other is a Vips image object . Which is fine since I have read in the Vips documentation that the image is stored as a representation of width height bands channels . But I have not been able to find the function that allows me to retrieve the data and put it in an array . I also did this -- In 27 : Vips.Image.guess interpretation im2 Out 27 : enum VIPS INTERPRETATION sRGB of type VipsInterpretation -- So they are also both RGB mode . Comment : Thanks but this didn t seem to work . This was the result-of writing it out like that : In 7 : y x.cast Vips.BandFormat.FLOAT .write to memory In 8 : z Vips.Image.new from memory y x.width x.height x.bands Vips.BandFormat.FLOAT In 9 : arr numpy.asarray z dtype numpy.float32 arr numpy.asarray z dtype numpy.float32 File usr lib python2.7 dist-packages numpy core numeric.py line 460 in asarray return array a dtype copy False order order ValueError : setting an array element with a sequence . .. . Answer : You need .write to memory and .new from memory . The C docs are here : .. . .. . http : www.vips.ecs.soton.ac.uk supported 8.0 doc html libvips VipsImage.html vips-image-write-to-memory .. . .. . http : www.vips.ecs.soton.ac.uk supported 8.0 doc html libvips VipsImage.html vips-image-new-from-memory .. . .. . You use them in Python like this : .. . .. . So that s sending the JPEG file off to a string then creating a new image back from the string again . The string is just the sequence of bytes which make up the image values so for an 8-bit RGB image like this it will start with : .. . .. . R1 G1 B1 .. . .. . where R1 is the value of the red channel for the left-left pixel in the image . Pixels are stored as a series of scanlines top to bottom . Does numpy need float pixels You can ask vips to generate float pixels with x.cast Vips.BandFormat.FLOAT .write to memory .",
"Question : I m currently using ImageMagick to resize and sharpen images . I m now moving to VIPS due to performance reasons . I use imageMagick s unsharpMask http : php.net manual en imagick.unsharpmaskimage.php feature to sharpen a photo after resizing it . I m currently using the following settings : .. . .. . vips sharpen http : www.vips.ecs.soton.ac.uk supported 7.42 doc html libvips libvips-convolution.html vips-sharpen has a number of additional parameters which i m trying to replicate the same sharpening results . Does anyone know an easy way to work out the VIPS translation of the imagemagick unsharp mask settings There must be some sort of formula Comment : In Photoshop I think your parameters correspond to Radius 0.5 Amount 25 and Threshold 2 so you may have more chances of getting to VIPS if anyone can do Photoshop to VIPS : - .. . Answer : This issue has been discussed on the vips issue tracker : .. . .. . https : github.com jcupitt libvips issues 393 .. . .. . But briefly : .. . .. . radius is the same as sigma in IM . vips picks a radius for you based on the sigma setting . x1 corresponds to threshold though the scaling is different . The vips one is calculated on a L difference image I guess the IM one is in the range 0 - 1 so probably multiply the IM value by 100 . y2 and y3 don t seem to have an IM equivalent . They are useful in printing to limit the amount of haloing you get on edges I don t know how useful they d be for screen output . The defaults are probably reasonable but you could try turning them down . m1 is I think always zero in IM you could try making this a small value it can make the transition from flat areas to edge areas less jarring . m2 is equivalent to amount I think though the scaling is probably different . There are some other differences . The vips one just operates on L of CIELAB that is it s just a sharpening of the lightness channel and it s perceptually uniform . The vips one was really designed for offset print work so it s currently hard to make the much gentler adjustments you need for screen . There are some patches going through now which should make vips sharpen more suitable for display output . Summary : there probably isn t a perfect parameter match up since the underlying operators are rather different .",
"Question : I ve had following codes that use Python and OpenCV . Briefly I have a stack of image taken at different focal depth . The codes pick out pixels at every x y position that has the largest Laplacian of Guassian response among all focal depth z thus creating a focus-stacked image . Function get fmap creates a 2d array where each pixel will contains the number of the focal plane having the largest log response . In the following codes lines that are commented out are my current VIPS implementation . They don t look compatible within the function definition because it s only partial solution . and then fmap will be used to pick out pixels from different focal planes to create a focus-stacked image .. . .. . This is done on an extremely large image and I feel VIPS might do a better job than OpenCV on this . However the official documentation provides rather scant information on its Python binding . From the information I can find on the internet I m only able to make image convolution work which in my case is an order of magnitude faster than OpenCV . . I m wondering how to implement this in VIPS especially these lines .. . Answer : After consulting the Python VIPS manual http : www.vips.ecs.soton.ac.uk supported current doc html libvips using-from-python.html and some trial-and-error I ve come up with my own answer . My numpy and OpenCV implementation in question can be translated into VIPS like this : .. . .. . Logical indexing is achieved through ifthenelse method : .. . .. . The syntax is rather flexible . The test condition can be a comparison between two images of the same size or between an image and a value e.g . img1 img2 or img 5 . Like wise value if true can be a single value or a Vips image . Comment : I m the vips maintainer . Your code looks good . Did you see the vips logmat function It might work for you . It creates a log mask vips.ecs.soton.ac.uk supported current doc html libvips http : www.vips.ecs.soton.ac.uk supported current doc html libvips libvips-create.html vips-logmat use from Python as for example Vips.Image.logmat 2 0.1 . It ll generate approximate integer masks and separable masks as well which can give a useful speedup . You can use the string float instead of Vips.Precision.FLOAT if you wish . Comment : part 2 Do you need the index image I d think you could rewrite that as fmap img filtered log response .ifthenelse ii + 1 0 I m probably missing something . I d be curious how speed and memory use compares to opencv if you have any benchmarks you could share . Comment : Try : x Vips.Image.logmat 2 0.1 x.matrixprint to see the log mat that vips makes . Add precision float to get a float version . Comment : Oh you re the maintainer Thanks for your comment . I just began using VIPS last week and still have trouble finding where everything is . I couldn t quite understand the equation regarding the log kernel . Is it the same as mine I ve just posted it in my question . I don t need index image so what you suggested should be better . Comment : Image axes are limited to 2 31 pixels to the square of that so 2 62 . I regularly process 200 000 x 200 000 pixel slide images on my laptop . It can do these huge images on 32-bit machines too though that s less relevant these days thank goodness .",
"Question : I am completely new to image-processing . I know nothing about what is JPEG internally and how it works . I wonder if I can find somewhere piece of ruby code performing following simple operation : .. . .. . 1 . Open jpeg file . 2 . Iterate through each pixel and set it s color to fx green . 3 . Write result to another file . I am especially interested in how this can be accomplished using ruby-vips library .. . https : github.com ender672 ruby-vips .. . .. . My goal - to learn how to perform basic image-processing operations using ruby-vips gamma correction brightness tint .. . .. . .. . Any links to working examples more complex than hello world -like one on ruby-vips s github page would be highly appreciated If there are alternatives to ruby-vips I would be thankful for them too . .. . .. . UPDATE .. . .. . Much has happened since I asked this question : .. . .. . Ruby-vips is a gem : http : libvips.blogspot.co.uk 2012 06 ruby-vips-launches.html .. . Source code repository is here : https : github.com jcupitt ruby-vips .. . The examples of usage : https : github.com jcupitt ruby-vips wiki Examples .. . Basic concepts of vips image-processing : https : github.com jcupitt ruby-vips wiki Basic-concepts .. . Ruby-vips integration into CarrierWave uploader plugin for Ruby on Rails : https : github.com eltiare carrierwave-vips Comment : ruby-vips looks abandoned on github . Keep that in mind especially if you want to use later versions of ruby . Comment : Working tree is on github.com jcupitt ruby-vips https : github.com jcupitt ruby-vips . Also ruby-vips was released at rubygems : rubygems.org gems ruby-vips http : rubygems.org gems ruby-vips Comment : thanks . Actually looks pretty good . Will have to have a play around with it . We really need something that allows drawing onto a canvas too currently we re leaning towards Cairo for that .. . I wish there was more available like this when it comes to image-processing in ruby . .. . Answer : I m one of the maintainers of libvips the image-processing library that ruby-vips wraps . Tim s ruby-vips repository hasn t been touched for a while . I have a fork here that works with current libvips : .. . .. . https : github.com jcupitt ruby-vips .. . .. . There s another ruby-vips example on the main vips site on the benchmarks page . This example loads an image crops 100 pixels off every edge downsizes by 10 sharpens and saves again . http : www.vips.ecs.soton.ac.uk index.php title Speed and Memory Use ruby-vips .. . .. . To set the red and blue channels to zero and just leave a green image is this what you mean you might multiply R and B by zero and G by 1 . A handy operation for this is lin meaning linear transform . http : rubyvips.holymonkey.com classes VIPS Image.html M000123 .. . .. . sets every pixel in out to be .. . .. . It lets you give an array of numbers for a and b and will use one array element per image channel . So therefore : .. . .. . To change image gamma you might try something like : .. . .. . Though that ll be a bit slow it ll call pow three times for each pixel it d be much faster to make a lookup table run the pow on that then map the image through the table : Comment : Regarding ruby-vips vs . RMagick : vips advantages would be much lower memory use by a factor of 100 on the benchmark above for example much faster a factor of 5 on that benchmark and a larger more flexible range of image-processing operations and pixel formats rmagick only supports 1 - 5 image channels for example and struggles with floating-point images . rmagicks advantages would be wide usage much more comprehensive documentation and a set of built-in operations that match common use cases for example vips has no built-in porter-duff compositing you need to roll your own . Comment : Great answer Thanks Comment : I might have to look into patching CarrierWave to use this as an alternative to RMagick . I don t hold much love for RMagick and this looks better thanks . Comment : d11wtq please see github.com eltiare carrierwave-vips https : github.com eltiare carrierwave-vips",
"Question : I m writing a Python 3.4.3 program that uses VIPS 8.1.1 on Ubuntu 14.04 LTS to read many small tiles using multiple threads and put them together into a large image . In a very simple test : .. . .. . I get correct result . In my full program the work for each thread involves read binary from a source file turn them into tiff format read the image data and insert into canvas . It seems to work but when I try to examine the result I ran into trouble . Because the image is extremely large 50000 100000 pixels I couldn t save the entire image in one file so I tried .. . .. . This takes extremely long time and the resulting jpeg has only black pixels . If I do resize three times the program get killed . I also tried .. . .. . This results in error message segmentation-fault core dumped but it does save an image . There are image contents in it but they seem to be in the wrong place . I m wondering what the problem could be Below are the codes for the complete program . The same logic was also implemented using OpenCV + sharedmem sharedmem handled the multiprocessing part and it worked without a problem . The above module imported as mcv is called in the driver script : .. . .. . To examine the content I used Comment : I thought of another possible problem : vips uses a recursive algorithm to walk pipelines and work out which bit to calculate next . If your pipeline is extremely long and the C stack on your platform is rather small you can get a C stack-overflow . Could that be the problem I would edit your question to include a complete example program that fails plus a description of your platform and the vips version . You could also open an issue on the vips tracker it s a better place for debugging : github.com jcupitt libvips issues https : github.com jcupitt libvips issues Comment : Thanks for your comment I ll have to read on C stack-overflow . I m not quite sure what it means.. . I ve included complete program here . The file to be read from contains 5000 small tiles saved in .jxr format . .. . Answer : I think your problem has to do with the way vips calculates pixels . In systems like OpenCV you perform a series of operations on images . Each operation does a large number of calculations and modifies memory in some way . Vips is not like this though the interface looks similar . In vips when you perform an operation on an image you are actually just adding a new section to a pipeline . It s only when you finally connect the output to some sink a file on disk or a region of memory you want filled with image data or an area of the display that vips will actually do any calculations . vips uses a recursive algorithm to run a large set of workers up and down the whole length of the pipeline evaluating all of the operations you created at the same time . To make an analogy with programming-languages systems like OpenCV are imperative vips is functional . The good thing about the way vips does things is that it can see the whole pipeline at once and it can optimise away most of the memory use and make good use of your CPU . The bad thing is that long sequences of operations can need large amounts of memory to evaluate whereas with systems like OpenCV you are more likely to be bounded by image-size . In particular the recursive system used by vips to evaluate means that pipeline length is limited by the C stack about 2MB on many operating systems . Here s a simple test program that does more or less what you are doing : .. . .. . You run it like this : .. . .. . It loads k2.jpg a 2k x 2k JPG image repeats that image into a 2 x 2 grid and saves a small part of it . This program will work well with very large images try removing the crop and running as : .. . .. . and it ll copy the huge tiff image 100 times into a REALLY huge tiff file . It ll be quick and use little memory . However this program will become very unhappy with small images being copied many times . For example on this machine a Mac I can run : .. . .. . But this fails : .. . .. . With a 28 x 28 output that s 784 tiles . The way we ve built the image repeatedly inserting a single tile that s a pipeline 784 operations long -- long enough to cause a stack-overflow . On my Ubuntu laptop I can get pipelines up to about 1 400 operations long before it starts failing . There s a simple way to fix this program : build a wide rather than a deep pipeline . Instead of inserting a single image each time make a set of strips then join the strips . Now the pipeline depth will be proportional to the square-root of the number of tiles . For example : .. . .. . Now I can run : .. . .. . Which is 40 000 images joined together . Comment : Thanks for the response I figured I need to do the threading myself because these small images are actually in .jxr format . The work for each thread is : open a file read a chunk in binary save in .jxr call JxrDecApp to decode and save in .tiff call Vips to read into memory . I suppose this can t be handled by Vips itself Comment : Can you get the jxr decoder to write the uncompressed byte array to memory If you can you could skip the tiff save load and make a vips image directly . Comment : That s my next step . Now the openly available jxrlib only reads and writes files . I ll have to understand the jxr decoder and modify it so it can directly decode binary-data into memory . But even if I do so don t I have to handle the threading myself And still I m not sure what went wrong in my implementation I posted. . Comment : Your example should work and it sounds like it does but you re still threading something that doesn t need to be threaded . I would make your source tiffs in parallel but build the vips pipeline single-threaded . Also use bigtiff : canvas.write to file complete.tif bigtiff True . Comment : I had a poke about in the code and found a way to slim down the stack use per operation . It was 1120 bytes per call it s 512 with this patch : github.com jcupitt libvips commit https : github.com jcupitt libvips commit 3b32200cc112d55b5ebb87043bc4fcdd9af96223 .. . thanks for raising this issue it s a nice improvement .",
"Question : I m trying to compare two images and see if they are identical . They should have the same dimensions may have the same size but the content will-change sometimes I want to be able to detect it . I have two ways of doing it in my case : One is to get the number of colors in each image . In my case the number of colors change if the images are different .. . .. . Or to indeed compare the files using a image processor . I ve opted to use ruby-vips8 because it s known to be a lot faster than RMagick and in my case performance is a thing . I made some scratching with the ruby-vips8 but I can t find a way to compare two images or to get the number of colors so I can compare using this method . Any help ruby-vips8 https : github.com jcupitt ruby-vips8 is a wrapper of libvips https : github.com jcupitt libvips . http : www.rubydoc.info gems ruby-vips8 0.1.0 Vips http : www.vips.ecs.soton.ac.uk index.php title VIPS .. . .. . UPDATE : .. . .. . With the answer of the user Aetherus I just realized I don t even need ruby-vips8 to do such task . I m comparing the files as String as he suggested . It s working great for me and it s also really fast . I don t marked his answer as the best because my question asked if it s possible to do so using the ruby-vips8 . Was a lib specific scenario so in such conditions the user894763 answer is more appropriated . Comment : It looks like vips supports histograms and comparing histograms is one way to compare images stackoverflow.com questions 6499491 comparing-two-histograms https : stackoverflow.com questions 6499491 comparing-two-histograms . OpenCV can provide more sophisticated ways to compare images stackoverflow.com questions 11541154 https : stackoverflow.com questions 11541154 checking-images-for-similarity-with-opencv .. . Answer : Are the same and look the same are two different things . If you want to verify if 2 images are the same then just read them into 2 strings and compare them . Or if your images are large then just read them byte by byte and compare . Verifying if 2 images look the same is a very hard job . For example a PNG and a JPG may look identical but they almost never have the same pixel array . Even the 2 images are of the same type they may look the same but actually the second image a one-pixel offset comparing to the first one or the saturation between the 2 images are a little bit different or .. . I ve never done that and I m not sure if it is doable . Comment : Thank you I m actually using your method of comparing the files as strings . Turns out that worked better for me . I ll update my post explaining why I did not used your post as the best answer . Thank you again .",
"Question : When we want to render text an vips image you do something like this with vips text http : www.vips.ecs.soton.ac.uk supported 7.42 doc html libvips libvips-create.html vips-text : .. . .. . But here Arial 12px is a fontconfig string name and assumes that the system has this font installed . How do I let the program use a custom truetype font file e.g . Roboto.ttf Trying .. . .. . probably won t work . We could put the Roboto.ttf file in the system directory for example in Ubuntu you put the file in usr share fonts truetype but the code makes the assumption that this font exists which is not a solution to write machine-independent program . So I wonder if there is a better way to do this so that we can ship the executables with the font file together . .. . Answer : vips uses standard fontconfig font names so you need to set up fontconfig to add your custom font to its search path . From the manual https : www.freedesktop.org software fontconfig fontconfig-user.html it looks like you can set the environment variable XDG CONFIG HOME to point to your new font then from go refer to that font as Roboto 48pt for example . It s easy to test from the command-line . Try : .. . .. . And make sure you see two different images . Comment : Thanks for pointing out the env variable . I found this link : superuser.com questions 365847 http : superuser.com questions 365847 where-should-the-xdg-config-home-variable-be-defined . So the default XDG CONFIG HOME value is HOME .config and that s where I should put the ttf file .",
"Question : I m trying to compare two images and see if they are identical . They should have the same dimensions may have the same size but the content will-change sometimes I want to be able to detect it . I have two ways of doing it in my case : One is to get the number of colors in each image . In my case the number of colors change if the images are different .. . .. . Or to indeed compare the files using a image processor . I ve opted to use ruby-vips8 because it s known to be a lot faster than RMagick and in my case performance is a thing . I made some scratching with the ruby-vips8 but I can t find a way to compare two images or to get the number of colors so I can compare using this method . Any help ruby-vips8 https : github.com jcupitt ruby-vips8 is a wrapper of libvips https : github.com jcupitt libvips . http : www.rubydoc.info gems ruby-vips8 0.1.0 Vips http : www.vips.ecs.soton.ac.uk index.php title VIPS .. . .. . UPDATE : .. . .. . With the answer of the user Aetherus I just realized I don t even need ruby-vips8 to do such task . I m comparing the files as String as he suggested . It s working great for me and it s also really fast . I don t marked his answer as the best because my question asked if it s possible to do so using the ruby-vips8 . Was a lib specific scenario so in such conditions the user894763 answer is more appropriated . Comment : It looks like vips supports histograms and comparing histograms is one way to compare images stackoverflow.com questions 6499491 comparing-two-histograms https : stackoverflow.com questions 6499491 comparing-two-histograms . OpenCV can provide more sophisticated ways to compare images stackoverflow.com questions 11541154 https : stackoverflow.com questions 11541154 checking-images-for-similarity-with-opencv .. . Answer : There must be hundreds of ways of measuring image similarity it s a huge field . They vary mostly in what features of an image they try to consider . A family of similarity measures are based on histograms as Scott said . These techniques don t consider how your pixels are arranged spatially so your two images could be considered the same if one has been rotated 45 degrees . They are also fast since finding a histogram is quick . A simple histogram matcher might be : find the histograms of the two input images normalise so the two hists have the same area .. . this removes differences in image-size subtract square and sum . Now a small number means a good match larger numbers mean increasingly poor matches . In ruby-vips8 this would be : .. . .. . On my desktop this runs in about 0.5s for a pair of 2k x 3k JPEG images . Many matchers are based on spatial distribution . A simple one is to divide the image into an 8x8 grid like a chess-board take the average pixel value in each square then set that square to 0 or 1 depending on whether the average of the square is above or below the average of the whole image . This gives something like a fingerprint for the image which you can store neatly in a 64-bit int . It s insensitive to things like noise scale changes or small rotations . To test two images for similarity XOR their fingerprints and count the number of set bits in the result . Again 0 would be a perfect match larger numbers would be less good . In ruby-vips8 you could code this as : .. . .. . Again this runs in about 0.5s for a 2k x 3k JPEG . Yet another family would be based on correlation see spcor http : www.vips.ecs.soton.ac.uk supported current doc html libvips libvips-convolution.html vips-spcor and friends . They might be more useful for finding a small area of an image . Many fancier image similarity metrics will take a variety of algorithms run them all and use a set of weighting factors to compute an overall similarity measure . Comment : Very good explanation thank you . I ll update my post about my problem . But you sure have the best and the right answer .",
"Question : I need to convert many TIFF images to JPEG per second . Currently I m using libmagick++ Q16 . I m in the process of compiling ImageMagick http : www.imagemagick.org Q8 as I read that it may improve performance specially because I m only working with 8bit images . CImg http : cimg.sourceforge.net also looks like a good option and GraphicsMagick http : www.graphicsmagick.org index.html claims to be faster than ImageMagic . I haven t tested either of those yet but I was wondering if there are any other alternatives that could be faster than using ImageMagick Q8 I m looking for a Linux only solution . UPDATE width GraphicsMagick ImageMagick Q8 .. . .. . Base comparison see comment to Mark : 0.2 secs with ImageMagick Q16 .. . .. . I successfully compiled GraphicsMagick with Q8 but after all it seems about 30 slower than ImageMagick 0.3 secs . After compiling ImageMagick with Q8 there was a gain of about 25 0.15 secs . Nice : .. . .. . UPDATE width VIPS .. . .. . Thanks to Mark s post I give it a try to VIPS http : www.vips.ecs.soton.ac.uk . Using the 7.38 version that is found in Ubuntu Trusty repositories : .. . .. . Very nice : .. . .. . I also tried with the 7.42 from ppa : dhor myway but it seems slighlty slower : .. . .. . I will try to compile VIPS from source and see if I can beat that time . Well done Mark UPDATE : with VIPS 8.0 .. . .. . Compiled from source vips-8.0 gets practically the same performance than 7.38 : .. . .. . Configure command : Comment : How big are the TIFF images - in bytes and in pixel dimensions Are you doing any other processing on the images other than comnversion to JPEG What happens downstream to the images Where are they coming from What does your code look like currently What performance are you currently achieving What performance do you need Comment : Thanks Mark . The images are 3288x1152 . no other processing besides converting them . Images are then stored into a HDD . The raw data comes from a camera cropped . This is how the code looks like http : pastebin.com WFCnGhh0 . In a testing machine quad core is converting one image in 0.2 seconds . I need to improve that time before moving to production long story . Comment : What are the original image sizes in bytes please Comment : around 15MB each file . Comment : What JPEG quality level do you want for your output Should the JPEGs have the same dimensions as the TIFFs I assume yes Do all TIFFs have identical dimensions .. . Answer : I have a few thoughts.. . .. . .. . Thought 1 .. . .. . If your input images are 15MB and for argument s sake your output images are 1MB you are already using 80MB s of disk bandwidth to process 5 images a second - which is already around 50 of what a sensible disk might sustain . I would do a little experiment with using a RAMdisk to see if that might help or an SSD if you have one . Thought 2 .. . .. . Try experimenting with using VIPS from the command-line to convert your images . I benchmarked it like this : .. . .. . Convert to JPEG with ImageMagick .. . .. . Convert to JPEG with VIPS .. . .. . Mmm seems a good bit faster . YMMV of course . Thought 3 .. . .. . Depending on the result-of your test on disk speed if your disk is not the limiting factor consider using GNU Parallel to process more than one image at a time if you have a quad core CPU . It is pretty simple to use and I have always had excellent results with it . For example here I sequentially process 32 TIFF images created as above : .. . .. . Now I do exactly the same with GNU Parallel doing 16 in parallel at a time .. . .. . So that s now 13 images per second rather than 2.7 per second . Comment : Hi I m the vips maintainer im vips2jpeg is the old vips7 interface . Try time vips copy input.tif output.jpg the new vips8 syntax it should be a bit quicker . Comment : Hello and thank you for your inputs - it is a little faster . I have edited my post accordingly . Comment : As usual very good thoughts and advice by Mark Comment : @MarkSetchell : Thanks . Yes the way I m testing it is for example : time convert input.tiff -quality 95 output.jpg I compared my compiled version in C++ vs the IM binary and it was pretty much the same times . Comment : @lepe I made you a sample program gist.github.com jcupitt 279ac81956b864e03e6c https : gist.github.com jcupitt 279ac81956b864e03e6c VIPS C++ docs here vips.ecs.soton.ac.uk supported current doc html libvips http : www.vips.ecs.soton.ac.uk supported current doc html libvips using-from-cpp.html open an issue on the vips tracker if you have problems",
"Question : I used brew to install python-2.7 and 3.5 on Mac . SOMEHOW I have this site-packages directory usr local lib python2.7 site-packages . But every python interpreter on the system points to every other site-packages directory EXCEPT this one . How do I use THIS site-packages directory This is all because I need Vips http : www.vips.ecs.soton.ac.uk index.php title Build on OS X . I d installed this before but now I m using a different machine and I can t figure out how on Earth I got it to work before . .. . Answer : The vips docs have a checklist and an explanation of what happens when Python tried to import vips : .. . .. . http : www.vips.ecs.soton.ac.uk supported current doc html libvips using-from-python.html .. . .. . But briefly you need to : .. . .. . You have several Pythons installed make sure you are invoking the brew one . Make sure that that Python has a gi repository containing the Vips.py overrides . Make sure you have a Vips-8.0.typelib file in usr local lib lib girepository-1.0 . Comment : I said : I used brew to install python-2.7 and 3.5 on Mac . So yes brew is installed . Now.. . Let me put it this way -- when running Python code it cannot locate the Vips file . I say from gi.repository import Vips . I HAVE the Vips code here usr local lib python2.7 site-packages . So why can t it find it My PATH is set with usr local lib first in the path . What should I do to troubleshoot this Because there really seems to be no logical explanation as to why the python interpreter cannot find the file that is clearly in this site-packages directory . Comment : I updated the answer does that help Maybe also add the exact error message you are seeing to your question . Comment : OK yes that helps . Thanks . usr local lib girepository-1.0 contains Vips-8.0.typelib . And I have usr local lib gobject-introspection . When you say Make sure that that Python has a gi repository you mean in Python s site-packages directory right If so then usr local lib python2.7 site-packages gi overrides contains Vips.py and Vips.pyo . So far so good . Make sure I m invoking the right Python . python2.7 is the one that has gi . When I use that python and invoke from gi.overrides import Vips it says ImportError : No module named overrides . Comment : When I use python3 which should not work the error is : File usr local lib python3.5 site-packages gi init .py line 39 print url SyntaxError : Missing parentheses in call to print . So it s finding a gi in that directory but it only has init .py . When I say pip3 install --upgrade gi it says Requirement already up-to-date : gi in usr local lib python3.5 site-packages . Comment : And thank you again for helping me with this .",
"Question : I have looked through some of the documentation available Here http : www.vips.ecs.soton.ac.uk supported current doc html libvips using-from-python.html for Vips but have not found an answer yet . I want to put the image into a numpy 3D array similar to how PIL images automatically get processed this way : .. . .. . . This is what I have for Vips so far.. . So I get that error at the end because I m not pulling the data in the right format from the Vips Image object . Comment : Check the type of the image with type image see if they are both the same . Post an update . Comment : I did and I got gi.overrides.Vips.Image so one is a PIL Image object the other is a Vips image object . Which is fine since I have read in the Vips documentation that the image is stored as a representation of width height bands channels . But I have not been able to find the function that allows me to retrieve the data and put it in an array . I also did this -- In 27 : Vips.Image.guess interpretation im2 Out 27 : enum VIPS INTERPRETATION sRGB of type VipsInterpretation -- So they are also both RGB mode . Comment : Thanks but this didn t seem to work . This was the result-of writing it out like that : In 7 : y x.cast Vips.BandFormat.FLOAT .write to memory In 8 : z Vips.Image.new from memory y x.width x.height x.bands Vips.BandFormat.FLOAT In 9 : arr numpy.asarray z dtype numpy.float32 arr numpy.asarray z dtype numpy.float32 File usr lib python2.7 dist-packages numpy core numeric.py line 460 in asarray return array a dtype copy False order order ValueError : setting an array element with a sequence . .. . Answer : Expanding on the answer from user894763 .. . .. . output : .. . .. . This was on a 2500x2500 8bit color .jpg image . Comment : Awesome man this worked Now I do have a question however you end up doing 3 arrays and 3 transforms I fear the speed boost gained with Vips will be lost if I have to do all this additional computation . Is there a way to get the D array in one line Comment : @alfredox check the edit to my answer . I used my previous code because I needed the intermediate arrays . Reshaping the 1d array directly to 3d is a bit faster . Comment : Awesome thanks man",
"Question : I built VIPS 8.1.1 with .. . .. . I downloaded the package from the sourceforge project website http : sourceforge.net projects libjpeg-turbo files 1.4.2 . After installing the package I configure Vips with .. . .. . When I tried either loading jpeg file or saving jpeg file I had this error message : .. . .. . Did I build the VIPS the wrong way Should I build with other version of libjpeg-turbo Or is it other problem I found another library file named libjpeg.so.62 I tried uninstalling Vips and rebuild again with this file but the problem persists . .. . Answer : That message is produced by libjpeg if the headers don t match the library . It sounds like you ve built against .62 headers but tried to run with the .80 library binary . Check your system for old header-files and remove them . Maybe apt-get remove libjpeg-dev Comment : The folder I specified for jpeg-libcludes has only jpgelib.h for the libjpge-turbo-official I installed . Its location is different from any other jpge library existing on the computer . I can t remove those anyways because there are needed by some other program . Does Vips look for jpeglib.h in addition to the place I specified Comment : gcc will always search every directory on -I for jpeglib.h . Check the exact flags that are reaching the compiler to see which one it s picking up . You should be able to remove the -dev version of the package it s only got the headers in no program needs it at runtime . Comment : You don t say what platform you are using but you probably have a platform libjpeg-turbo . I would use that rather than building your own . It has the same ABI so it s simple drop-in replacement . Comment : I m using ubuntu 14.04 LTS . Indeed there is already a libjpeg-turbo on it . Where can I see the which jpeglib.h the compiler picked up Comment : Oh perfect . It s the same headers just remove the libjpeg-turbo you built don t give vips any flags and it ll pick up the turbo version automatically . Use ldd to verify which library it s linking to at runtime ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
image-processing
|
UNK_RELATION
|
sequelize.js@orm@51
|
sequelize.js -- the sequelize library provides an @placeholder object-relational-mapper for node.js written entirely in javascript .
|
{
"confidence": [
39.527523040771484,
35.26436996459961,
32.91337966918945,
32.74073028564453,
32.01482009887695,
31.083837509155273,
31.083837509155273,
31.083837509155273,
31.006107330322266,
29.66663932800293,
29.627925872802734,
29.491775512695312,
29.465728759765625,
28.187793731689453,
28.187793731689453,
28.157176971435547,
27.946441650390625,
27.402807235717773,
27.364093780517578,
27.305675506591797,
27.03632354736328,
27.014556884765625,
26.767959594726562,
26.732254028320312,
26.593555450439453,
26.28136444091797,
26.209285736083984,
26.093250274658203,
25.9791202545166,
25.961132049560547,
25.849763870239258,
25.763343811035156,
25.566387176513672,
25.566387176513672,
25.566387176513672,
25.566387176513672,
25.500225067138672,
25.500225067138672,
25.500225067138672,
25.500225067138672,
25.500225067138672,
25.486644744873047,
25.44478988647461,
25.2449951171875,
25.2449951171875,
25.079601287841797,
25.079601287841797,
25.079601287841797,
25.01279067993164,
25.01279067993164,
24.95651626586914,
24.869600296020508,
24.869600296020508,
24.869600296020508,
24.869600296020508,
24.869600296020508,
24.84992218017578,
24.84514808654785,
24.84514808654785,
24.844717025756836,
24.844717025756836,
24.844717025756836,
24.767032623291016,
24.65624237060547,
24.612266540527344,
24.468421936035156,
24.468421936035156,
24.458290100097656,
24.458290100097656,
24.177310943603516,
24.05205726623535,
24.05205726623535,
24.05205726623535,
24.05205726623535,
24.05205726623535,
24.05205726623535,
23.88457679748535,
23.8649845123291,
23.8649845123291,
23.752458572387695,
23.565269470214844,
23.565269470214844,
23.565269470214844,
23.565269470214844,
23.565269470214844,
23.565269470214844,
23.565269470214844,
23.565269470214844,
23.2489013671875,
23.241668701171875,
23.241668701171875,
23.241668701171875,
23.241668701171875,
23.241668701171875,
23.241668701171875,
23.241668701171875,
23.241668701171875,
23.241668701171875,
23.116411209106445,
23.09793472290039
],
"content": [
"Is this possible with Node.js ActionHero.js and Sequelize.js as well",
"node.js sequelize and pug .",
"see https : github.com sequelize sequelize issues 339 .. . .. . Sequelize provides methods to read the existing table names of a database .",
"I am currently thinking about the right ConnectionPool size in a production environment using node.js and sequelize as the ORM mapper .",
"How can I do this in Node.js Sequelize",
"This issue on github lead me to this solution : github.com sequelize sequelize issues 5583 https : github.com sequelize sequelize issues 5583",
"For others to follow : github.com sequelize sequelize issues 2209 https : github.com sequelize sequelize issues 2209",
"github.com sequelize sequelize issues https : github.com sequelize sequelize issues 3095 issuecomment-149277205",
"I m wanting to start using Sequelize a module that allows ORM for mysql in node.js .",
"You can also set options.underscored : true on your Mode or Sequelize object .",
"issue : https : github.com sequelize sequelize issues 348 .. . .. . i use [email protected]",
"I m using Sequelize in node.js to save open and close times .",
"What type of Object is returned by Sequelize",
"Does JSData replace or complement Sequelize.js",
"Does JSData replace or complement Sequelize.js",
"I am new to Node.js and Sequelize I have mostly a C background EF WebApi etc and I am trying to setup a simple Node.js project with sequelize .",
"Is it a sequelize model or just an ordinary JS object",
"Instead of updating the object Sequelize tells me id must be unique .",
"You can use sequelize-auto https : github.com sequelize sequelize-auto but it doesn t generate relations .",
"github.com sequelize sequelize issues 1132 https : github.com sequelize sequelize issues 1132",
"Are you using Sequelize.js",
"update : Sequelize Version sequelize 1.7.0 .. . .. . Answer How this I have fixed .",
"There is currently no way to auto-generate Sequelize.js model migrations .",
"Looks like this is now supported in Sequelize versions 1.7.0+ .",
"And this one : .. . .. . Error : Possibly unhandled SequelizeDatabaseError : missing FROM-clause entry for table Comments .. . .. . I m using SequelizeJS version 2.0.4 .. . .. . I saw these related issues on the Sequelizejs repository on Github : .. . .. . https : github.com sequelize sequelize issues 3261 .. . https : github.com sequelize sequelize issues 3095 .. . https : github.com sequelize sequelize issues 3527 .. . .. . Anyone knows a solution",
"If you need to generatee them just once you can use github.com sequelize sequelize-auto https : github.com sequelize sequelize-auto I tried it on my DB mysql and partly worked .",
"Also see some comments i logged under URL github.com sequelize sequelize issues 1132 https : github.com sequelize sequelize issues 1132",
"First of all I m rather new to Node.JS and even newer to Sequelize and this has been bothering me for a while .",
"Yup I was trying to use Sequelize.js .",
"sequelize db : migrate",
"Should be fixed in sequelize version 3.22 .. . .. . https : github.com sequelize sequelize pull 5752",
"I want to do the same thing with postgresQL and sequelize.js .",
"I am using sequelize with MySQL .",
"i use [email protected]",
"I m using bcrypt-nodejs with Sequelize .",
"Realized that a .save method is provided by Sequelize .",
"Also you need to instantiate it properly : var sequelize new Sequelize .. .",
"See the GitHub issue at https : github.com sequelize sequelize issues 4859 .",
"The changelog can be found at https : github.com sequelize sequelize blob master changelog.md .",
"done is also deprecated https : github.com sequelize sequelize wiki Upgrading-to-2.0",
"How to auto generate the migrations with Sequelize CLI from existing Sequelize models",
"I know how to do this in javascript but I m looking if there is a param in Sequelize that does this job for me .",
"You can now use ah-sequelize-plugin https : github.com evantahler ah-sequelize-plugin and then just access your models using api.models object .",
"I am trying to get a distinct count of a particular column using sequelize .",
"@Adam how come you love DISTINCT and Sequelize so much",
"Read it very well i think that is the best way .. . .. . sequelize-virtual-fields https : www.npmjs.com package sequelize-virtual-fields",
"Try this : .. . .. . Read my research https : github.com sequelize sequelize issues 1585 by this question .",
"Just Follow the following link https : github.com sequelize sequelize-auto .. . .. . It will generate models of your table .",
"I m trying to use the parent.addChild method Sequelize provides but for some reason it can t recongise that function and throws and error on me .",
"I created a custom NPM module that contains sequelize models and provides some utility methods .",
"Using sequelize .",
"I m learning Sequelize with Postgres .",
"Is anyone familiar with the Sequelize equivalent",
"This is the way that Sequelize recommends doing it .",
"Is this a problem of sequelize or mysql",
"The tables were created by sequelize",
"When you create your Sequelize object pass false to the logging parameter : .. . .. . For more options check the docs http : sequelize.readthedocs.org en latest api sequelize index.html highlight logging .",
"As of sequelize 3.4.0 https : github.com sequelize sequelize blob master changelog.md 340 Geometry support has been added for postgres .",
"I m using graphql-sequelize https : github.com mickhansen graphql-sequelize to glue between sequelize and GraphQL .",
"Is there any way to force Sequelize.js to add these foreign key constraints",
"Is there any point in using JSData on the server-side if I use Sequelize.js",
"Is there any point in using JSData on the server-side if I use Sequelize.js",
"var fs require fs .. . path require path .. . Sequelize require sequelize .. . lodash require lodash .. . sequelize new Sequelize sequelize test root null .. . db .. . .. . fs.readdirSync dirname .. . .filter function file .. . return file.indexOf .",
"After looking at Model.count method in lib model.js https : github.com sequelize sequelize blob master lib model.js L847 and tracing some code I found that when using Model.count you can just add any kind of aggregate function arguments supported by MYSQL to your options object .",
": - .. . .. . I accomplished this by adding constraint on database using Alter command as Add Foreign Key Constraint through migration is an open bug https : github.com sequelize sequelize issues 966 in sequelize .",
"Sequelize seems to be getting most things done",
"I am trying to practice associations in sequelize .",
"Your best option is : .. . .. . .. . .. . This looks like an extension to issue 1869 https : github.com sequelize sequelize issues 1869 : .. . .. . Querying on the through model join table is not possible currently unfortuneatly .",
"Looking at the test code https : github.com sequelize sequelize blob 6a0912ad82915fd7bf20bd71ad7707abd473a137 test integration include findAll.test.js for the include clause I don t see any group options which is an absence of evidence for this feature .",
"Probably a bit too late for you but for anyone else 3095 https : github.com sequelize sequelize issues 3095 issuecomment-149277205 was updated with a bit of a solution : .. . .. . The trick is in those dollar signs though there are still problems https : github.com sequelize sequelize issues 3095 issuecomment-213297829 with this solution when limit is set or when querying with findAndCountAll .",
"This issue will be fixed in Sequelize version 4 .",
"This should fix your issue with Sequelize .",
"I have a set of Sequelize models .",
"Should this be handled by sequelize s removeColumn",
"Sequelize supports Raw SQL Queries .",
"prompt how to use JOIN in Sequelize",
"How to test web Service Controllers functionality in node.js Express Sequelize app.Using stubs spy and mocks",
"Sequelize use promises .",
"it s called Sequelize",
"Is this a bug with Sequelize",
"See this question and its answers also : How to auto generate migrations with Sequelize CLI from Sequelize models",
"http : stackoverflow.com questions 27835801 how-to-auto-generate-migrations-with-sequelize-cli-from-sequelize-models .",
"I m using the sequelize-cli https : github.com sequelize cli for the seeding and migrating things .",
"You are very welcome to contribute to the documentation - it s hosting in the GH repo github.com sequelize sequelize and PRs are very welcome :",
"Error : Please install sqlite3 package manually .. . .. . I ve installed sequelize and sqlite with npm-install --save sequelize sqlite .",
"See the official API Reference for Model https : github.com sequelize sequelize wiki API-Reference-Model update .",
"I ve create a package sequelize-connect https : www.npmjs.com package sequelize-connect to help people deal with this issue .",
"I also plan to use breeze js with sequelize http : breeze.github.io doc-node-sequelize class-descriptions.html .",
"Is there a proper Node library to enable audit tables with the Sequelize ORM Postgresql under the hood",
"All : .. . .. . Just start using Sequelize with sqlite3 I wonder what the type params mean when doing trasaction",
"I ve tried several ways for making it happen with sequelize include include : .. . and attributes : .. . but without any luck .",
"distinct counts are always applied on the primary-key of the model so this solution will not work accordingly at least not with the current sequelize version .",
"To do the Sequelize equivalent of SELECT category COUNT DISTINCT product as countOfProducts GROUP BY category you d do :",
"Something like this should be what you are looking for : .. . .. . Which will result in the following query : .. . .. . This will probably only work on sequelize version 2.0 :",
"I am looking for group-by queries through sequelize and cannot seem to find any documentation .",
"I Think You are looking for something like this .. . .. . Update : - Newer version of sequelize uses .then instead of .success",
"Newer versions of sequelize now use .then function result instead of .success function result",
"This is not possible without 3095 - Untill that is implemented sequelize thinks everything in where is on the main table",
"I add and remove tasks through the frontend and send the revised object to by backend running with sequelize .",
"I ve tried to install sequelize-cli and run sequelize db : migrate .. . .. . When I run this : sequelize db : migrate NODE ENV development it shows this message .. . .. . It will gives this error if I don t migrate ."
]
}
|
{
"confidence": [
44.95590591430664,
42.46453857421875,
42.25137710571289,
42.06593322753906,
41.708213806152344,
41.146209716796875,
38.37806701660156,
38.276309967041016,
38.227561950683594,
35.784202575683594,
35.47734069824219,
34.497737884521484,
34.43057632446289,
33.450279235839844,
33.35890197753906,
33.34528732299805,
33.052433013916016,
32.48648452758789,
32.48435974121094,
31.73922348022461
],
"content": [
"Question : I want to see the SQL commands that are sent to the PostgreSQL server because I need to check if they are correct . In particular I am interested in the table creation commands . For instance ActiveRecord Ruby prints its SQL statements to standard output . Is this possible with Node.js ActionHero.js and Sequelize.js as well .. . Answer : If you want to look at the sequelize for one command you can listen to it and attach a function to the print the sql . Check out this example : Comment : You now pass in a logger as an option to log a single statement : User.find 1 logging : console.log",
"Question : I m wanting to generate migration files for models model name.js model files . Although I haven t found a way todo this yet . So say I created a model articles with just an id field and then I edited that models articles.js file how can I use the sequelize cli to generate a migration file so I can then update my database structure .. . Answer : There is currently no way to auto-generate Sequelize.js model migrations . See this question and its answers also : How to auto generate migrations with Sequelize CLI from Sequelize models http : stackoverflow.com questions 27835801 how-to-auto-generate-migrations-with-sequelize-cli-from-sequelize-models .",
"Question : I want to see the SQL commands that are sent to the PostgreSQL server because I need to check if they are correct . In particular I am interested in the table creation commands . For instance ActiveRecord Ruby prints its SQL statements to standard output . Is this possible with Node.js ActionHero.js and Sequelize.js as well .. . Answer : You can pass a logging option when initializing sequelize which can either be a function or console.log .. . .. . You can also pass a logging option to .sync if you only want to view the table creation queries Comment : Thanks this is exactly what I want . DEPRECATION WARNING : The logging-option should be either a function or false . Default : console.log -- what does this mean Comment : Means you should pass a function instead of true . Comment : I never ever passed true .",
"Question : When using Sequelize.js the following code doesn t add any foreign key on tables . Is there any way to force Sequelize.js to add these foreign key constraints .. . Answer : Before I had the same problem and solved when I understood the functioning of settings Sequelize . Straight to the point Suppose we have two objects : Person and Father .. . .. . Maybe it help you .. . .. . Edit : .. . .. . You can read this to understand better : .. . .. . http : docs.sequelizejs.com en 1.7.0 docs associations foreign-keys",
"Question : null .. . Answer : I am trying to connect my API to an instance of Redshift using the pg library but I get the following error : .. . .. . I know Redshift doesn t support the setting of timezone but I don t really care about that . I can t seem to find any help about how to get past this issue so any inout would be greatly appreciated . Thanks Comment : I m having the same problem . Comment : Are you using Sequelize.js Comment : Yup I was trying to use Sequelize.js . It seems like Sequelize.js just doesn t work with Redshift since it treats it as regular Postgres and assumes it has all the functions of regular PG . I was able to get past the SET TIME ZONE error with the help of this issue : github.com sequelize sequelize pull 2428 https : github.com sequelize sequelize pull 2428 but then I ran into more issues . Using node-orm2 https : github.com dresende node-orm2 instead of Sequelize got me a lot further but still did not fully work . In the end it was decided that we just not use an ORM at all . Comment : Haha yup . I followed the same road you did . I was really excited after keepDefaultTimeZone and assumed all the other issues could be solved via configuration and in the end hit the same road blocks you did . Comment : Did you eventually manage to make it work",
"Question : Does JSData replace or complement Sequelize.js I am trying to understand how those two libraries can play together and if they should . From my reading it looks like JSData mainly deals with accessing data while Sequelize.js will create and modify the scema and ALSO provide access to the objects . Is there any point in using JSData on the server-side if I use Sequelize.js I am thinking to use Sequelize on the server-side implement some REST API to those objects and use JSData + JSDATA-http on the client-side to access the REST API but it feels that I will have to define the objects twice.. . once for Sequelize and once for JSData - is there any magic that can prevent the need to do this twice or am I thinking about all this in the wrong way .. . Answer : Does JSData replace or complement Sequelize.js I am trying to understand how those two libraries can play together and if they should . On the server js-data + js-data-sql would replace Sequelize similar to how js-data + js-data-mongodb would replace Mongoose . js-data-sql uses Knex.js under the hood which you can use for schema migrations and for anything else that Knex supports . For schema validation you can plug your favorite validation library into js-data via the validate lifecycle hook and other places . Is there any point in using JSData on the server-side if I use Sequelize.js No .. . .. . I am thinking to use Sequelize on the server-side implement some REST API to those objects and use JSData + JSDATA-http on the client-side to access the REST API but it feels that I will have to define the objects twice...once for Sequelize and once for JSData - is there any magic that can prevent the need to do this twice I actually have experience using js-data + js-data-http on the client and Sequelize on the server . You could do that but yes you have have to define each of your Models Resources twice once using the Sequelize API and once using the js-data API . You can mitigate duplication by extracting common logic into base models than can be used by the server and the client . Though if you use js-data on the server you can compose complex queries right in the client without having to translate them to something the server s ORM understands . or am I thinking about all this in the wrong way No you re just trying to understand your options . Being the author of js-data I would of course argue in favor of js-data + js-data-sql but the major areas where js-data + js-data-sql lags behind Sequelize is that Sequelize has native support for belongsToMany n : m relationships and a built-in understanding of sql datatypes validation is up to you with js-data . Comment : Thanks For your response and thanks for writing this tool . I would like to point that going through the documentation it did not pop out that js-data actually manages stuff like creating tables and so on . Could you point me towards an example showing how this works and when in the codes life cycle does it happen also if you could elaborate on the sql datatypes issue it could be helpful . As for n : m one can probably use n : 1 + 1 : m relations to overcome this... . Comment : js-data does not automatically create tables . Creating tables only even makes sense when you re using the sql adapter . Mongo automatically creates collections for you and the other adapters have no notion of tables . Example of creating tables with the sql adapter : github.com js-data js-data-examples blob master server sql app https : github.com js-data js-data-examples blob master server sql app app.js L197 It happens only where you make it happen . n : 1 + 1 : m is how n : m works it s just Sequelize understands this and hides the intermediate table . With js-data you d have to deal with the intermediate table . Comment : thanks so it looks like I will revert back to the idea of using sequelize on the server-side and js-data on the client side.. .",
"Question : null .. . Answer : I m adapting this local authentication implementation https : scotch.io tutorials easy-node-authentication-setup-and-local using Sequelize instead of Mongoose but this should be DB agnostic and here is my following directory hierarchy : .. . .. . I have the routes defined in app.js and the models defined in sequelize.js as described below : .. . .. . .. . .. . . app.js .. . .. . .. . .. . . config passport.js .. . .. . .. . .. . . views signup.ejs .. . .. . And for good measure : .. . .. . .. . .. . . config sequelize.js .. . .. . What occurs when I run the app and press the signup button .. . .. . enter image description here http : i.stack.imgur.com 3mQQT.jpg .. . .. . is the nothing console.log statement in config passport.js but when I try to diagnose the source of the error by adding console.log statements on err nothing appears to show up on cmd . Comment : Sequelize use promises . This code is totally wrong User.findById id function err user done err user findById docs.sequelizejs.com en latest api model http : docs.sequelizejs.com en latest api model findbyidid-options-promiseinstance returns a promise",
"Question : I m wanting to start using Sequelize a module that allows ORM for mysql in node.js . I was wondering if it s possible to auto-generate the models like CakePHP does . In CakePHP it will read the table s info and automatically create the associations and fields with their types in the model . i d really hate to have to completely map out all my tables by hand as some are relatively large . Is there something out there that will do this for me Or am I on my own to hand-type all the models out Comment : If you need to generatee them just once you can use github.com sequelize sequelize-auto https : github.com sequelize sequelize-auto I tried it on my DB mysql and partly worked . It imported the structure columns and types but I had to add keys and associations manually . Still better than nothing . Also for some reason it worked only when I run it on localhost on db server . BUt that might be due to some issues with some firewalls etc . .. . Answer : see https : github.com sequelize sequelize issues 339 .. . .. . Sequelize provides methods to read the existing table names of a database . Furthermore there is a method to read the structure of a table . Combined it should be possible to automate the creation of models . Comment : schaweet thanks . at least that opens up a way for me to create them myself . Comment : Hey Link is broken . Comment : fixed the link",
"Question : I am looking for an example nodejs app that uses the sequelize ORM . My main concern is that it seems next to impossible to define your models in separate js files if those models have complex relationships to one another because of require dependency loops . Maybe people define all their models in one file that is very very long I am mainly interested in how the models are defined and use through out the app . I would like to have some validation that what i am doing on my own is the good way to do things . .. . Answer : I am looking for an example nodejs app that uses the sequelize ORM . You might be interested in looking at the PEAN.JS boilerplate solution . https : github.com StetSolutions pean .. . .. . PEAN.JS is a full-stack JavaScript open-source solution which provides a solid starting point for PostgreSQL Node.js Express and AngularJS based applications . The PEAN project is a fork of the MEAN.JS project not to be confused with MEAN.IO or the generic MEAN stack . https : github.com meanjs mean .. . .. . PEAN replaces MongoDB and the Mongoose ORM with PostgreSQL and Sequelize . A primary benefit of the MEAN.JS project is the organization it provides to a stack that has-many moving pieces .",
"Question : I have a sequelize DataTypes.INTEGER issue when defining a model . Im following an example in ebook titled Building APIs with Node.js . Im a greenhorn trying to grasp express and sequelize . Any help much appreciated . Thanks . error details : .. . .. . code sample below in .. . .. . models tasks.js .. . .. . : .. . .. . I also tried the suggestion from TypeError : object is not a function when defining models in NodeJs using Sequelize http : stackoverflow.com questions 17311908 typeerror-object-is-not-a-function-when-defining-models-in-nodejs-using-sequeli answer-18924148 by adding this to the top of models tasks.js file but same error . var DataTypes require sequelize lib data-types .. . Answer : sequelize changes a lot so the answer of stackoverflow might not be correct . If you check out the sequelize doc link http : docs.sequelizejs.com en latest docs models-definition .. . .. . They start to use Sequelize.XXXX instead .. . .. . here is the example from the doc .. . .. . hence you have 2 ways to achieve that .. . .. . 1 . require sequelize in every model file .. . 2 . require sequelize in the index file and pass it to every model file Comment : Thanks @hiEven will try it out . Comment : It worked like a charm ...just stuck with 1 . but will try 2 . later . Thanks again .",
"Question : null .. . Answer : I am new to Node.js and Sequelize I have mostly a C background EF WebApi etc and I am trying to setup a simple Node.js project with sequelize . I checked the https : github.com sequelize express-example which seems very nice and simple but I can not understand how this whole system handles the lifetime of the objects created . They seem to use a singleton reference for the ORM using requires . If that is the case what happens when one request creates updates a few entities in sequelize and for whatever reason they are not saved Should they be visible on the next request How can I prevent that so that in each request sequelize entity state is clear from previous requests I though about recreating the instance but it seems that this is an anti-pattern in the node.js world . They also say that you need one instance so that the same DB connection is reused instead of opening a new connection each time but I am not sure that this is the case . Can someone clarify how to handle the ORM reference please and the implications on the entities already loaded on the server I also plan to use breeze js with sequelize http : breeze.github.io doc-node-sequelize class-descriptions.html . They use the same pattern in their examples . Thanks in advance",
"Question : We re using the orm sequelize.js http : sequelizejs.com and have defined a model as such : .. . .. . This is deployed to production and sync d to the database using sequelize.sync . Next step we add a parameter : .. . .. . However when deploying to production sequelize.sync does not add this new parameter . This is because sync does a : .. . .. . CREATE TABLE IF NOT EXISTS .. . .. . And does not actually update the schema if the table exists . This is noted in their documentation http : sequelizejs.com docs latest models database-synchronization . The only option seems to be to force : true however this is not okay for a production database . Does anyone know how to properly update the schema when changes are necessary .. . Answer : You want to implement Sequelize migrations : .. . .. . http : sequelize.readthedocs.org en latest docs migrations .. . .. . These will enable you to transition developer staging and production databases between known states . Comment : You saved my day Comment : I have a question around this . I can use sequelize-cli to create a new model and its corresponding migration script using sequelize model : create which creates a model and the migration script is there any way same can be done when adding new columns or constraints . Do we have to manually write the migration scripts for these tasks or is there any way to auto generate the migration scripts .",
"Question : How to create entry with existing association by using object For example .. . .. . I can do User.create bankId : 1 but since the data sent from client is in this form is there a way to tell sequelize whether to add new or use existing for each included models .. . Answer : One way to do this is to use the foreign key property name and supply the ID directly rather than through the nested object . In your example the join column is probably called bankId . You could create your user as : Comment : This issue on github lead me to this solution : github.com sequelize sequelize issues 5583 https : github.com sequelize sequelize issues 5583",
"Question : null .. . Answer : I am currently thinking about the right ConnectionPool size in a production environment using node.js and sequelize as the ORM mapper . The default Poolsize is max 5 connections . But that sounds a bit few little to me . What are the disadvantages with a large connection pool except using more RAM and CPU . I heared about the connection pool limit in mySql is 100 Would be interesting to hear your opinions . Comment : What are you trying to accomplish Comment : I m flagging this question as off topic because it s primarily opinion based . OP welcome to SO Questions that could technically be answered with anything because they elicit an opinion - best worst most effective industry standard etc are off topic because they tend to attract a lot of answers none of which actually answer a question .",
"Question : Is it possible to have column names be underscored postgres but have the JavaScript getters be camelCase per language standards .. . Answer : For anyone finding this later on it s now possible to explicitely define what the database field should be named : Comment : Should underscored : true and underscoredAll : true options automatically convert camelCased model s attributes names to underscored while database request I mean in Model we define as activationKey : DataTypes.STRING but request to db will be SELECT .. . activation key .. . Comment : @f1nn No that s not supported at the moment . Comment : @MickHansen are there any plans to support this Comment : @f1nn underscored attributes are used to rename only automatically created columns eg . Foreign Keys etc . Comment : For others to follow : github.com sequelize sequelize issues 2209 https : github.com sequelize sequelize issues 2209",
"Question : How this query can be written using ORM .. . Answer : Try this : .. . .. . Read my research https : github.com sequelize sequelize issues 1585 by this question . i use [email protected]",
"Question : I m wanting to start using Sequelize a module that allows ORM for mysql in node.js . I was wondering if it s possible to auto-generate the models like CakePHP does . In CakePHP it will read the table s info and automatically create the associations and fields with their types in the model . i d really hate to have to completely map out all my tables by hand as some are relatively large . Is there something out there that will do this for me Or am I on my own to hand-type all the models out Comment : If you need to generatee them just once you can use github.com sequelize sequelize-auto https : github.com sequelize sequelize-auto I tried it on my DB mysql and partly worked . It imported the structure columns and types but I had to add keys and associations manually . Still better than nothing . Also for some reason it worked only when I run it on localhost on db server . BUt that might be due to some issues with some firewalls etc . .. . Answer : You can use sequelize-auto https : github.com sequelize sequelize-auto but it doesn t generate relations . If you re using PostgreSQL you can generate models through https : github.com ozum sequelize-pg-generator it generates models relations . But some of definations like references in generated models deprecated in the last version of sequelize . You should do some little editions and it will work . Comment : While this link may answer the question it is better to include the essential parts of the answer here and provide the link for reference . Link-only answers can become invalid if the linked page changes . - From Review review low-quality-posts 13115011",
"Question : I m wanting to start using Sequelize a module that allows ORM for mysql in node.js . I was wondering if it s possible to auto-generate the models like CakePHP does . In CakePHP it will read the table s info and automatically create the associations and fields with their types in the model . i d really hate to have to completely map out all my tables by hand as some are relatively large . Is there something out there that will do this for me Or am I on my own to hand-type all the models out Comment : If you need to generatee them just once you can use github.com sequelize sequelize-auto https : github.com sequelize sequelize-auto I tried it on my DB mysql and partly worked . It imported the structure columns and types but I had to add keys and associations manually . Still better than nothing . Also for some reason it worked only when I run it on localhost on db server . BUt that might be due to some issues with some firewalls etc . .. . Answer : You can auto generate models through sequelize-auto . Just Follow the following link https : github.com sequelize sequelize-auto .. . .. . It will generate models of your table . Comment : But can you tell me how can I save relations too i.e Foreign key info . Comment : Hi puneet gupta Please guide Me how to get the auto generate tables in db . I got a message from my command-prompt Executing Done But when I verify the database There is nothing created inside please giude @Puneet gupta I stuck more than Two days",
"Question : Postgres is the DB of choice due to its spatial indexing goodness top-k-closest-points using PostGIS or other gists . Looks like Node.js ORMs do not directly support spatial indexing so which one requires the least amount of hacking for this Sequelize and node-orm-2 seem to demand some hacking to get it working . Any suggestions .. . Answer : As of sequelize 3.4.0 https : github.com sequelize sequelize blob master changelog.md 340 Geometry support has been added for postgres . You can use the GEOMETRY datatype in the model definition :",
"Question : The title sounds complicated . I have a users table and each user can have multiple interests . These interests are linked to the user via a lookup table . In PHP I queried the users table then for each one did a query to find interests . How can I do this in Node.js Sequelize How can I set up some sort of promises too For example : .. . .. . .. . Answer : From the return statement in the bottom of your code it seems you have not totally grasped the asynchronous nature of node.js . The return statement in your code will be executed directly after the first call to sequelize.query that is before the query returns . This means that users will be undefined . If you wanted to actually return the users and their interest I would suggest something like this : .. . .. . In the code above refers to a utility lib . that executes the callback function after the function has been called users.length times . Callback is a function that is passed to your piece of code and should process the return result for example returning the users to the client in the context of a webserver . Another comment - if you are only doing raw SQL queries Sequelize might not be the best choice for you . Any reason why you are not using the SQL driver directly If you want to use sequelize you should take advantage of its features . Try to the define a model for users and interests set up an association and load up users and interests in one go using JOINs eager-loading http : sequelizejs.com documentation models-eager-loading .. . .. . update : An example using promises Comment : Just remember that you have to include underscore https : npmjs.org package underscore module Comment : is already used in sequelize and exposed via Sequelize.Utils . Comment : Hi Jan I was blocked on the same issue for many hours . I tried using Promise.all without any luck . I m new to node.js and all the async stuff so likely I ve been confused but I was wondering if you had a working example using Promise.all thanks In any case your answer works and helped me a lot . Comment : @Etienne I ve added an example using promises Comment : you re a legend thanks"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
orm
|
UNK_RELATION
|
google-closure-linter@jsdoc@233
|
google-closure-linter -- the closure linter is a javascript lint utility developed by google for the closure linter that checks javascript files for style issues such as-operator placement missing semicolons spacing the presence of @placeholder annotations and more .
|
{
"confidence": [
83.3521957397461,
83.3521957397461,
82.86457824707031,
78.10791015625,
70.9915771484375,
69.25308227539062,
69.25308227539062,
62.981910705566406,
60.670631408691406,
59.27638244628906,
59.020851135253906,
59.0140380859375,
49.96806716918945,
47.75476837158203,
45.437992095947266,
45.078243255615234,
38.46638870239258,
29.60416030883789,
28.418899536132812,
27.204259872436523,
27.204259872436523,
23.763442993164062,
23.763442993164062,
23.763442993164062,
23.763442993164062,
23.763442993164062,
22.878116607666016,
20.562721252441406,
20.562721252441406,
20.562721252441406,
20.562721252441406,
20.562721252441406,
20.562721252441406,
20.562721252441406,
20.562721252441406,
20.562721252441406,
20.562721252441406,
20.562721252441406,
20.562721252441406,
20.562721252441406,
20.562721252441406,
20.562721252441406,
20.562721252441406,
20.562721252441406,
20.562721252441406,
20.562721252441406,
20.562721252441406,
20.562721252441406,
20.562721252441406,
20.562721252441406,
20.562721252441406,
20.562721252441406,
20.562721252441406,
20.562721252441406,
20.562721252441406,
16.80812644958496
],
"content": [
"Is there any option to use JSX syntax with Closure Linter",
"I don t believe closure linter understands JSX .",
"Closure already knows that the missing return is OK and the closure-linter doesn t seem to pick up on the intent of the @suppress .",
": .. . .. . The problem is that Foo.prototype.bar doesn t have a return statement so the closure linter complains even though closure itself is completely happy .",
"It turns out that the answer was just waiting to be discovered in the closure-linter source code test cases https : github.com google closure-linter blob master closure linter testdata interface.js : .. . .. . They write something like : .. . .. . which apparently lints fine in their test cases .",
"Is there any magical incantation that I can use to disable that warning in the closure linter just in this file",
"the closure-linter is now smart enough to figure out that Foo is part of an interface and it doesn t require any implementation in the methods .",
"I guess I m just not familiar enough with closure compiler this interface declaration looks too much like an implementation to me and maybe to the linter as well .",
"Or is it possible to use eslint with Google closure",
"I m trying figure out how to setup linter for my new project where I use Google closure library and Facebook React but I can t get working closure linter with jsx syntax and I don t know how to configure .eslintrc to work with closure stuff like goog.require without getting warning goog is not defined",
"You re right this seems to work both for the compiler and for the linter .",
"If not closure complier can suppress https : github.com google closure-compiler wiki Warnings suppress-tags warnings .",
"See developers.google.com closure compiler docs https : developers.google.com closure compiler docs js-for-compiler tags",
"Of course if I remove the @return annotations then closure is unhappy and throws warnings about overriding a method and returning something incompatible with the interface .",
"In fact if you try to put something in an interface closure will yell at you .",
"It might be a bit weird that linter and compiler disagree but the main question should be : Why did you implement a method that has to return a string but does not",
"I m using the closure compiler and I have two classes that I would like to assert have a minimum set of methods properties .",
"closure linter contains .py files .",
"I guess they re liimited since they have to build all the pieces from valid javascript so that it can run with or without compiling .",
"I m also aware of the annotations you mention but they don t satisfy my use-case .",
"Oh and specifying properties on interfaces works the same as methods -- you just don t add @param or @return annotations - .",
"When I run this task in my Gruntfile.js I have the error : The system cannot find the path specified .",
"I have the 3rdParty folder with the closure linter folder .",
"I m using Windows 8 if this is important .",
"Did you try 3rdParty closure linter",
"@MarioAraque yes in this case I have the error 3rdParty is not recognized as an internal or external command",
"I like that it lets me cut out the namespace when used in conjunction with goog.scope but I like how the original makes it more clear that bar is a method and not a property .",
"To accomplish this I ve created an interface .. .",
"e.g .",
"I don t want to disable this warning because that s pretty much the reason why I wrote the interface in the first place to make sure that all of the implementors are doing what they need to do .",
"@Bergi -- That s what interfaces are used for .",
"Basically an interface or a record with different amounts of type checking describes an object that can be passed around to different methods but it is up to the programmer to create a concrete implementation that satisfies the interface .",
"Yeah sure .",
"@Bergi -- Yeah it does look like an actual implementation .",
"Hello @mgilson wondering if you feel your question has been answered",
"If so perhaps you can mark one of the answers as the answer .",
":",
"Try the following : .. . .. . Interfaces don t need any function body at all .",
"I suspect they are only visible to the compiler and don t even wind up in your code at all .",
"Or because you are using goog.scope you can write :",
"I suppose this is a case of not being able to have the cake and eat it too : -",
"The documentation for a method in an interface will have things like @param and @return .",
"I don t even know how to specify a property in an interface I think I ve only ever had methods .",
"There are several other tags like @dict @enum @record @struct which might be what you want instead of @interface .",
"the documentation you link says Any class that implements an interface must implement all of the methods and properties defined on the interface s prototype so I think that it s possible .",
"We have an angular app and are serving a template for a modal .",
"That modal is used in different places but unfortunately it was pretty hard to share the controllers so I wanted to make sure that all of the controllers implemented the methods and properties that the modal requires hence the interface .",
"How is that different from mine",
"Well they didn t use goog.scope to do any aliasing .",
"When I removed the aliasing e.g .",
"Awesome .",
"You may try @abstract http : usejsdoc.org tags-abstract.html tag this may help .",
"I think something like this will work .",
"Good luck",
"Unfortunately this seems to not work .",
"As for configuring eslint to let it know goog is global and not show warning put this in your .eslintrc file : .. . .. . YAML .. . .. . JSON .. . .. . Here is the eslint documentation http : eslint.org docs user-guide configuring ."
]
}
|
{
"confidence": [
108.2588119506836,
107.32960510253906,
104.55345153808594,
97.53319549560547,
26.27739143371582
],
"content": [
"Question : I m using the closure compiler and I have two classes that I would like to assert have a minimum set of methods properties . To accomplish this I ve created an interface .. . e.g . : .. . .. . The problem is that Foo.prototype.bar doesn t have a return statement so the closure linter complains even though closure itself is completely happy . Of course if I remove the @return annotations then closure is unhappy and throws warnings about overriding a method and returning something incompatible with the interface . I don t want to disable this warning because that s pretty much the reason why I wrote the interface in the first place to make sure that all of the implementors are doing what they need to do . Is there any magical incantation that I can use to disable that warning in the closure linter just in this file Comment : It might be a bit weird that linter and compiler disagree but the main question should be : Why did you implement a method that has to return a string but does not Comment : @Bergi -- That s what interfaces are used for . In fact if you try to put something in an interface closure will yell at you . Basically an interface or a record with different amounts of type checking describes an object that can be passed around to different methods but it is up to the programmer to create a concrete implementation that satisfies the interface . Comment : Yeah sure . I guess I m just not familiar enough with closure compiler this interface declaration looks too much like an implementation to me and maybe to the linter as well . Comment : @Bergi -- Yeah it does look like an actual implementation . I guess they re liimited since they have to build all the pieces from valid javascript so that it can run with or without compiling . Comment : Hello @mgilson wondering if you feel your question has been answered If so perhaps you can mark one of the answers as the answer . : .. . Answer : It turns out that the answer was just waiting to be discovered in the closure-linter source code test cases https : github.com google closure-linter blob master closure linter testdata interface.js : .. . .. . They write something like : .. . .. . which apparently lints fine in their test cases . How is that different from mine Well they didn t use goog.scope to do any aliasing . When I removed the aliasing e.g . the closure-linter is now smart enough to figure out that Foo is part of an interface and it doesn t require any implementation in the methods . Awesome .",
"Question : I m using the closure compiler and I have two classes that I would like to assert have a minimum set of methods properties . To accomplish this I ve created an interface .. . e.g . : .. . .. . The problem is that Foo.prototype.bar doesn t have a return statement so the closure linter complains even though closure itself is completely happy . Of course if I remove the @return annotations then closure is unhappy and throws warnings about overriding a method and returning something incompatible with the interface . I don t want to disable this warning because that s pretty much the reason why I wrote the interface in the first place to make sure that all of the implementors are doing what they need to do . Is there any magical incantation that I can use to disable that warning in the closure linter just in this file Comment : It might be a bit weird that linter and compiler disagree but the main question should be : Why did you implement a method that has to return a string but does not Comment : @Bergi -- That s what interfaces are used for . In fact if you try to put something in an interface closure will yell at you . Basically an interface or a record with different amounts of type checking describes an object that can be passed around to different methods but it is up to the programmer to create a concrete implementation that satisfies the interface . Comment : Yeah sure . I guess I m just not familiar enough with closure compiler this interface declaration looks too much like an implementation to me and maybe to the linter as well . Comment : @Bergi -- Yeah it does look like an actual implementation . I guess they re liimited since they have to build all the pieces from valid javascript so that it can run with or without compiling . Comment : Hello @mgilson wondering if you feel your question has been answered If so perhaps you can mark one of the answers as the answer . : .. . Answer : You may try @abstract http : usejsdoc.org tags-abstract.html tag this may help . If not closure complier can suppress https : github.com google closure-compiler wiki Warnings suppress-tags warnings . I think something like this will work . Good luck Comment : Unfortunately this seems to not work . Closure already knows that the missing return is OK and the closure-linter doesn t seem to pick up on the intent of the @suppress .",
"Question : Is there any option to use JSX syntax with Closure Linter Or is it possible to use eslint with Google closure I m trying figure out how to setup linter for my new project where I use Google closure library and Facebook React but I can t get working closure linter with jsx syntax and I don t know how to configure .eslintrc to work with closure stuff like goog.require without getting warning goog is not defined .. . Answer : I don t believe closure linter understands JSX . As for configuring eslint to let it know goog is global and not show warning put this in your .eslintrc file : .. . .. . YAML .. . .. . JSON .. . .. . Here is the eslint documentation http : eslint.org docs user-guide configuring .",
"Question : I m using the closure compiler and I have two classes that I would like to assert have a minimum set of methods properties . To accomplish this I ve created an interface .. . e.g . : .. . .. . The problem is that Foo.prototype.bar doesn t have a return statement so the closure linter complains even though closure itself is completely happy . Of course if I remove the @return annotations then closure is unhappy and throws warnings about overriding a method and returning something incompatible with the interface . I don t want to disable this warning because that s pretty much the reason why I wrote the interface in the first place to make sure that all of the implementors are doing what they need to do . Is there any magical incantation that I can use to disable that warning in the closure linter just in this file Comment : It might be a bit weird that linter and compiler disagree but the main question should be : Why did you implement a method that has to return a string but does not Comment : @Bergi -- That s what interfaces are used for . In fact if you try to put something in an interface closure will yell at you . Basically an interface or a record with different amounts of type checking describes an object that can be passed around to different methods but it is up to the programmer to create a concrete implementation that satisfies the interface . Comment : Yeah sure . I guess I m just not familiar enough with closure compiler this interface declaration looks too much like an implementation to me and maybe to the linter as well . Comment : @Bergi -- Yeah it does look like an actual implementation . I guess they re liimited since they have to build all the pieces from valid javascript so that it can run with or without compiling . Comment : Hello @mgilson wondering if you feel your question has been answered If so perhaps you can mark one of the answers as the answer . : .. . Answer : Try the following : .. . .. . Interfaces don t need any function body at all . I suspect they are only visible to the compiler and don t even wind up in your code at all . Or because you are using goog.scope you can write : Comment : You re right this seems to work both for the compiler and for the linter . I like that it lets me cut out the namespace when used in conjunction with goog.scope but I like how the original makes it more clear that bar is a method and not a property . I suppose this is a case of not being able to have the cake and eat it too : - Comment : The documentation for a method in an interface will have things like @param and @return . I don t even know how to specify a property in an interface I think I ve only ever had methods . There are several other tags like @dict @enum @record @struct which might be what you want instead of @interface . See developers.google.com closure compiler docs https : developers.google.com closure compiler docs js-for-compiler tags Comment : the documentation you link says Any class that implements an interface must implement all of the methods and properties defined on the interface s prototype so I think that it s possible . I m also aware of the annotations you mention but they don t satisfy my use-case . We have an angular app and are serving a template for a modal . That modal is used in different places but unfortunately it was pretty hard to share the controllers so I wanted to make sure that all of the controllers implemented the methods and properties that the modal requires hence the interface . Comment : Oh and specifying properties on interfaces works the same as methods -- you just don t add @param or @return annotations - .",
"Question : null .. . Answer : When I run this task in my Gruntfile.js I have the error : The system cannot find the path specified . I have the 3rdParty folder with the closure linter folder . closure linter contains .py files . I m using Windows 8 if this is important . Comment : Did you try 3rdParty closure linter Comment : @MarioAraque yes in this case I have the error 3rdParty is not recognized as an internal or external command"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
jsdoc
|
UNK_RELATION
|
font-lock@gnu@43
|
font-lock -- font-lock is a minor mode of @placeholder emacs .
|
{
"confidence": [
69.08235931396484,
69.08235931396484,
66.05974578857422,
61.48383712768555,
57.394744873046875,
56.21446990966797,
55.412010192871094,
54.58176803588867,
54.58176803588867,
54.168025970458984,
54.155147552490234,
53.78166961669922,
53.3413200378418,
52.10870361328125,
51.735225677490234,
51.735225677490234,
50.97163391113281,
49.917850494384766,
49.83972930908203,
49.4913330078125,
49.4913330078125,
49.48878860473633,
48.92518997192383,
47.81593704223633,
47.449493408203125,
47.444889068603516,
47.3154411315918,
47.233154296875,
47.12755584716797,
47.01399612426758,
46.49969482421875,
45.95627975463867,
45.88911437988281,
45.48138427734375,
44.433006286621094,
44.254207611083984,
43.90580749511719,
43.90580749511719,
43.842674255371094,
43.67234802246094,
43.12291717529297,
43.07143020629883,
42.39076232910156,
42.353057861328125,
42.300086975097656,
42.2329216003418,
42.23100662231445,
41.2662239074707,
41.03695297241211,
40.370758056640625,
40.303592681884766,
40.303592681884766,
40.303592681884766,
39.967220306396484,
38.990509033203125,
38.990509033203125,
38.990509033203125,
38.990509033203125,
38.97560501098633,
38.93747329711914,
38.69686508178711,
38.06732940673828,
38.040401458740234,
38.040401458740234,
38.040401458740234,
37.380760192871094,
37.380760192871094,
37.380760192871094,
37.37070846557617,
37.37070846557617,
37.37070846557617,
37.22138595581055,
36.76753616333008,
36.72211837768555,
36.398681640625,
36.312530517578125,
36.312530517578125,
36.24281692504883,
36.0208854675293,
35.908660888671875,
35.735595703125,
35.557106018066406,
35.45143127441406,
35.45143127441406,
35.45143127441406,
35.45143127441406,
35.45143127441406,
35.45143127441406,
35.45143127441406,
35.45143127441406,
34.74123764038086,
34.542049407958984,
34.4111328125,
34.291847229003906,
34.228214263916016,
33.97138595581055,
33.93572998046875,
33.86221694946289,
33.859161376953125,
33.859161376953125
],
"content": [
"I have font-lock mode on by putting global-font-lock-mode 1 in .emacs .",
"From the emacs help on function font-lock-mode : .. . .. . .. . Toggle Font Lock mode .",
"global-font-lock-mode enables font-locking for each and every mode in Emacs .",
"What s the good for font-lock mode .. . .. . You can customize and extend font-lock to your need as this is the case for all things in emacs .",
"What s the good for font-lock mode",
"font-lock-mode colorful syntax highligthing .",
"Here s a basic major mode definition that names the font-lock keywords list here test-font-lock-keywords enables multiline font-lock and adds the region extension-function test-font-lock-extend-region .",
"With font-lock mode am I supposed not to change any font",
"With font-lock mode am I supposed not to change any font .. . .. . Yes .",
"Font-lock-mode is to do syntax-highlighting .",
"Any example explanation as to what font-lock is under Emacs and why it concerns me would be most welcome",
"I am trying to get emacs to properly render mathematical combining characters such the diaeresis over bar etc in font-lock mode .",
"With arg turn Font Lock mode off if and only if arg is a non-positive .. . number if arg is nil toggle Font Lock mode anything else turns Font .. . Lock on .",
"Now that Emacs will be searching for matches in larger regions we need to set up the test-font-lock-keywords list .",
"When setting up font-lock-keywords for a GNU Emacs mode is it possible to highlight multiple sub-expressions of a regular expression with a single matcher",
"And with font-lock mode your program certainly look different as explained in page 274 of Learning GNU emacs http : rads.stackoverflow.com amzn click 0596006489 .",
"Thus turn on font-lock before WhiteSpace is on if you want that font-lock continues on after WhiteSpace is turned off .",
"The best way as a normal user to modify font-lock entries is to use the function font-lock-add-keywords and font-lock-remove-keywords .",
"So if WhiteSpace is turned on and font-lock is off WhiteSpace also turns on the font-lock to highlight blanks but the font-lock will be turned off when WhiteSpace is turned off .",
"font-lock-keywords to fontify php blocs .",
"But what does it change if font-lock continues after or not",
"I tried adding setq font-lock-support-mode lazy-lock-mode which caused a freeze .",
"You will need to make sure that the font-lock-multiline variable and the font-lock keywords are applied to the correct buffer .",
"Or take for example this description about WhiteSpace : .. . .. . Note that when WhiteSpace is turned on WhiteSpace saves the font-lock state that is if font-lock is on or off .",
"You have to learn how to customize it to your needs C-h i m Emacs RET m Font Lock RET",
"Font Lock is also known as syntax-highlighting .",
"font-lock-function-name-face with 1 font-lock-function-name-face .",
"The two default font-lock-extend-region-functions font-lock-extend-region-wholelines and font-lock-extend-region-multiline move the start of the refontification region to the beginning of the line and then maybe somewhere even further depending on the font-lock-multiline property .",
"Every mode that uses font-lock relies on a certain set of faces - a combination of font properties like size bold underline italic and color .",
"font-lock-keyword-face on A .. . font-lock-warning-face on foo but not bar .. . font-lock-constant-face on B .. . .. . I have tried to use this following code : .. . .. . But it does not work with the string A B emacs report a missing capture .",
"The code in the question has problems : The following code with Drew s answer does work as Drew describes : defvar font-lock-special-macro-face make-face font-lock-special-macro-face set-face-background font-lock-special-macro-face pink font-lock-add-keywords c++-mode",
"Open up some code and execute M-x font-lock-mode a couple times to watch it switch on and off .",
"And WhiteSpace restores the font-lock state when it is turned off .",
"@Paul : Does emacs have different color set of highlighting for each font",
"When I bring up an xml file in nxml mode I can see the colors switch on and off when I toggle font-lock-mode .",
"Actually if you after advise font-lock-fontify-syntactically-region then you probably don t even need to modify font-lock-defaults or font-lock-default-fontify-region .",
"0 font-lock-special-macro-face t .",
"It does not font-lock strings by default though .",
"Initially font-lock starts refontifying the buffer from the position of the point .",
"If you really need to Set Emacs defaut font-face per-mode see Using a different font for each major mode - Emacs Stack Exchange http : emacs.stackexchange.com questions 3038 using-a-different-font-for-each-major-mode 3042 3042",
"Did you try font-lock studio https : github.com Lindydancer font-lock-studio",
"To get multiline font-lock working reasonably well you ll need to first enable it by setting font-lock-multiline to t and write a function to add to font-lock-extend-region-functions which will extend the relevant search region to contain larger blocks of text .",
"You re probably seeing a rendering quirk specific to your platform s emacs UI and or font library .",
"ok but then how comes some mode like nxml or nxhtml say they re not using font-lock and yet display things in a lot of different colors",
"Another thing to change just a recommendation is that font-lock-add-keywords accepts the mode name as the first argument .",
"i agree that not everything on EmacsWiki is as accessible but this is font-lock 101 .",
"In this thread http : lists.gnu.org archive html help-gnu-emacs 2004-09 msg00534.html Stefan Monnier says that font-lock-multi-line is appropriate for things that are usually single-line but occasionally multi-line .",
"Modify markdown-mode s font-lock-defaults to override the default font-lock-fontify-region-function as described in the comment block near line 946 of font-lock.el that begins Fontification functions .",
"In order to fontify multilined blocs I need to set font-lock-multiline to t . .. . .. . Everything is running quite nicely .",
"If t font-lock-mode ignores this highlighter if the corresponding group in the first element is not found in the match result-of myregexp .",
"So font-lock-keyword-face must also be matching className .",
"The code in the question is missing defvar font-lock-special-macro-face .",
"This scheme worked except for the call of the default font-lock-syntactic-face-function .",
"After having a look at font-lock-keywords-alist and font-lock-keywords I dont t see where this highlight could have come from .",
"I say this because I have various bits like this in my custom font-lock-keywords definitions .",
"In the example below I use the anchored form of font-lock keywords it allows you to search more than the current line .",
"Then you ll need to write multiline matchers either regular expressions or functions and add them to font-lock-defaults .",
"Here we just highlight group zero the entire match using font-lock-keyword-face .",
"Emacs Python mode screenshot http : i.stack.imgur.com 8KAqk.jpg",
"I ve found this section http : www.gnu.org software emacs manual html node elisp Multiline-Font-Lock.html of the manual which sorely lacks an example and this emacswiki page http : www.emacswiki.org emacs MultilineFontLock of broken code .",
"How do I make change to XXX-font-lock-keywords typically using assoc plus setcdr affect the fontification in XXX-mode",
".. . .. . 3 better is there a way to trigger this kind a fonction : when I type I find the opening tag php and force a font-lock-fontify-region on this bloc .",
"Generally it s a bad idea to highlight comments using a font-lock keyword .",
"describe-face tells me this is a font-lock-type-face .",
"I had a local font-lock hack to record in the buffer the rule that was used .",
"I m super new to this that font-lock thing was the most complex change I ve tried .",
"The prepend atom needs to be outside the quoted list as the last argument to font-lock-add-keywords :",
"The third argument to font-lock-add-keywords controls how these keywords are added to the existing ones .",
"The documentation for font-lock-keywords discusses this in some depth although it s not always the simplest to follow -- I find it easier just to copy someone else s working setup like the existing value of c-font-lock-keywords-3 for example .",
"The region extension-function should look something like this : .. . .. . This function looks at the global-variables font-lock-beg and font-lock-end which contain the starting and ending positions of the search region and extends the region to contain an entire block of text separated by blank lines or n n .",
"If you need it to move further up you either add another function to font-lock-region-functions or make sure to backtrack programmatically while parsing certain constructs inside font-lock-region-function or syntax-propertize-function .",
"You have to customize the font faces and colors using customize-face command change colors starting with Font Lock or use a theme engine like color-theme http : www.nongnu.org color-theme .",
"Use subexp highlighters with laxmatch enabled to have font-lock-mode ignore missing groups in matches : .. . .. . The forth element of each subexp highlighter is the laxmatch argument .",
"In all this feels like it should be only a couple lines of elisp in your .emacs file plus make a copy of font-lock-default-fontify-region that has only a minor diff from the original call one new function plus make a copy of font-lock-fontify-syntactically-region and modify it to do your bidding the most difficult part .",
"This works mostly except when there is a competing font-locked entity inside the comment like a string delimited by double quotes : .. . .. . How do you get font-lock to understand that the comment is already font-locked fine and it doesn t need to try to font-lock any strings inside of it",
"I m running Emacs editing files in C++ mode and PHP mode .",
"I am defining an Emacs major mode by deriving from prog-mode .",
"EmacsWiki http : www.emacswiki.org emacs EmacsWiki is a great source for emacs knowledge such as this http : www.emacswiki.org emacs AddKeywords .",
"Well Stefan Monnier is the definitive reference when it comes to anything font-lock related so any advice from him is well-worth following .",
"Yes I am also on ubuntu with emacs 23.2 .",
"To my understanding this requires Emacs 23 can t find neither variable-pitch-mode nor buffer-face-mode in Emacs 22 .",
"And I used the following options to change a font for specific mode .",
"To do this I use the font-lock setting : .. . .. . The regular expression expression matches the typical PHP tags and their enclosed text .",
"I m not sure why but font-lock-keyword-face ends up being used to highlight className if we use",
"IOW it must be appended : use t as the third arg to font-lock-add-keywords .",
"You want to use font-lock-syntactic-face-function to distinguish which kind of comment gets which face .",
"defun lawlist-message input interactive message propertize input face font-lock-warning-face",
"The missing capture error is still there Error during redisplay : error No match 3 in highlight 1 font-lock-constant-face",
"In the first block comment C-u C-x to get style font-lock-comment-face .",
"In the second block comment C-u C-x to get style font-lock-doc-face .",
"I have three questions : .. . .. . 1 is there a simple solution to this problem .. . .. . if not 2 is there any way to trigger font-lock-fontify-buffer each time I type those two chars :",
"See the elisp manual http : www.gnu.org software emacs manual html node elisp Syntactic-Font-Lock.html for details .",
"I also tried adding setq font-lock-maximum-decoration t which didn t seem to have any appreciable effect .",
"Even though whitespace-mode needs to activate font locking to make spaces looking different it remembers your previous font locking state to put everything back in-place when you deactivate it .",
"Or just get a recent version of emacs and use buffer-face-mode .",
"Note that the current haml-mode has some problems with Emacs 24 compatibility but a couple of forks have fixes for this .",
"I m using nxhtml mumamo dired ido custom keybindings and so many things I added throughout the years that I don t remember all of them .. . .. . But there s something I really never understood : what is the font-lock mode and why should I care",
"Post an excerpt from your .emacs if possible .",
"i tested the example on with emacs 23.2 on ubuntu and saw the same issue .",
"I m using Emacs since a long time and I ve customized it quite a lot ."
]
}
|
{
"confidence": [
81.72122192382812,
81.07437133789062,
80.19681549072266,
79.0060043334961,
77.81441497802734,
74.86346435546875,
72.78124237060547,
72.25973510742188,
69.06034088134766,
68.19384002685547,
65.74362182617188,
64.45899200439453,
64.0814437866211,
63.869930267333984,
63.67500305175781,
62.7443733215332,
62.35844421386719,
62.064483642578125,
61.091156005859375,
60.32892608642578
],
"content": [
"Question : I m using Emacs since a long time and I ve customized it quite a lot . I ve even written simple ELisp functions and now I m starting to use macros more and more . I m not anywhere near a knowledgable Emacs user but I m not either a complete beginner . I m using nxhtml mumamo dired ido custom keybindings and so many things I added throughout the years that I don t remember all of them .. . .. . But there s something I really never understood : what is the font-lock mode and why should I care For example I ve read that nxhtml and nxml if I recall correctly do not use font-locking . Maybe I didn t understand that part well but in either way : what does it change for me as a user Or take for example this description about WhiteSpace : .. . .. . Note that when WhiteSpace is turned on WhiteSpace saves the font-lock state that is if font-lock is on or off . And WhiteSpace restores the font-lock state when it is turned off . So if WhiteSpace is turned on and font-lock is off WhiteSpace also turns on the font-lock to highlight blanks but the font-lock will be turned off when WhiteSpace is turned off . Thus turn on font-lock before WhiteSpace is on if you want that font-lock continues on after WhiteSpace is turned off . OK fine . I understand that . But what does it change if font-lock continues after or not Basically I just don t get it no matter how much I read about the subject . Any example explanation as to what font-lock is under Emacs and why it concerns me would be most welcome Comment : font locking is everything related to the effects applied on characters to make them looking different than their regular appearance . The whitespace-mode description that you are quoting tells you that whitespace-mode does not violate the minor modes code of conduct which states that minor modes should not disturb one another . Even though whitespace-mode needs to activate font locking to make spaces looking different it remembers your previous font locking state to put everything back in-place when you deactivate it . .. . Answer : It displays your code with all the different colors red for comments green for class names etc . If it s off you get black-and-white code instead . Open up some code and execute M-x font-lock-mode a couple times to watch it switch on and off . Comment : ok but then how comes some mode like nxml or nxhtml say they re not using font-lock and yet display things in a lot of different colors Comment : Is that what you re seeing When I bring up an xml file in nxml mode I can see the colors switch on and off when I toggle font-lock-mode .",
"Question : I m using Emacs since a long time and I ve customized it quite a lot . I ve even written simple ELisp functions and now I m starting to use macros more and more . I m not anywhere near a knowledgable Emacs user but I m not either a complete beginner . I m using nxhtml mumamo dired ido custom keybindings and so many things I added throughout the years that I don t remember all of them .. . .. . But there s something I really never understood : what is the font-lock mode and why should I care For example I ve read that nxhtml and nxml if I recall correctly do not use font-locking . Maybe I didn t understand that part well but in either way : what does it change for me as a user Or take for example this description about WhiteSpace : .. . .. . Note that when WhiteSpace is turned on WhiteSpace saves the font-lock state that is if font-lock is on or off . And WhiteSpace restores the font-lock state when it is turned off . So if WhiteSpace is turned on and font-lock is off WhiteSpace also turns on the font-lock to highlight blanks but the font-lock will be turned off when WhiteSpace is turned off . Thus turn on font-lock before WhiteSpace is on if you want that font-lock continues on after WhiteSpace is turned off . OK fine . I understand that . But what does it change if font-lock continues after or not Basically I just don t get it no matter how much I read about the subject . Any example explanation as to what font-lock is under Emacs and why it concerns me would be most welcome Comment : font locking is everything related to the effects applied on characters to make them looking different than their regular appearance . The whitespace-mode description that you are quoting tells you that whitespace-mode does not violate the minor modes code of conduct which states that minor modes should not disturb one another . Even though whitespace-mode needs to activate font locking to make spaces looking different it remembers your previous font locking state to put everything back in-place when you deactivate it . .. . Answer : font-lock-mode colorful syntax highligthing . global-font-lock-mode enables font-locking for each and every mode in Emacs . Older Emacs version required you to enable it manually newer version 23+ I think enable this by default . I can t imagine that many people would want to turn off this feature since it makes some type of content like source code immensely more readable . Every mode that uses font-lock relies on a certain set of faces - a combination of font properties like size bold underline italic and color . The basic faces that most modes use are : .. . .. . You can easily override their values if you d like them or use a different color-theme . Some modes happen to define additional faces as well .",
"Question : I have font-lock mode on by putting global-font-lock-mode 1 in .emacs . And with font-lock mode your program certainly look different as explained in page 274 of Learning GNU emacs http : rads.stackoverflow.com amzn click 0596006489 . What I found was that with python mode or org-mode when I change the font for that mode some of the keywords are not shown because of the change in color . I mean some of the characters keywords becomes white and when the background-color is white those keywords are not seen anymore . Is this expected behavior With font-lock mode am I supposed not to change any font What s the good for font-lock mode This is the code for changing default code . And I used the following options to change a font for specific mode . http : a.imageshack.us img823 2772 fontq.png Comment : How exactly did you change the font Post an excerpt from your .emacs if possible . Comment : Font-lock-mode is to do syntax-highlighting . You seem to have customized your highlighting to become unreadable . Comment : @Paul : Does emacs have different color set of highlighting for each font .. . Answer : Is this expected behavior With font-lock mode am I supposed not to change any font .. . .. . Yes . You have to customize the font faces and colors using customize-face command change colors starting with Font Lock or use a theme engine like color-theme http : www.nongnu.org color-theme . What s the good for font-lock mode .. . .. . You can customize and extend font-lock to your need as this is the case for all things in emacs . This is the basic system for syntax-highlighting that is used by the majority of the emacs users . You have to learn how to customize it to your needs C-h i m Emacs RET m Font Lock RET",
"Question : I have font-lock mode on by putting global-font-lock-mode 1 in .emacs . And with font-lock mode your program certainly look different as explained in page 274 of Learning GNU emacs http : rads.stackoverflow.com amzn click 0596006489 . What I found was that with python mode or org-mode when I change the font for that mode some of the keywords are not shown because of the change in color . I mean some of the characters keywords becomes white and when the background-color is white those keywords are not seen anymore . Is this expected behavior With font-lock mode am I supposed not to change any font What s the good for font-lock mode This is the code for changing default code . And I used the following options to change a font for specific mode . http : a.imageshack.us img823 2772 fontq.png Comment : How exactly did you change the font Post an excerpt from your .emacs if possible . Comment : Font-lock-mode is to do syntax-highlighting . You seem to have customized your highlighting to become unreadable . Comment : @Paul : Does emacs have different color set of highlighting for each font .. . Answer : From the emacs help on function font-lock-mode : .. . .. . .. . Toggle Font Lock mode . With arg turn Font Lock mode off if and only if arg is a non-positive .. . number if arg is nil toggle Font Lock mode anything else turns Font .. . Lock on . Font Lock is also known as syntax-highlighting .",
"Question : Some background I m comfortable with Emacs Lisp and have written lots of lines of it . However I ve never written a major mode so I m fairly new to how the font-locking mechanism works . For my current project I d like to add inlined javascript and css highlighting to html-mode . Currently I do this with MMM-mode but it s bulky and I don t use other features of it so I d just like to make a minor-mode or even just a hack that I can add to the sgml-mode-hook to just do the highlighting . I ve found this section http : www.gnu.org software emacs manual html node elisp Multiline-Font-Lock.html of the manual which sorely lacks an example and this emacswiki page http : www.emacswiki.org emacs MultilineFontLock of broken code . Can someone show me a clear example of how this is can be done EDIT : I should clarify that I don t want to see mode-specific font-locking within the javascript css chunks . The only requirement is that I m able to see the chunks by applying a different face to them . .. . Answer : It s probably not the best possible example but you can look at how haml-mode https : github.com nex3 haml-mode has solved the problem of syntax-highlighting in submode regions . Here s the blog post http : nex-3.com posts 79-highlighting-ruby-in-haml-mode with a high-level description . Note that the current haml-mode has some problems with Emacs 24 compatibility but a couple of forks have fixes for this . Regarding multiline font-locking I think you may be asking the wrong question . But basically this solves the problem of what to do if the user has made an edit in the middle or the end of a multiline syntactic construct . Initially font-lock starts refontifying the buffer from the position of the point . The two default font-lock-extend-region-functions font-lock-extend-region-wholelines and font-lock-extend-region-multiline move the start of the refontification region to the beginning of the line and then maybe somewhere even further depending on the font-lock-multiline property . If you need it to move further up you either add another function to font-lock-region-functions or make sure to backtrack programmatically while parsing certain constructs inside font-lock-region-function or syntax-propertize-function . One example of the latter approach would be Ruby s heredoc and ruby-syntax-propertize-heredoc in the Emacs trunk . It is called from two places in ruby-syntax-propertize-function . The first time to handle the case-when we already are inside of a heredoc literal and then for any subsequent heredocs .",
"Question : Some background I m comfortable with Emacs Lisp and have written lots of lines of it . However I ve never written a major mode so I m fairly new to how the font-locking mechanism works . For my current project I d like to add inlined javascript and css highlighting to html-mode . Currently I do this with MMM-mode but it s bulky and I don t use other features of it so I d just like to make a minor-mode or even just a hack that I can add to the sgml-mode-hook to just do the highlighting . I ve found this section http : www.gnu.org software emacs manual html node elisp Multiline-Font-Lock.html of the manual which sorely lacks an example and this emacswiki page http : www.emacswiki.org emacs MultilineFontLock of broken code . Can someone show me a clear example of how this is can be done EDIT : I should clarify that I don t want to see mode-specific font-locking within the javascript css chunks . The only requirement is that I m able to see the chunks by applying a different face to them . .. . Answer : In the example below I use the anchored form of font-lock keywords it allows you to search more than the current line . The trick is that the pre hook do two things : 1 it allows you to position the point to the start of the search and 2 it allows you to limit the search by returning the end-position . In the example below I have used the second property . Note that this is only a proof-of-concept . You will need to make sure that the font-lock-multiline variable and the font-lock keywords are applied to the correct buffer . Below the first two lines of BAR will be highlighted but not the last : Comment : In this thread http : lists.gnu.org archive html help-gnu-emacs 2004-09 msg00534.html Stefan Monnier says that font-lock-multi-line is appropriate for things that are usually single-line but occasionally multi-line . Comments Comment : Well Stefan Monnier is the definitive reference when it comes to anything font-lock related so any advice from him is well-worth following . Using the syntactic system as he suggests is one way to do it . Another is to use a match function rather than a regexp which could match the entire block . You should see my answers as a direct answer to the question provide an example of the multi-line font-lock feature and maybe not an answer on best way to accomplish whatever the original poster asked about .",
"Question : I m trying to write a derived mode from fundamental-mode . Assuming that I have this regexp : A foo bar B how can I tell emacs to use the following faces font-lock-keyword-face on A .. . font-lock-warning-face on foo but not bar .. . font-lock-constant-face on B .. . .. . I have tried to use this following code : .. . .. . But it does not work with the string A B emacs report a missing capture . .. . Answer : Use subexp highlighters with laxmatch enabled to have font-lock-mode ignore missing groups in matches : .. . .. . The forth element of each subexp highlighter is the laxmatch argument . If t font-lock-mode ignores this highlighter if the corresponding group in the first element is not found in the match result-of myregexp . See Search-based Fontification http : www.gnu.org software emacs manual html node elisp Search 002dbased-Fontification.html Search 002dbased-Fontification in the Emacs Lisp manual for more information . Comment : That s only needed for the 2nd match but it s OK to use it everywhere I actually think it was a mistake for font-lock to be non-lax by default . Also you have wisely changed the rule to use myregex only once which will speed up the code by about 3 . But you need to wrap the keywords into one more pair of parentheses . Comment : @Stefan Thank you for your corrections . I have updated the code accordingly .",
"Question : Some background I m comfortable with Emacs Lisp and have written lots of lines of it . However I ve never written a major mode so I m fairly new to how the font-locking mechanism works . For my current project I d like to add inlined javascript and css highlighting to html-mode . Currently I do this with MMM-mode but it s bulky and I don t use other features of it so I d just like to make a minor-mode or even just a hack that I can add to the sgml-mode-hook to just do the highlighting . I ve found this section http : www.gnu.org software emacs manual html node elisp Multiline-Font-Lock.html of the manual which sorely lacks an example and this emacswiki page http : www.emacswiki.org emacs MultilineFontLock of broken code . Can someone show me a clear example of how this is can be done EDIT : I should clarify that I don t want to see mode-specific font-locking within the javascript css chunks . The only requirement is that I m able to see the chunks by applying a different face to them . .. . Answer : I ll outline a simple major mode for highlighting style CSS and script JavaScript etc . blocks . To get multiline font-lock working reasonably well you ll need to first enable it by setting font-lock-multiline to t and write a function to add to font-lock-extend-region-functions which will extend the relevant search region to contain larger blocks of text . Then you ll need to write multiline matchers either regular expressions or functions and add them to font-lock-defaults . Here s a basic major mode definition that names the font-lock keywords list here test-font-lock-keywords enables multiline font-lock and adds the region extension-function test-font-lock-extend-region . The region extension-function should look something like this : .. . .. . This function looks at the global-variables font-lock-beg and font-lock-end which contain the starting and ending positions of the search region and extends the region to contain an entire block of text separated by blank lines or n n . Now that Emacs will be searching for matches in larger regions we need to set up the test-font-lock-keywords list . There are two reasonably good ways to go about matching multiline constructs : a regular expression which will match across lines and a matching function . I ll give examples of both . This keyword list contains a regular expression for matching style blocks and a function for matching script blocks : .. . .. . The first item in the list is straightforward : a regular expression and a face for highlighting matches of that regular expression . The second looks a bit more complicated but can be generalized to specify different faces for different groups defined in the match data specified by the function . Here we just highlight group zero the entire match using font-lock-keyword-face . The relevant documentation for these matchers is in the Search-based fontification http : www.gnu.org software emacs manual html node elisp Search 002dbased-Fontification.html section of the Emacs manual . A basic regular expression for matching style blocks would be : .. . .. . Note that we have to put n in the inner group because . does not match newlines . The matching function on the other hand needs to look for the first script block in the region from the point to the single given argument last : .. . .. . This function sets the match data which is a list of the form begin-0 end-0 begin-1 end-1 .. . giving the beginning and end of the zeroth group first group and so on . Here we only give bounds on the entire block that was matched but you could do something more sophisticated such as setting different faces for the tags and the contents . If you combine all of this code into a single file and run M-x test-mode it should work for highlighting these two types of blocks . While I believe this does the job if there is a more efficient or proper way of going about it I d also be curious to know as well .",
"Question : How do you change the default face which Emacs uses to style text on a per-mode basis For example say that I am already happy with the face customizations that I have which include a default fixed-width font . However in one particular mode markdown-mode.el say I want the default font to be variable-width . It is easy to style headers links etc . uniquely for markdown-mode : simply place the cursor over the styled text and M-x describe-face then click the link-to customize it . However the default face is the face used if no other face is specified so it is not specific to markdown-mode and if modified will affect all other modes . What magic can I put in the markdown-mode-hook to set the default face for buffers using this mode Comment : If there is a some variable that controls the default faces then you can localized it for the current buffer only in a hook that getting called while opening a file w markdown . Comment : The question is asked in a general way then a specific example is made and answers revolve around this specific example . If you really need to Set Emacs defaut font-face per-mode see Using a different font for each major mode - Emacs Stack Exchange http : emacs.stackexchange.com questions 3038 using-a-different-font-for-each-major-mode 3042 3042 .. . Answer : I have to give a partial answer because this is too complicated to figure out on the spot and I already blew my time budget . Face is a frame property . A frame can display multiple buffers at the same time . Mode is a buffer property . You ask how to vary the face on a per-mode basis . Combining all this it seems that the question cannot not have a single fully-correct answer . You can approximate the desired answer if you assume that a given frame will never display more than one buffer . You can actually accomplish that with something like this but modified to use special-display-regexps and a set of regexps that match your markdown-mode buffer names . However this is probably not what you want . Your question seems to imply changing the face properties of a single frame . Again assuming that a frame will never display more than one buffer at a time you can try advising switch-to-buffer . But that might not be sufficiently low-level and it might be too slow . untested .. . .. . And now for my actual incomplete answer.. . .. . .. . A better albeit more complicated approach would instruct markdown-mode to use a new face for all regions that are not already assigned one of the built-in faces . You can create a new face with copy-face and give it interesting properties with set-face- . Modify markdown-mode s font-lock-defaults to override the default font-lock-fontify-region-function as described in the comment block near line 946 of font-lock.el that begins Fontification functions . You can probably use a very slightly modified font-lock-default-fontify-region that does just one extra step immediately after it does : .. . .. . The extra step parses the region similar to what font-lock-fontify-syntactically-region does breaking the region into interesting sub-regions . But this time you find sub-regions that have the default face and you put-text-property those sub-regions to the new face that you previously created . In all this feels like it should be only a couple lines of elisp in your .emacs file plus make a copy of font-lock-default-fontify-region that has only a minor diff from the original call one new function plus make a copy of font-lock-fontify-syntactically-region and modify it to do your bidding the most difficult part . Actually if you after advise font-lock-fontify-syntactically-region then you probably don t even need to modify font-lock-defaults or font-lock-default-fontify-region . Comment : Names and line numbers speak to GNU emacs 22.3.1 . Comment : Or just get a recent version of emacs and use buffer-face-mode . Comment : Cool . But I ll probably wait until emacs 23 actually ships before updating to it .",
"Question : I m trying to write a derived mode from fundamental-mode . Assuming that I have this regexp : A foo bar B how can I tell emacs to use the following faces font-lock-keyword-face on A .. . font-lock-warning-face on foo but not bar .. . font-lock-constant-face on B .. . .. . I have tried to use this following code : .. . .. . But it does not work with the string A B emacs report a missing capture . .. . Answer : The way your regexp is specified you d need two spaces between A and B . Either pull the second space inside the optional foobar part or use or after it . Comment : Typo it s fixed . The missing capture error is still there Error during redisplay : error No match 3 in highlight 1 font-lock-constant-face Comment : The error you cite No match 3 in highlight 1 font-lock-constant-face doesn t mak much sense and doesn t match your code either your code has 3 associated to font-lock-constant-face not 1 .",
"Question : I am trying to get emacs to properly render mathematical combining characters such the diaeresis over bar etc in font-lock mode . The goal is to be able to write something mathematical like x dot and have it be displayed as x or x bar as x . This is what I have so far and it mostly works . BUT : I see a visual artifact character just before the composed character . Test this out by writing x dot or something similar in the scratch buffer after executing the above . This artifact comes and goes like a phantom . This behavior doesn t occur when composing normal characters like o and - as in the following example . And then typing in x dash somewhere . What is going on .. . Answer : For what it s worth your first example works fine without artifacts in my bleeding-edge Emacs on OS X . You re probably seeing a rendering quirk specific to your platform s emacs UI and or font library . If you post more information about the Emacs you re running people more expert than me might be able to confirm the issue . Comment : i tested the example on with emacs 23.2 on ubuntu and saw the same issue . Comment : Yes I am also on ubuntu with emacs 23.2 . I ll see if I can track down the real issue.. .",
"Question : I am trying to find out which regexp causes the connect to be highlighted in this cperl-mode buffer . describe-face tells me this is a font-lock-type-face . After having a look at font-lock-keywords-alist and font-lock-keywords I dont t see where this highlight could have come from . The colorful parantheses are created by the rainbow-delimiters-mode . Syntax highlighted code http : i.stack.imgur.com E6jG1.png .. . .. . Is there a function to check which regexp matched such that connect is highlighted with this face .. . Answer : I had a local font-lock hack to record in the buffer the rule that was used . The patch below might do it . Once you ve applied it and reloaded font-lock.el you can check with C-u C-x the font-lock-debug property on the buffer position whose fontification you want to understand . Comment : While keybinding are optional the functionality your code provides seems missing from Emacs and potentially very useful if not essential . But as a patch it seems tricky to apply unless often-ironically one is already pretty expert with this area of emacs+elisp . So when you can you 1 make this something one with basic emacs skills can load-from else add-to his .emacsrc 2 Submit it to be added to the emacs distribution 3 Post back here with URLs to these additions . Thanks Indeed looks like u put all the great work into this except these last steps which seemingly wd then be easy 4u : -",
"Question : null .. . Answer : I m having trouble getting emacs to recognise a block comment as javadoc for Doxygen-style comments in a C file : .. . .. . emacs -q .. . .. . M-x emacs-version is 24.0.92.1 i686-pc-linux-gnu GTK+ Version 2.24.7 of 2011-12-21 .. . .. . Add the following to a c-mode buffer . In the first block comment C-u C-x to get style font-lock-comment-face . In the second block comment C-u C-x to get style font-lock-doc-face . So the question is how do I get the first block comment to be recognised as javadoc so the correct faces are applied Comment : Could you not use java-mode instead of c-mode Comment : @Thomas I ve edited the original question to clarify . I m editing C files with Doxygen comments for which emacs uses javadoc comment parsing . If there s a way to explicitly say doxygen style comments please then I m all ears .",
"Question : EMACS 24.2 I need to highliight function-call . I found this on internet .. . .. . It works but it highlight also the following open parenthesis . I am non confident with regular expression please How can I modify match string to avoid parenthesis highlighting enter image description here http : i.stack.imgur.com 4ayaZ.png .. . Answer : The regular expression is fine you just need to highlight the first group in the match not the whole of it . Replace . font-lock-function-name-face with 1 font-lock-function-name-face . Another thing to change just a recommendation is that font-lock-add-keywords accepts the mode name as the first argument . So you don t need to use the hook . Result : Comment : Thanks You very much Dmitry . It works fine",
"Question : When setting up font-lock-keywords for a GNU Emacs mode is it possible to highlight multiple sub-expressions of a regular expression with a single matcher What I d like to do is something along the lines of : .. . .. . What would be the correct syntax for something like that - or do I have to split it up into two distinct matchers .. . Answer : Try something like this : .. . .. . i.e . the same as yours but without the extra quotes . I say this because I have various bits like this in my custom font-lock-keywords definitions . Some of them have nil t on the end of the second one like this : .. . .. . which correspond to the OVERRIDE and LAXMATCH optional flags and may be necessary depending on your precise circumstances . The documentation for font-lock-keywords discusses this in some depth although it s not always the simplest to follow -- I find it easier just to copy someone else s working setup like the existing value of c-font-lock-keywords-3 for example .",
"Question : How do I make change to XXX-font-lock-keywords typically using assoc plus setcdr affect the fontification in XXX-mode It doesn t suffice to simply change the variable to make the change have effect . .. . Answer : EmacsWiki http : www.emacswiki.org emacs EmacsWiki is a great source for emacs knowledge such as this http : www.emacswiki.org emacs AddKeywords . Comment : But Wikis can change or sometimes even disappear . Plus pages on EmacsWiki often address a more general topic so it s nice when an answer on StackOverflow is a concise stand-alone source of information . That said external links can be a great addition to an answer for further reading . Comment : @Thomas - reposting answers to obvious questions seems like a waste of everyone s time especially if the answers are easily findable and more detailed than anyone would generally give in an SO post . i agree that not everything on EmacsWiki is as accessible but this is font-lock 101 . Not to mention that the answer posted here may become out of date while EmacsWiki will be maintained over time .",
"Question : In Emacs I am writing a PHP file that mixes both PHP and non-PHP code which will be in C++ mode . I would like the PHP code to be highlighted with a link-pink background in order to make it stand out visually . To do this I use the font-lock setting : .. . .. . The regular expression expression matches the typical PHP tags and their enclosed text . However if there are any string-literals in the body of the PHP block then the highlighting fails . I think this is because the face defined above is clashing with the coloring of string-literals which are by default colored text . What should I do to fix this issue I would like to keep both coloring schemes highlighting and colored string-literals if possible . Here is an example : .. . .. . The code className is highlighted with a pink background . The code inputs to vector factors factors does not have a highlighted background and the string literal factors is displayed with red colored text . This happens regardless of whether the leading PHP tag or is used . Comment : Please post a sample literal string and state whether it is receiving a highlight and if so what face is it defaulting to . Comment : OK I have edited the question to include an example . Comment : Have you thought about revising your regexp to consider as a potential ending and a potential beginning to your regexp set forth in add-custom-keyw and excluding anything within the single quotes -- e.g . exclude something like this : . n + The face used for string-literals is : font-lock-string-face .. . Answer : Try this in-place of the sexp you have : .. . .. . The last part t means that this highlighting should override any existing highlighting for the same text . Comment : I m not sure why but font-lock-keyword-face ends up being used to highlight className if we use 0 font-lock-special-macro-face t . I m used a blank .emacs file to run the test in c++.mode with only the code proposed in the question as modified by this draft answer . Comment : I didn t really try to change the regexp --- I was assuming that it was correct and the problem was that two font-lock rules applied to the same text and @JonClaus needed to have this rule override the other . But without looking closer one thing you can do is to remove the backslashes inside the .. . : The char is not special when inside .. . and there is no escaping inside .. . anyway . If you have a backslash there then you intend not to match a backslash either . Dunno whether that is what is wanted here . Comment : So font-lock-keyword-face must also be matching className . The override indicator should take care of that if two rules are matching PROVIDED this new rule appears after the other rule it is intended to override in the list of rules . IOW it must be appended : use t as the third arg to font-lock-add-keywords . Comment : The code in the question has problems : The following code with Drew s answer does work as Drew describes : defvar font-lock-special-macro-face make-face font-lock-special-macro-face set-face-background font-lock-special-macro-face pink font-lock-add-keywords c++-mode 0 font-lock-special-macro-face t prepend However @JonClaus was actually hoping for the best of both worlds -- i.e . preserve the string-literal highlighting with font-lock-string-face and also have his own pink highlighting elsewhere . Comment : The code in the question is missing defvar font-lock-special-macro-face . . . and also missing prepend . The other reason why my first test failed was because the single quote in the answer would need to be outside another pair of opening closing parenthesis -- e.g . . . . .",
"Question : With latex-mode is there any way to obtain more than three 3 levels of highlighting I would like to control more than three levels of highlighting however it appears as though latex-mode may be limited to three 3 levels . I say this because Emacs complains when attempting a fourth level -- Error during redisplay : jit-lock-function 1 signaled wrong-type-argument listp prepend . The following is just an example of an attempt to control four 4 levels which gave the error message listed above . I tried adding setq font-lock-support-mode lazy-lock-mode which caused a freeze . I also tried adding setq font-lock-maximum-decoration t which didn t seem to have any appreciable effect . .. . Answer : The prepend atom needs to be outside the quoted list as the last argument to font-lock-add-keywords : Comment : That fixed everything -- thank you so very much Comment : I ve noticed today that adding the letter t following each custom face is necessary sometimes if there are other definitions that potentially conflict -- e.g . begin is of course one of the most common commands and the custom colors needed that extra t to make everything work correctly . Comment : You re confusing two things here . The third argument to font-lock-add-keywords controls how these keywords are added to the existing ones . By using a non-nil and not set the keywords are appended to the existing set i.e . the opposite of prepend . On the other hand prepend can be used inside a rule to tell font-lock to add it s colors in front of other existing colors however you need to specify it for each highlight rule as in 1 lawlist-face-a prepend 2 lawlist-face-b prepend .. . .",
"Question : I am writing a minor mode for php html files . I use a function cf . font-lock-keywords to fontify php blocs . In order to fontify multilined blocs I need to set font-lock-multiline to t . .. . .. . Everything is running quite nicely . Their is just a problem in this case : When I have a multiline bloc and a delete the closing tag the bloc is unfontified . When I put the tag back the block is not fontified again . I have three questions : .. . .. . 1 is there a simple solution to this problem .. . .. . if not 2 is there any way to trigger font-lock-fontify-buffer each time I type those two chars : .. . .. . 3 better is there a way to trigger this kind a fonction : when I type I find the opening tag php and force a font-lock-fontify-region on this bloc . Comment : Why are you writing custom fontifying functions Isn t better to use php-mode http : php-mode.sourceforge.net or even better some up-to-date fork https : github.com rradonic php-mode which has quite good fontifying for php files.. . .. . Answer : This is a basic approach and the logic is insufficient but it demonstrates one option : Comment : thx I ve done almost the same thing with the hook : add-hook after-change-functions psp-after-change t t",
"Question : I am defining an Emacs major mode by deriving from prog-mode . Font-locking works except for one thing : .. . .. . I d like to highlight a special comment type that contains special linker directives using a font different from the one used for regular comments . Regular comments start with whereas the linker directives have the form ...directive.. . . And of course text in strings should not be misidentified as comments . What I have so far is : .. . .. . The problem is that with the syntax-table entry this mechanisms classifies everything that starts with as comment . The linker directive regexp therefore is not effective anymore . How can I achieve the desired behaviour It seems I d need a pattern that allows checks the chars that follow . But then using the syntax table for comment detection seems nice because it handles strings correctly . More generally I am interested in a document that explains the architecture of emacs elisp e.g . modes and what sequence of operations work for font-locking . Same for buffer interaction . I have the elisp reference manual which is great but I miss a conceptual intro to these topics . I have read the emacs elisp intro but did not like it because I found it too tutorial-style very lengthy and repetitive and missing systematic coverage . For example there was not a sentence about backquoting . It also seemed to address people with zero programming experience - but would one start with elisp then .. . Answer : You want to use font-lock-syntactic-face-function to distinguish which kind of comment gets which face . E.g . something like Comment : This scheme worked except for the call of the default font-lock-syntactic-face-function . I had to change symbol-default to default-value . Not complaining just would like to check I did get this right . Comment : @user52366 : Duh you re right I meant default-value for some reason I often make this mistake . I fixed the code accordingly . Comment : Good question . Good answer ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
gnu
|
UNK_RELATION
|
netbeans6.5@ide@50
|
netbeans6 .5 -- it is the version 6.5 of netbeans @placeholder for java application development .
|
{
"confidence": [
36.620452880859375,
36.620452880859375,
35.116031646728516,
34.69934844970703,
34.69934844970703,
33.836814880371094,
33.39710998535156,
33.39710998535156,
31.648191452026367,
31.648191452026367,
31.648191452026367,
31.04361343383789,
30.970577239990234,
30.54636573791504,
30.544483184814453,
29.7453670501709,
29.279184341430664,
29.279184341430664,
29.279184341430664,
29.279184341430664,
29.00490379333496,
28.719987869262695,
28.17547607421875,
28.17547607421875,
28.02606773376465,
27.751846313476562,
26.696571350097656,
26.088146209716797,
26.088146209716797,
26.088146209716797,
26.088146209716797,
25.92766571044922,
25.64362907409668,
25.624738693237305,
25.107894897460938,
24.984439849853516,
24.984439849853516,
24.661270141601562,
24.327133178710938,
23.96103858947754,
23.676345825195312,
23.6114501953125,
23.36492156982422,
23.35830307006836,
23.269546508789062,
23.202117919921875,
23.202117919921875,
23.2017879486084,
23.123104095458984,
22.982097625732422,
22.703405380249023,
22.620765686035156,
22.620765686035156,
22.57263946533203,
22.40610122680664,
22.314613342285156,
22.23541259765625,
22.02119255065918,
21.986854553222656,
21.978073120117188,
21.971195220947266,
21.947750091552734,
21.840003967285156,
21.840003967285156,
21.694602966308594,
21.53841781616211,
21.45940399169922,
21.004440307617188,
20.95706558227539,
20.95706558227539,
20.95706558227539,
20.844043731689453,
20.844043731689453,
20.78241729736328,
20.78241729736328,
20.78241729736328,
20.610912322998047,
20.434711456298828,
20.355697631835938,
20.312950134277344,
20.3074951171875,
20.3074951171875,
20.3074951171875,
20.228656768798828,
20.222993850708008,
20.17630386352539,
20.17630386352539,
20.17630386352539,
20.17630386352539,
20.17630386352539,
20.17630386352539,
20.17630386352539,
20.17630386352539,
20.17630386352539,
20.17630386352539,
20.17630386352539,
20.17630386352539,
20.17630386352539,
20.171051025390625,
19.981637954711914
],
"content": [
"i used netbeans 6.5 for developing android application .",
"How to run android application on netbeans 6.5",
"The development-environment we are using is NetBeans 6.5 6.8 is the last version that retains the design window .",
"I use NetBeans 6.5 .",
"Netbeans 6.5 with Maven plugin .",
"Within .netbeans there s a folder for your specific version 6.5 in this case .",
"I installed Netbeans 6.5 .. . 3 .",
"I reinstalled Netbeans 6.5 .. . 6 .",
"I am using Netbeans IDE 6.5",
"I am using Netbeans 6.5 IDE .",
"I am working with the NetBeans 6.5 IDE .",
"I have added the tags- netbeans and netbeans 6.5 since it relates to both .",
"I am using NetBeans 6.5 .",
"In Eclipse this is done with Ctrl+T but pressing Ctrl+T on the method did nothing in Netbeans 6.5 and I can t where the type hierarchy functionality is in Netbeans 6.5 .",
"It appears to be a configuration problem class path with netbeans 6.5 .",
"but I am not sure should I add the org-netbeans-modules-web-jstl11.jar or the two you mentioned as .netbeans 6.5 modules ext jstl.jar .netbeans 6.5 modules ext standard.jar",
"I am playing with the scaffold feature of rails in Netbeans 6.5 .",
"I was using Ubuntu Linux 9.04 with NetBeans 6.5 and 6.7.1 .",
"I installed IDE NetBeans 6.5 from official default repositories .",
"I m using NetBeans 6.5 for developing PHP and I have xdebug setup .",
"I am using Netbeans 6.5 Oracle 10G and I believe Hibernate 3 it came with my netbeans .",
"So far I ve used pythonWin and now Netbeans 6.5 as the development environments - neither of these seem to provide any way of debugging the plugin I am working on .",
"I had a similar error using Spring 2.5 with Hibernate on NetBeans 6.5 .",
"I have written rmi server code in netbeans 6.5 .",
"Should I add this jar to lib classpath or I should add as you say those two .netbeans 6.5 modules ext jstl.jar .netbeans 6.5 modules ext standard.jar",
"I would like to use Netbeans 6.5 to create a jar including about 50 text-files .",
"Is it right if I add to JSTL 1.1 lib the path for org-netbeans-modules-web-jstl11.jar or I should add the two jars paths as .netbeans 6.5 modules ext jstl.jar .netbeans 6.5 modules ext standard.jar instead",
"I recently upgraded to Netbeans 6.7 and fix imports works the same as it did in 6.5 .",
"I ve correctly installed ubuntu-9.10 correctly probably installed IDE NetBeans 6.5 .",
"My understanding is that there are actually 2 solutions : .. . .. . Install NetBeans 6.7 without importing the settings from 6.5 this would be my recommendation .",
"After a few weeks I uninstalled Netbeans 6.5 some problems which I hope to solve by a reinstall .. . 4 .",
"Downgrade libnb-javaparser-java 6.7-0ubuntu1 to 6.5-0ubuntu1 .",
"netbeans-6.5.1-ml-java-windows.exe --extract .. . .. . 7 .",
"I am working on a Java project using Netbeans for the first time .",
"I use Netbeans for coding in Ruby .",
"My IDE is netbeans 6.5 and I m using hibernate 3 spring 2.5.5 and JUnit 4.4 .",
"How can I use rmic in netbeans 6.5 so that I can create server stub class",
"Am using Maven on Netbeans 6.5 and was able to add the log4j jar dependency but it can t seem to find my log4j.xml file and I m not sure how to tell Netbeans to find it .",
"Since yesterday netbeans is suddenly not starting normally .",
"Planning for NetBeans 6.8 http : wiki.netbeans.org EditorPlan68 under the Java section .",
"When NetBeans sees that there are no files there it copied the latest version over .",
"edit : also working : in the file right mouse button select in projects files classes favourites .. . .. . edit 2 : http : forums.netbeans.org topic8420.html : This feature is not available till NetBeans IDE 6.5 .",
"I m going to assume it is similar in 6.5 .",
"Therefore I decided to create another java class and copy NetBeans created code into it .",
"Removed that plugin from netbeans and things are up and running again .",
"Go back to Netbeans .",
"In NetBeans 6.7.1 at least .",
"NB build version : 20081110001 Java : 1.6.0 14",
"This feature is added in the new version and may be available in NetBeans IDE 7.0M1 and after and you can find it in the View Menu .",
"6.5 is really old .",
"If so then the instructions for compiling with Netbeans appears to be provided here : http : weka.wikispaces.com Netbeans+6.0+ 28weka-src.jar 29 .. . .. . The instructions appear to be for NetBeans version 6.0 but a quick glance through the screenshots gives me the impression that their instructions are fairly generic and should more or less work for later versions such as 6.9 .",
"You can write plugins for Netbeans .",
"Is there a way to do something like this in NetBeans",
"Why don t you upgrade to a more current version of NetBeans",
"Here we go : NetBeans IDE 6.0 - 6.5 Keyboard Shortcuts http : wiki.netbeans.org KeymapProfileFor60 .. . .. . And here are some other useful shortcuts when debugging Java code in NetBeans .. . .. . F8 Step over .. . F7 Step into .. . Ctrl+F7 Step out .. . F5 Continue .. . Ctrl+F8 Toggle line breakpoint .. . Ctrl+Shift+F8 Create a new breakpoint dialog window for more breakpoint options .. . Ctrl+F9 Evaluate expression .. . Ctrl+Shift+F7 Create a new watch .. . Ctrl+F5 Debug main project",
"see also stackoverflow.com questions 717550 http : stackoverflow.com questions 717550 java-lang-outofmemoryerror-java-heap-space-with-netbeans",
"Finally solved it by deleting NetBeans profile .netbeans folder and reinstalling NetBeans with Tomcat bundled custom-installation",
"Did some more investigating and found that an error in Netbeans update had de-activated most of my Java plugins one of which was .. . Java Debugging .. . .. . Activating the plugin solved the issue .",
"I installed Netbeans then I tried to checkout my projects inside Netbeans .",
"When the new version of Netbeans is launched you ll be asked if you want to import settings from a previous version .",
"You can also try moving the .form file in .. . .. . project name src name of JFrame JPanel .form .. . .. . NetBeans will now see it as a .java file .",
"The issue itself seems to revolve around the fact that Netbeans 6.5 and I later versions up to this point do not allow you to reverse engineer a database from an existing hibernate.reveng.xml file .",
"You ll be able to edit anywhere in the file in NetBeans .",
"NetBeans will not be able to regenerate the file from the GUI editor .",
"When running the NetBeans exe installation file in Safe Mode With Networking it will prompt you to confirm the location of the Java JDK directory .",
"This is accurate in NetBeans 6.7.1 .",
"During the process Netbeans informed me something about an old client version of subversion and now I want to upgrade it .",
"Possible Tags : Java Swing JFrame",
"As thus this is not a Netbeans issue it is a user-issue .",
"It turns out that there is no comparable functionality in Netbeans .",
"Uninstall and install new Netbeans 6.7 .",
"Dear Gurus I am using NetBeans 6.5 and whenever I save a LessCSS file I would like to run less compiler to compile it to native css .",
"alt text http : i983.photobucket.com albums ae311 keatingWang swing run.png .. . .. . when design and run in netbeans 6.5 they are the same but int 6.7 and 6.8 as you see they are different",
"It seems this problem has been reported in slightly varying contexts in the netbeans issuezilla .",
"In NetBeans the GUI Builder generates code that is off limits to you from the editor .",
"You don t want to use the facilities NetBeans provides for adding custom code .",
"I have found this jar as org-netbeans-modules-web-jstl11.jar in C : .. . NetBeans 6.5.1 enterprise5 modules folder .",
"Not from NetBeans itself .",
"The name of an Extended VIEW was left over from the original project and the NetBeans version has a different Pkg name .",
"I would suggest running java -version in the command-line to make sure you are using the 64-bit version .",
"I always get java.lang.OutOfMemoryError : Java heap space error when I try to run any J2ME program in Netbeans with the big green play icon .",
"When I have Java code like this : .. . .. . how do I get Netbeans to show me which classes have implementations of someMethod not the interface .",
"On my machine it was located in C : Program Files Java jdk1.8.0 11 .. . .. . Then I was able to install NetBeans 8.0 by restarting my computer in Safe Mode With Networking .",
"Unfortunately all suggestions I found were related to application servers and I have no idea to adapted them to Netbeans .",
"If you open it in an external editor there are two possibilities : .. . .. . there is no guarantee that the changes you make will work and not break anything in the Netbeans UI Editor .. . The next time you edit the file in Netbeans it will be regenerated .",
"Then I added the Tomcat instance to NetBeans servers .",
"I was having the same problem with netbeans 6.9.1 .",
"The binding is done using Netbeans GUI designer .",
"Does anyone know how to do this within Netbeans",
"EDIT : Just saw a screenshot of the function in Netbeans .",
"Netbeans Plugins are working more efficient now .",
"did you try upgrading to netbeans 6.7.1",
"I had this problem too and it seemed to be a bug in NetBeans .",
"I also experienced this bug with Netbeans 7.2 .",
"On the iReport forums it says that this is the NetBeans platform to which it is compatible .",
"I got the following message when open the netbeans .",
"This is still an issue when installing NetBeans 8.0 .",
"Try setting netbeans jdkhome in NetBeans directory etc netbeans.conf .",
"But NOW I even can t create simplest java application using this IDE .",
"int 6.5 and 6.8 they have the same font--monospaced the default font ."
]
}
|
{
"confidence": [
39.80612564086914,
39.762535095214844,
37.74056625366211,
37.4102897644043,
36.9506950378418,
35.87992858886719,
35.87992858886719,
35.5546989440918,
35.273189544677734,
35.17558288574219,
34.0438232421875,
33.98454666137695,
33.85113525390625,
33.54705810546875,
33.06562805175781,
32.79600524902344,
32.653560638427734,
32.59553146362305,
32.29490280151367,
32.223628997802734
],
"content": [
"Question : I had system : ubuntu-9.04-amd64 . I installed IDE NetBeans 6.5 from official default repositories . Everything worked correctly . .. . .. . But now I decided to use ubuntu-9.10-desktop-amd64 . I formated parts of my hard with : and usr . home remains as before . I ve correctly installed ubuntu-9.10 correctly probably installed IDE NetBeans 6.5 . But NOW I even can t create simplest java application using this IDE . If I use CommandLine to compile java classes everything works javac someclass.java java . .. . .. . If I launch IDE NB 6.5 then File- New Project- This New Project is created but isn t compiled : if put F6 error is shown : .. . .. . .. . .. . What can I do to compile simplest application using IDE . I must make my work please help me . .. . Answer : Your problem looks to be related to https : bugs.launchpad.net ubuntu +source netbeans +bug 401589 . My understanding is that there are actually 2 solutions : .. . .. . Install NetBeans 6.7 without importing the settings from 6.5 this would be my recommendation . Downgrade libnb-javaparser-java 6.7-0ubuntu1 to 6.5-0ubuntu1 .",
"Question : First of all I know about the command-line parameter but I don t want to use it because I want to learn not just get it done so.. . .. . .. . Where can I set the JRE JDK which is used to run Netbeans .. . .. . A little background : .. . .. . 1 . I installed JDK 1.6 10 The system is Windows Vista Business 64 .. . 2 . I installed Netbeans 6.5 .. . 3 . After a few weeks I uninstalled Netbeans 6.5 some problems which I hope to solve by a reinstall .. . 4 . I also uninstalled JDK 1.6 10 and installed 1.6 11 instead . 5 . I reinstalled Netbeans 6.5 .. . 6 . Now I cannot start Netbeans because it insists of using the old JDK . Trying to use the default version doesn t work either . JAVA HOME is set to 1.6 11 .. . Answer : Try setting netbeans jdkhome in NetBeans directory etc netbeans.conf . Default location of JDK can be overridden by using --jdkhome : netbeans jdkhome .. . omitted path as I have Java in a non-standard location",
"Question : Every 15-30 minutes Netbeans shows a java.lang.OutOfMemoryError : PermGen space . From what I learned from Google this seems to be related to classloader leaks or memory-leaks in general . Unfortunately all suggestions I found were related to application servers and I have no idea to adapted them to Netbeans . I m not even sure it s the same problem .. . .. . Is it a problem in my application How can I find the source Comment : see also stackoverflow.com questions 717550 http : stackoverflow.com questions 717550 java-lang-outofmemoryerror-java-heap-space-with-netbeans Comment : Why don t you upgrade to a more current version of NetBeans 6.5 is really old . Comment : @a horse with no name : As is this question . I asked it over three years ago . .. . Answer : If you are developing a web application try to put on server vm option .. . .. . -Xmx512m -Xms512m -XX : MaxPermSize 512m .. . .. . Go to Tools Servers Platform VM Options Netbeans 7.4",
"Question : Every 15-30 minutes Netbeans shows a java.lang.OutOfMemoryError : PermGen space . From what I learned from Google this seems to be related to classloader leaks or memory-leaks in general . Unfortunately all suggestions I found were related to application servers and I have no idea to adapted them to Netbeans . I m not even sure it s the same problem .. . .. . Is it a problem in my application How can I find the source Comment : see also stackoverflow.com questions 717550 http : stackoverflow.com questions 717550 java-lang-outofmemoryerror-java-heap-space-with-netbeans Comment : Why don t you upgrade to a more current version of NetBeans 6.5 is really old . Comment : @a horse with no name : As is this question . I asked it over three years ago . .. . Answer : Try to add the following argument to netbeans netconf : -J-XX : MaxPermSize 256m",
"Question : How to run android application on netbeans 6.5 If i running the application means i got following error .. . .. . W ResourceType 1968 : Bad string block : string 14 extends to 1847 past end at 60 .. . .. . How to resolve this issue .. . Answer : Guys it s only theory . I mean nbandroid - Netbeans plugin for Android http : kenai.com projects nbandroid . It s still in deep beta version 0.10 and is too buggy to be used for real development . I have spent several days trying to use it . In the end I have managed to run some simple HelloWorld alikes but for more complicated things - it s unworkable . IMHO there are only 3 ways to develop Android applications : Eclipse Intellij IDEA and from command-line tools . My choice is Intellij IDEA - it s better than Eclipse equipped with Google s plugin .",
"Question : When I have Java code like this : .. . .. . how do I get Netbeans to show me which classes have implementations of someMethod not the interface . In Eclipse this is done with Ctrl+T but pressing Ctrl+T on the method did nothing in Netbeans 6.5 and I can t where the type hierarchy functionality is in Netbeans 6.5 . Thanks . .. . Answer : It turns out that there is no comparable functionality in Netbeans . You can read about it here : .. . .. . I ve also filed an enhancement request here which you can vote for : .. . .. . If you want to see this added to Netbeans please vote for it .",
"Question : When I have Java code like this : .. . .. . how do I get Netbeans to show me which classes have implementations of someMethod not the interface . In Eclipse this is done with Ctrl+T but pressing Ctrl+T on the method did nothing in Netbeans 6.5 and I can t where the type hierarchy functionality is in Netbeans 6.5 . Thanks . .. . Answer : Hey someone has implemented a module to do this and it works in Netbeans 6.5.1 - perfect for you . I m hanging out to see an equivalent for 6.7.1 . Maybe they should add it to 6.8 http : wiki.netbeans.org JavaGoToImplementation .. . .. . Go To Implementation is built-in for recent versions of NetBeans . Look in the Navigate context menu .",
"Question : When I have Java code like this : .. . .. . how do I get Netbeans to show me which classes have implementations of someMethod not the interface . In Eclipse this is done with Ctrl+T but pressing Ctrl+T on the method did nothing in Netbeans 6.5 and I can t where the type hierarchy functionality is in Netbeans 6.5 . Thanks . .. . Answer : I find that Ctrl+Alt+B works perfectly . : Comment : This is the correct equivalent to Eclipse in the newer versions of Netbeans and is better than the find usages option . Comment : Thank you this is a fantastic shortcut",
"Question : I am working on a Java project using Netbeans for the first time . I would like to use Netbeans 6.5 to create a jar including about 50 text-files . Is there a simple way to do this .. . Answer : If you re familiar with ant ant can do this and Netbeans can run an ant script . Comment : You could improve this answer by actually giving some Ant code .",
"Question : Every 15-30 minutes Netbeans shows a java.lang.OutOfMemoryError : PermGen space . From what I learned from Google this seems to be related to classloader leaks or memory-leaks in general . Unfortunately all suggestions I found were related to application servers and I have no idea to adapted them to Netbeans . I m not even sure it s the same problem .. . .. . Is it a problem in my application How can I find the source Comment : see also stackoverflow.com questions 717550 http : stackoverflow.com questions 717550 java-lang-outofmemoryerror-java-heap-space-with-netbeans Comment : Why don t you upgrade to a more current version of NetBeans 6.5 is really old . Comment : @a horse with no name : As is this question . I asked it over three years ago . .. . Answer : You can change the startup options of netbeans JVM by editing the file etc netbeans.conf . I often have this kind of errors when I develop a Webapp and I deploy it often . In that case I restart tomcat from time to time .",
"Question : When I have Java code like this : .. . .. . how do I get Netbeans to show me which classes have implementations of someMethod not the interface . In Eclipse this is done with Ctrl+T but pressing Ctrl+T on the method did nothing in Netbeans 6.5 and I can t where the type hierarchy functionality is in Netbeans 6.5 . Thanks . .. . Answer : To get a hierarchy similar to the type hierarchy in Eclipse right-click on the class name select Navigate and then Inspect Hierarchy . The keyboard shortcut for this is ALT+SHIFT+F12 . By default it shows you parents of the selected class or interface . However you can view descendants by using the Filters at the bottom left side . I believe the Show Subtype Hierarchy filter also toggled by using CTRL+B is what you want . This is accurate in NetBeans 6.7.1 . I m going to assume it is similar in 6.5 . Comment : You ve misunderstood my question . I have an interface and want to see which implementations are available for a method of the interface . Eclipse shows me the various implementations ALT+SHIFT+F12 doesn t do anything for an interface in Netbeasn 6.5.1 .",
"Question : For some reason my lib as JSTL 1.1 in the libraries list is empty.. . The jars paths were removed from the classpath with Tools - Libraries dialog.. . How can I restore the JSTL jars back for NetBeans6.5.1 So my question is what jars JSTL 1.1 lib should contain and where to look them for in NetBeans installed folders .. . Answer : On my system JSTL 1.1 library contains the jars : .. . .. . As to where they are located they re buried in Netbeans . Specifically on my machine a Mac there is a .netbeans folder in my home folder . Pretty sure this exists on Windows as well . Within .netbeans there s a folder for your specific version 6.5 in this case . Within that is a modules directory . The jars are located at : .. . .. . The association of the jars to the library are made in a file : .. . .. . If these files are all intact you might want to try and remove the folder : .. . .. . Netbeans creates this and if Netbeans start going stupid on you erasing it and letting it rebuild it may clean things up for you . Comment : I have found this jar as org-netbeans-modules-web-jstl11.jar in C : .. . NetBeans 6.5.1 enterprise5 modules folder . Should I add this jar to lib classpath or I should add as you say those two .netbeans 6.5 modules ext jstl.jar .netbeans 6.5 modules ext standard.jar Comment : You re probably best off simply creating a new library for your project then add those two jars and make sure you click the option to copy the jars to your local library directory . Then they ll always be with the project . Comment : The thing is I have library JSTL 1.1 in the NB6.5.1 Class Libraries libraries list but it is empty . All jars by mark JSTL 1.1 were removed that s why I just want to re-add the jars paths as it used to be before their paths were removed . but I am not sure should I add the org-netbeans-modules-web-jstl11.jar or the two you mentioned as .netbeans 6.5 modules ext jstl.jar .netbeans 6.5 modules ext standard.jar Please give me a little more details at the point . Comment : I m saying fixing this is not something I think you can do easily save for re-installing Netbeans . Instead since you have the jars on your system create a NEW library for your project add those two jars to it and make sure you copy the jars in to your project and then simply remove the Netbeans JSTL 1.1 lib from your project . You simply replace the broken library with a local working one . Comment : I don t have JSTL 1.1 lib in my current projects but in the IDE Class Libraries list only so I don t need use it as an external one . Is it right if I add to JSTL 1.1 lib the path for org-netbeans-modules-web-jstl11.jar or I should add the two jars paths as .netbeans 6.5 modules ext jstl.jar .netbeans 6.5 modules ext standard.jar instead",
"Question : When I have Java code like this : .. . .. . how do I get Netbeans to show me which classes have implementations of someMethod not the interface . In Eclipse this is done with Ctrl+T but pressing Ctrl+T on the method did nothing in Netbeans 6.5 and I can t where the type hierarchy functionality is in Netbeans 6.5 . Thanks . .. . Answer : This functionality already exists in Netbeans : Alt+F7 check Find All Subtypes and click OK . Thanks to tkellerer for pointing this out on the Netbeans forums .. . .. . http : forums.netbeans.org viewtopic.php p 49638 49638 .. . .. . This is widely overlooked functionality in Netbeans perhaps because there is no key binding for it so I ve changed my enhancement request to add a key binding for the sequence Alt+F7 check Find All Subtypes and click OK Comment : I know this is an old post but I have never found that Netbeans find implementations works reliably and I wonder whether it has to do with the context the function is used in . For example do projects in which implement the interface need to be open I work with a lot of OSGi bundles and very rarely does this function work in Netbeans and it s something that would be extremely useful in that context .",
"Question : I am working with the NetBeans 6.5 IDE . I downloaded a look-and-feel jar file and added it NetBeans by palette manager . How do I use it in my application .. . Answer : You can follow this Sun tutorial about setting the L F in Java http : java.sun.com docs books tutorial uiswing lookandfeel plaf.html .. . .. . You can change the L F with setLookAndFeel even after the program s GUI is visible . To make existing components reflect the new L F invoke the SwingUtilities updateComponentTreeUI method once per top-level container . Then you might wish to resize each top-level container to reflect the new sizes of its contained components . For example : Comment : Thanks for your reply . How to get InfName for a look-and-feel . We have windows classic I am using windows OS theme in NetBeans . whats the InfName for that .",
"Question : I m about to start a fair amount of work extending Trac to fit our business requirements . So far I ve used pythonWin and now Netbeans 6.5 as the development environments - neither of these seem to provide any way of debugging the plugin I am working on . I m totally new to Python so probably have not set up the development-environment how it could be congfigured to get it debugging . Am I missing something obvious It seems a bit archaic to have to resort to printing debug messages to the Trac log which is how I m debugging at the moment . .. . Answer : You can create a wrapper wsgi script and run it in a debugger . For example : .. . .. . You would run this script in the debugger and you can use lighttpd as a frontend for the web application with a trivial config like this one : .. . .. . Just run the fcgi wsgi wrapper in the debugger set the breakpoints in your plugin and open the web page .",
"Question : I have written rmi server code in netbeans 6.5 . How can I use rmic in netbeans 6.5 so that I can create server stub class Comment : I have added the tags- netbeans and netbeans 6.5 since it relates to both . Comment : Its a bad idea and would result in too many tags in future . Would be hard for the person who will be looking for an answer . Reverting it . Thanks . .. . Answer : Why not edit the standard build.xml located in the project root directory Include the Rmic http : ant.apache.org manual Tasks rmic.html Ant task . This will automatically rmic your classes every time you build a project in netbeans .",
"Question : I ve tried figuring out this problem for the last 2 days with no luck . I m simply trying to create an annotation based JUnit test using the spring framework along with hibernate . My IDE is netbeans 6.5 and I m using hibernate 3 spring 2.5.5 and JUnit 4.4 . Here s the error I m getting : Comment : It appears to be a configuration problem class path with netbeans 6.5 . I copied the project over to eclipse and it works just fine . Comment : I m getting this ERROR even if in Eclipse I tried with 1.5 3.1 4.0 . .. . Answer : I think you are picking up an incorrect version of asm.jar somewhere in the classpath you are using for your tests .",
"Question : Every 15-30 minutes Netbeans shows a java.lang.OutOfMemoryError : PermGen space . From what I learned from Google this seems to be related to classloader leaks or memory-leaks in general . Unfortunately all suggestions I found were related to application servers and I have no idea to adapted them to Netbeans . I m not even sure it s the same problem .. . .. . Is it a problem in my application How can I find the source Comment : see also stackoverflow.com questions 717550 http : stackoverflow.com questions 717550 java-lang-outofmemoryerror-java-heap-space-with-netbeans Comment : Why don t you upgrade to a more current version of NetBeans 6.5 is really old . Comment : @a horse with no name : As is this question . I asked it over three years ago . .. . Answer : It is because of constant class loading . Java stores class byte code and all the constants e.g . string constants in permanent heap that is not garbage collected by default which make sense in majority of situations because classes are loaded only once during the lifetime of an application . In applications that often load classes during an entire lifetime that are : .. . .. . web and application servers during hot redeployment .. . IDE s when running developed applications every time you hit Run button in Netbeans or eclipse it loads your application s classes a new .. . etc this behavior is improper because a heap fills full eventually . You need to turn on permanent heap garbage-collection to prevent this error . I use options .. . .. . stopped my eclipse-3.4 from throwing java.lang.OutOfMemoryError : PermGen space so it should also work with netbeans . Edit : Just note that for Netbeans you set those options in : Netbeans installation etc netbeans.conf You should prefixe those options with -J and add them in netbeans default options see comments in netbeans.conf for more informations . Comment : OK none of the answers really helped but this one bought me the most time between restarts : Comment : try to icrease MaxPermSize to 512M or more beacuse garbage collecting permament hep will still not help if an application ties to store there more than it can contain the amount of alive permamanet objects exceedes permament heap capacity Comment : The arguments seemed to work for me byte code-analysis of rt.jar in my case however I did get the warning Please use CMSClassUnloadingEnabled in-place of CMSPermGenSweepingEnabled in the future . Still worked though . Comment : one thing in netbeans there is different between run and deploy run worked for me like it make heap empty but deploy and deploy will not empty the heap properly i tested it 100 for my case and thanks to @ ukasz Bownik Comment : @Grundlefleck stackoverflow.com questions 3717937 http : stackoverflow.com questions 3717937 cmspermgensweepingenabled-vs-cmsclassunloadingenabled",
"Question : I have written rmi server code in netbeans 6.5 . How can I use rmic in netbeans 6.5 so that I can create server stub class Comment : I have added the tags- netbeans and netbeans 6.5 since it relates to both . Comment : Its a bad idea and would result in too many tags in future . Would be hard for the person who will be looking for an answer . Reverting it . Thanks . .. . Answer : you cannot use rmic through netbeans . you need to generate the server stub manually by running the rmic command at the command-line . but in case of eclipse you can generate the stub from the ide with the help of rmi plugin . Comment : Not from NetBeans itself . But one can change the build.xml file . If you know ant this should be a breeze .",
"Question : when design .. . .. . alt text http : i983.photobucket.com albums ae311 keatingWang swing design.png .. . .. . when run .. . .. . alt text http : i983.photobucket.com albums ae311 keatingWang swing run.png .. . .. . when design and run in netbeans 6.5 they are the same but int 6.7 and 6.8 as you see they are different Comment : I don t see the screenshots . I think there s some hotlink prevention at the site you use . Try tinypic.com . Comment : can you see now you must can . I use photobucket.com Comment : Yes now I see them : .. . Answer : The two images are each showing a different font . Note the descender on the j in Java . In the first image it descends below the baseline . In the second it does not . In Java monospace is a virtual font that is substituted at runtime with a fixed width font . Your development-environment is resolving a different font than your execution environment . Try explicitly setting the cont to Courier New ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
ide
|
UNK_RELATION
|
fabric8@openshift@93
|
fabric8 -- fabric8 is an open-source set of microservices that run on top of kubernetes and @placeholder v3 to provide management with centralized logging and metrics continuous-delivery based on jenkins nexus and sonarqube with integrated chat ipaas integration platform as a service based on apache activemq camel and cxf and tools for developers and devops .
|
{
"confidence": [
56.06078338623047,
51.42067337036133,
51.18601608276367,
49.64311218261719,
47.97040939331055,
47.1611213684082,
47.1611213684082,
46.691043853759766,
46.02850341796875,
45.704986572265625,
45.674015045166016,
44.99478530883789,
44.31880187988281,
44.31880187988281,
43.17403793334961,
43.12173843383789,
42.78498840332031,
42.72224807739258,
42.64909362792969,
42.234275817871094,
41.76652526855469,
41.3636474609375,
41.361236572265625,
41.3215217590332,
41.125572204589844,
41.02098846435547,
40.91092300415039,
40.28184509277344,
40.28184509277344,
40.05924987792969,
40.05924987792969,
40.05924987792969,
40.05924987792969,
40.05924987792969,
39.77830505371094,
39.502281188964844,
39.27656555175781,
39.2455940246582,
38.926631927490234,
38.926631927490234,
38.544395446777344,
38.52543640136719,
38.51845932006836,
38.46871566772461,
38.46871566772461,
38.465301513671875,
38.427406311035156,
37.56916046142578,
37.392818450927734,
37.392818450927734,
37.12700653076172,
36.959869384765625,
36.761436462402344,
36.761436462402344,
36.72774887084961,
36.72429275512695,
36.50532150268555,
36.33784103393555,
35.996925354003906,
35.95304870605469,
35.62881851196289,
35.62881851196289,
35.62881851196289,
35.112640380859375,
35.02675247192383,
35.01701354980469,
34.79207992553711,
34.70882034301758,
34.6584358215332,
34.27134704589844,
34.026580810546875,
34.026580810546875,
34.026580810546875,
34.026580810546875,
34.026580810546875,
33.884395599365234,
33.36192321777344,
33.35062789916992,
33.112213134765625,
32.93207550048828,
32.801239013671875,
32.54365539550781,
32.32905578613281,
32.31930160522461,
32.31930160522461,
32.31930160522461,
32.31930160522461,
32.31930160522461,
32.31930160522461,
32.31930160522461,
32.31930160522461,
32.229305267333984,
31.248607635498047,
31.186683654785156,
31.186683654785156,
30.81515121459961,
29.829212188720703,
29.829212188720703,
29.829212188720703,
29.760299682617188
],
"content": [
"I use fabric8 on kubernetes quite a lot .",
"Is it even possible to deploy fabric8 into a native kubernetes cluster or is OpenShift required",
"In the upstream community fabric8 is now on version 2 which is a different architecture based on Kubernetes and Docker .",
"You can do this through Java via fabric8 http : fabric8.io s Kubernetes Java client https : github.com fabric8io kubernetes-client .",
"Here s the latest instructions on installing it on kubernetes 1.2 : http : fabric8.io guide getStarted kubernetes.html .. . .. . There are various other options based on if you want to spin up kubernetes via vagrant or use GKE etc : http : fabric8.io guide getStarted index.html",
"I am using fabric8.io to orchestrate application containers in Kubernetes .",
"I am using fabric8 kubernetes plugin for elasticsearch 2.1 cluster discovery .",
"They are described in the configuration microservices documentation http : fabric8.io guide develop configuration.html .",
"I am using Fabric8 on Google Container Engine with Kubernetes .",
"You can come talk to the fabric8 team on IRC at freenode.net fabric8",
"but No applications are installed github.com fabric8io fabric8 issues 5718 https : github.com fabric8io fabric8 issues 5718",
"http : fabric8.io guide getStarted gke.html .. . .. . FWIW to access the fabric8 console we use a service proxy from the Kubernetes API server the console inself then uses either ingress or external ips to access Jenkins Gogs Nexus etc",
"I get the following on a native openshift fabric8 installation .",
"this then results in not been able to access the fabric8 console .",
"It seems specific to fabric8 .",
"The fabric8 version 2 documentation is what you can find from the website at the documentation page : https : fabric8.io",
"Full instructions are here http : fabric8.io guide getStarted openshift.html along with a troubleshooting guide http : fabric8.io guide getStarted troubleshooting.html .",
"I have installed fabric8 console in openshift v3 and have set up CD pipeline too .",
"Easiest is surely to add another container based on this one github.com fabric8io fabric8 blob https : github.com fabric8io fabric8 blob cef2ec8424876332ac6e74625cdc23257d1ba8d8 fabric fabric8-karaf src main resources distro fabric import fabric profiles containers tomee.profile io.fabric8.container.process.properties",
"How can we call a jboss fuse soap based webservice from another fuse soap service using kubernetes @endpoint @servicename annotations in fabric8 environment .",
"I know that but Fabric8 will only download webprofile version .",
"Im using fabric8 Kubernetes Java Client and Im accessing Kubernetes through HTTP I followed the example from fabric8 https : github.com fabric8io kubernetes-client blob master kubernetes-examples src main java-io fabric8 kubernetes examples ExecExample.java but I get the following error : .. . .. . What do I need to do to upgrade my connection to http 2",
"Is there a way to use Fabric8 for PHP project",
"The way we recommend integration and system-testing in maven with docker is via the fabric8 arquillian plugin http : fabric8.io guide testing.html .",
"I am trying to run the pre-packaged ZooKeeper within Fabric8 .",
"You should probably post to fabric8.io community or ping someone on IRC there .",
"Fabric8 s Kubernetes Client is using a generated model and DSL that has the exact same structure as as the JSON and YAML configuration .",
"Then I found Fabric8 http : fabric8.io but I cannot find any example of micro services made with Spring boot .",
"I would have a question about the wonderful tool that I just discovered named fabric8 http : fabric8.io .",
"Does the fabric8 console s logs show any errors",
"What version of the fabric8 console are you using",
"I m using Fabric8 v.1.2.0.redhat-133 .",
"See http : fabric8.io gitbook urlHandlers.html",
"Decided to go with fabric8 because of the extensive documentation .",
"I m trying to automate deployment of test builds in CI with Gradle and the Fabric8 Java kubernetes-client .",
"the way you go seems correct if you run the pre-integration-test phase the fabric8 plugin should do something .",
"When I attempt to install fabric8 on the cluster into a namespace everything looks good and start up...but when taking a look at the fabric8 console I get a No namespaces available message or something to that affect .",
"I also tried halting vagrant and then setting up fabric8 console in vagrant machine but not able to access it on fabric8.vagrant.f8 http : fabric8.vagrant.f8 any thoughts would be very helpful",
"Is it possible to setup this TLS encryption using fabric8",
"BTW I tried adding a fabric8 tag too .",
"Here s a demo video showing how to create a Spring Boot microservice https : vimeo.com jbossdeveloper review 170830750 b3c8467593 in the Fabric8 Microservices Platform http : fabric8.io and having a complete Continuous Deployment pipeline http : fabric8.io guide cdelivery.html get created to do the following : .. . .. . package the code create the docker image and kubernetes manifest .. . perform system integration tests .. . deploy to the staging environment with rolling updates .. . wait for optional human approval .. . deploy to the production environment with rolling updates .. . .. . Any code or configuration change in the git repository kicks off rolling updates automatically - which is a form of hot deployment .",
"I just completed the instructions given here http : fabric8.io guide getStarted gke.html on how to install fabric8 on Google Compute Engine .",
"Parts of fabric8 v2 are productized in the Fuse Integration Service product FIS - docs.openshift.com enterprise 3.1 using images xpaas images https : docs.openshift.com enterprise 3.1 using images xpaas images fuse.html And JBoss Fuse will in the future also migrate to fabric8 v2 likely in version 7.0 onwards .",
"Unfortunately you found an old documentation of the fabric8 v1 in that gitbook .",
"Does version 2 of fabric8 come packaged within OpenShift",
"I know that fabric8 https : github.com fabric8io fabric8 claims to support system-testing using kubernetes and arquillian http : fabric8.io guide testing.html however that seems to have the distinct disadvantage that all the applications need to be written in java which is very much a no-go for me .",
"I couldnt find it in the examples .. . .. . https : github.com fabric8io kubernetes-client blob master kubernetes-examples src main java-io fabric8 kubernetes examples FullExample.java L75 .. . .. . There dont seem to be javadocs available",
"See http : fabric8.io gitbook developer.html",
"I installed Fabric8 on a Google Container Engine cluster and I used gofabric8 deploy with a custom domain and cd-pipeline app to install fabric8.io on it .",
"I thought that in order to inform Fabric8 of this new dependency I would need to add this reference to the fabric8.features so I did that .",
"Would need figure out what s the difference between jaxrs and webprofile version so as to make it work on Fabric8-1.2.0.Beta4 .. . .. . .. . .. . Web.xml after change : .. . .. . beans.xml after change : .. . .. . Also added 4 features to my profile in Fabric8 : spring-web spring cxf-jaxrs fabric-rest",
"Generally speaking on kubernetes the use of service-discovery http : fabric8.io guide develop serviceDiscovery.html and kubernetes secrets avoids most of the use cases for environment specific configuration .",
"Have you created a route to reach the fabric8 pod in openshift",
"I am using fabric8 to get the status of a kuberenetes pod by the following code .",
"But I cannot reach the service .. . .. . In the troubleshooting section of : http : fabric8.io guide getStarted openshift.html some ideas like .. . .. . are suggested .",
"I m a newbie using Fabric8-1.2.0.Beta4 and trying to deploy REST example application taken from http : tomee.apache.org examples-trunk rest-example README.html to Tomee on Fabric8 .",
"Until we have a upgrade command you should be able to just delete the fabric8 related replication controllers with kubectl delete all -l provider fabric8 and re run gofabric8 deploy",
"I installed using kubectl create -f http : central.maven.org maven2 io fabric8 apps console-kubernetes 2.2.104 conso le-kubernetes-2.2.104-kubernetes.json After a while kubectl get pods NAME READY STATUS RESTARTS AGE fabric8-nzdqj 1 1 Running 0 7m templates-llple 1 1 Running 0 7m both pods are available .",
"I am using fabric8 to develop a cluster management layer on top of Kubernetes and I am confused as to what the official API is to obtain notifications of errors when things go wrong when instantiating pods rep controllers services etc .",
"Looking at the stack-trace indicates your using an older version of the fabric8 kubernetes client we migrated to okhttp from async-http-client a while back .",
"Is there a way to install fabric8 in already installed openshift origin 3.1 server",
"This is all handled in the fabric8 vagrant box but is a separate step if you re doing it manually .",
"If I restart fabric8 then the logs are full of : .. . .. . Do you have an idea",
"I am using https : github.com spotify docker-client in order to carry out Docker Image and Container handling activities and https : github.com fabric8io fabric8 tree master components kubernetes-api for Kubernetes related functionalities .",
"we have developped application based on Karaf and Apache Camel .",
"Now I have a different problem chat.stackoverflow.com rooms 105350 fabric8 http : chat.stackoverflow.com rooms 105350 fabric8 please may I ask you a couple of questions here .",
"See here http : fabric8.io guide getStarted openshift.html run-the-gofabric8-installer .",
"Ideally we would use the same Continuous Delivery pipelines http : fabric8.io guide cdelivery.html to change code or configuration to ensure things are properly tested before they hit production .",
"So my preference really is to use a Continuous Deployment pipeline http : fabric8.io guide cdelivery.html to roll out all changes whether code or configuration .",
"FWIW you can use fabric8-arquillian to test stuff that are not written in java .",
"I have created two fabric8-camedl-cdi services both need to interact to exchange data .",
"Please have glance at The @Endpoint annotation section in this url http : fabric8.io guide cdi.html .",
"enter image description here http : i.stack.imgur.com UIEIp.png .. . .. . Some features missing when I fabric8 : deploy 1st time .",
"I am running Fabric8 inside JBoss Fuse 6.2.0.redhat-133 on my local machine .. . 4 .",
"I have already tried running mvn -U fabric8 : deploy -DskipTests to update snapshots to no effect .. . 5 .",
"We ve added a section to the docs that helps delete old static ips and forwarding rules fabric8.io guide getStarted http : fabric8.io guide getStarted gke.html google-container-engine-quotas",
"Here https : github.com fabric8io kubernetes-client blob a47d2e288599559069481895c8b6fc7cf3fbab3d kubernetes-examples src main java-io fabric8 kubernetes examples FullExample.java L147 s an example : .. . .. . You can change any configuration of the replication controller replicas environment-variables etc .",
"In this case if you add a route with : .. . .. . cat EOF kubectl create -f - apiVersion : v1 kind : Route metadata : name : fabric8-console pec : host : EXTERNALLY RESOLVE DNS to : kind : Service name : fabric8 EOF .. . .. . As some extra info you cannot target ping at a port .",
"I deployed my app into fabric8 and it s running .. . .. . But i did not found the service .. . .. . http : lenovo-pc : 8186 cxf .. . .. . and there is no window to see the route diagram .. . .. . How can i fix this problem",
"You ll need a docker image for the database and to wrap that up in a kubernetes yaml json file so that it can be run up front as your app is deployed by fabric8-arquillian",
"The key issue also mentioned in this bug report https : github.com fabric8io kubernetes-client issues 432 to fabric8 folks is that order of creation of object and watch on the object matters .",
"Only changes made : 1 web.xml Added the following as suggested by http : tomee-openejb.979440.n4.nabble.com Problem-deploying-REST-Examples-on-Eclipse-td4582815.html : .. . .. . 2 Added fabric8-maven-plugin and distributionManagement to pom.xml to use fabric8 : deploy to deploy the war file and create rest-example profile .",
"Thanks it downloaded the jaxrs version in fabric8 but however this REST application still does not run on fabric 8 same issue which it does run on my local standalone tomee jaxrs version .",
"Do you mean that I should add another one for fabric8 to bootstrap correctly",
"Just created a new namespace but that doesn t change anything from the fabric8 s pow .",
"I recently started working on a code base that uses fabric8 to manage containers pods services etc .",
"But since we are using fabric8 I would prefer to stick to that if there is any way to accomplish this with their API .",
"The Fabric8 client has the following API call : .. . .. . client.endpoints .get .. . .. . This would give you the list of all end points .",
"I installed fabric 8 as http : fabric8.io guide getStarted openshift.html and now the basic pods are running .",
"Do you have any ideas why I cannot reach my basic fabric8 console",
"I m using fabric8 s java client but curl or something similar will be fine as well .",
"There s an example of updating an image here : https : github.com fabric8io kubernetes-client blob master kubernetes-examples src main java-io fabric8 kubernetes examples FullExample.java L136 .. . .. . Though as was pointed out in the comments this probably doesn t update the pods immediately unless the client is doing it .",
"To get the external ip s from the CLI rather than the fabric8 console you can run kubectl get services and get the external ip-address for each service .",
"I modified etc org.ops4j.pax.web.cfg whereas I now understand that I have to modify org.ops4j.pax.web.properties in the fabric8 default profile .",
"I posted an issue : https : github.com fabric8io fabric8 issues 696 .. . .. . Let s see if there is a specific configuration to apply .",
"Could you show the output of these commands : .. . .. . oc get route .. . .. . oc get pods .. . .. . oc describe rc fabric8 .. . .. . That might give us a clue as to what is going on .",
"We wrote some docs on how to work with configuration http : fabric8.io guide develop configuration.html .",
"I am just following through on their Getting Started example s here http : fabric8.io guide quickstarts index.html .",
"I m struggling to synthesise how to correctly use the maven-failsafe and fabric8-maven plugins together .",
"I see that there is class that carries info about endpoints in fabric8 .. . io.fabric8.kubernetes.api.model.Endpoints but I searched and could find no documentation on how to query a service for its Endpoints information ."
]
}
|
{
"confidence": [
78.56272888183594,
74.09352111816406,
73.89894104003906,
73.42094421386719,
71.34622192382812,
71.2095718383789,
67.84114074707031,
65.32208251953125,
64.7393569946289,
64.04119110107422,
63.453304290771484,
60.99938201904297,
60.811790466308594,
60.28825378417969,
59.2781982421875,
58.207969665527344,
57.784828186035156,
57.291099548339844,
56.483924865722656,
56.42478942871094
],
"content": [
"Question : I have a local kubernetes cluster setup from the RHEL7 binaries . When I attempt to install fabric8 on the cluster into a namespace everything looks good and start up...but when taking a look at the fabric8 console I get a No namespaces available message or something to that affect . We have port 8080 open locally and we are also setup for authentication on the secure port 6443 . I did notice that there were a bunch of OAUTH settings which I would guess are more specifically OpenShift or GCE . Is it even possible to deploy fabric8 into a native kubernetes cluster or is OpenShift required I can t find anything about it . Comment : I use github.com TheNewNormal kube-cluster-osx https : github.com TheNewNormal kube-cluster-osx to run it locally it seems to run - but I am just getting started . I installed using kubectl create -f http : central.maven.org maven2 io fabric8 apps console-kubernetes 2.2.104 conso le-kubernetes-2.2.104-kubernetes.json After a while kubectl get pods NAME READY STATUS RESTARTS AGE fabric8-nzdqj 1 1 Running 0 7m templates-llple 1 1 Running 0 7m both pods are available . but No applications are installed github.com fabric8io fabric8 issues 5718 https : github.com fabric8io fabric8 issues 5718 .. . Answer : I use fabric8 on kubernetes quite a lot . These days it works great Here s the latest instructions on installing it on kubernetes 1.2 : http : fabric8.io guide getStarted kubernetes.html .. . .. . There are various other options based on if you want to spin up kubernetes via vagrant or use GKE etc : http : fabric8.io guide getStarted index.html",
"Question : I installed Fabric8 on a Google Container Engine cluster and I used gofabric8 deploy with a custom domain and cd-pipeline app to install fabric8.io on it . It seems to be running if I do kubectl get pods but how can I access it I tried the public IP from the loadbalancer no hail yet . I looked at the forwarding rules in GKE and I added 443 next to 80 which was already there no effect . Then I looked at the Ingress kubectl get ing and there is none . What am I missing and how can I fix it Am I doing something strange and unsupported .. . Answer : We had an issue with the Ingress controller pod which looks like it s been fixed but I ve not had a chance to try it out yet https : github.com nginxinc kubernetes-ingress issues 34 .. . .. . So for now we ve been using the Google Container loadbalancer as it automatically creates external IPs for our services . We ve just updated our GKE docs so hopefully things are a bit clearer . From the docs we ve also linked to a silent demo of running fabric8 with CD pipelines etc on GKE so that might help too . http : fabric8.io guide getStarted gke.html .. . .. . FWIW to access the fabric8 console we use a service proxy from the Kubernetes API server the console inself then uses either ingress or external ips to access Jenkins Gogs Nexus etc Comment : To get the external ip s from the CLI rather than the fabric8 console you can run kubectl get services and get the external ip-address for each service . They can take a minute to create and you also need to watch out incase you exceed your GKE quotas these can be checked in the GKE dashboard . We ve added a section to the docs that helps delete old static ips and forwarding rules fabric8.io guide getStarted http : fabric8.io guide getStarted gke.html google-container-engine-quotas",
"Question : I have previous experience in Apache Camel and JBoss Fuse and I am new to Openshift version 3.x I am trying to deploy a camel application which is developed using java dsl and spring DI . I am using an external properties file to load the consumer and producer endpoint in camel.In JBoss Fuse I used the configAdmin services with the update-stratergy reload as shown below in my blueprint.xml .. . .. . The above configuration will reload the camelContext automatically when there is a change in the properties file .. . .. . How can I achieve the same functionality using fis-java-openshift : 1.0 template image in openshift 3.x Comment : Haven t tried this myself but you probably need to connect your docker-container to an existing disk that has your property file on that . So that disk space always exists Then when you update the property file there I would expect to see the desired results . .. . Answer : We wrote some docs on how to work with configuration http : fabric8.io guide develop configuration.html . Generally speaking on kubernetes the use of service-discovery http : fabric8.io guide develop serviceDiscovery.html and kubernetes secrets avoids most of the use cases for environment specific configuration . Ideally we would use the same Continuous Delivery pipelines http : fabric8.io guide cdelivery.html to change code or configuration to ensure things are properly tested before they hit production . However if you really really want to reload configuration on the fly in Java containers you can store configuration in a ConfigMap and mount it as a file inside the pod then have the Java code watch the file eg with spring-boot or ConfigAdmin .",
"Question : null .. . Answer : I have created two fabric8-camedl-cdi services both need to interact to exchange data . So i have made use of cxf endpoints by declaring setAddress with localhost init . Now i need to make use of headless- service functionality of kubernetes and make the two services interact without declaring address as local host . Please have glance at The @Endpoint annotation section in this url http : fabric8.io guide cdi.html . Hope you understood my requirement . Thanks in advance .",
"Question : I m a newbie using Fabric8-1.2.0.Beta4 and trying to deploy REST example application taken from http : tomee.apache.org examples-trunk rest-example README.html to Tomee on Fabric8 . Including openejb-cxf-rs and tomee-jaxrs don t seem to help . Only changes made : 1 web.xml Added the following as suggested by http : tomee-openejb.979440.n4.nabble.com Problem-deploying-REST-Examples-on-Eclipse-td4582815.html : .. . .. . 2 Added fabric8-maven-plugin and distributionManagement to pom.xml to use fabric8 : deploy to deploy the war file and create rest-example profile . After which I created a container to start the REST application . Able to see the index.html but always getting 403 or 404 errors when trying to call the WS . Pls help . Thanks .. . .. . .. . .. . Had removed the changes in web.xml downloaded apache-tomee-jaxrs-1.7.1 and configured it to run on this version of tomee it is able to run without issue . Would need figure out what s the difference between jaxrs and webprofile version so as to make it work on Fabric8-1.2.0.Beta4 .. . .. . .. . .. . Web.xml after change : .. . .. . beans.xml after change : .. . .. . Also added 4 features to my profile in Fabric8 : spring-web spring cxf-jaxrs fabric-rest Comment : Hm you will need to provide a stacktrace or code sample if you want any directed help . 4xx codes probably show that your application is running but jaxrs or however you are mapping your URIs and HTTP verbs is not being registered correctly . .. . Answer : webprofile version doesn t support JAXRS no provider but jaxrs and plus versions have it built-in . Comment : Hi rmannibucau. . I know that but Fabric8 will only download webprofile version . I don t know how to get it to download the JAXRS version or what can be done to add JAXRS to webprofile . Pls advise if you know how . Thanks Comment : Easiest is surely to add another container based on this one github.com fabric8io fabric8 blob https : github.com fabric8io fabric8 blob cef2ec8424876332ac6e74625cdc23257d1ba8d8 fabric fabric8-karaf src main resources distro fabric import fabric profiles containers tomee.profile io.fabric8.container.process.properties Comment : Thanks it downloaded the jaxrs version in fabric8 but however this REST application still does not run on fabric 8 same issue which it does run on my local standalone tomee jaxrs version . Comment : Changed web.xml and beans.xml see above now able to call the WS however it s throwing org.apache.cxf.interceptor.Fault at org.apache.cxf.service.invoker.AbstractInvoker.createFault AbstractInvoker.java : 170 .. . Caused by : java.lang.NullPointerException at org.superbiz.rest.service.UserService.create UserService.java : 46 . . Look like some issue with OpenEJB or hsqldb not loaded",
"Question : I am trying out a Fabric8 Spring Boot quickstart following the steps documented here https : fabric8.io gitbook springBootContainer.html I get the following error : .. . .. . I am running with Maven 3.3.9 and Java 1.8.0 91 on Ubuntu 14.04 .. . .. . Does this guide just not work or am I missing something from my configuration Points to consider : .. . .. . 1 . My .m2 settings.xml is untouched .. . 2 . The project archetype that I download as part of the first step is untouched aside from the mvn install .. . 3 . I am running Fabric8 inside JBoss Fuse 6.2.0.redhat-133 on my local machine .. . 4 . I have already tried running mvn -U fabric8 : deploy -DskipTests to update snapshots to no effect .. . 5 . This totally useless issue https : access.redhat.com solutions 1547723 is the only Redhat acknowledgement of this problem - and changing my Maven to the ancient 3.2.3 version necessitating a change to Java 6 runtime is not going to fix the problem going forward . .. . Answer : fabric8 v1 is part of JBoss Fuse and you can find documentation how to use it as part of the JBoss Fuse product documentation : http : developers.redhat.com products fuse overview .. . .. . The Maven Archetype goal to use is different version number than what you type you must use the version number of the JBoss Fuse product version you use . In the upstream community fabric8 is now on version 2 which is a different architecture based on Kubernetes and Docker . Unfortunately you found an old documentation of the fabric8 v1 in that gitbook . The fabric8 version 2 documentation is what you can find from the website at the documentation page : https : fabric8.io Comment : Thank you for your answer . Does version 2 of fabric8 come packaged within OpenShift Comment : Parts of fabric8 v2 are productized in the Fuse Integration Service product FIS - docs.openshift.com enterprise 3.1 using images xpaas images https : docs.openshift.com enterprise 3.1 using images xpaas images fuse.html And JBoss Fuse will in the future also migrate to fabric8 v2 likely in version 7.0 onwards . But its company decision so take my word as not official",
"Question : I m struggling to synthesise how to correctly use the maven-failsafe and fabric8-maven plugins together . I Want to run integration tests but in the pre-integration-tests phase start a docker-container running a DB and in the post-integration-phase stop the container . Looking at the fabric8 docker-maven-plugin documentation https : github.com fabric8io docker-maven-plugin blob master doc intro.md it states this is possible but none of the examples seem to illustrate this . Update 1 : .. . .. . This is the configuration that successfully worked for me : Comment : where-in the pom is this located and what goal do you execute and what isn t working the way you go seems correct if you run the pre-integration-test phase the fabric8 plugin should do something . .. . Answer : The way we recommend integration and system-testing in maven with docker is via the fabric8 arquillian plugin http : fabric8.io guide testing.html . That takes care of creating a new namespace for the test and provisioning all the kubernetes resources then running your JUnit test case to run the assertions etc . You ll need a docker image for the database and to wrap that up in a kubernetes yaml json file so that it can be run up front as your app is deployed by fabric8-arquillian Comment : I m not that clued up on the dev-ops side of things but I m not sure what Kubernetes has to do with this situation All I wanted to do was start a docker-container before running integration tests . Comment : ah - didn t grok you were just using docker on a single machine . Apologies see Roland s reply for working with a single machine with pure docker and no orchestration",
"Question : I m confused about how I can use multiple micro services made with spring-boot . When I read about Karaf http : karaf.apache.org documentation.html they always use Blueprint instead of Spring and I don t get the impression that it s possible to use it with Spring boot . Then I found Fabric8 http : fabric8.io but I cannot find any example of micro services made with Spring boot . All I need is being able to do hot deployment and configuration at runtime like Karaf does but with multiple Spring boot services . Is it possible Could anybody give me documentation or a project sample Thank you Comment : should this question rather be on programmers.stackexchange.com Comment : Read this article from source : spring.io blog 2015 07 14 microservices-with-spring https : spring.io blog 2015 07 14 microservices-with-spring with battery included . Comment : @Alex if this question is about Spring then no . If this question is about microservices then maybe . But this question is about Spring so no . Comment : @Alex I wasn t sure . I will let a moderator move my question if needed Comment : @DoNhuVy Oh that looks perfect I will read asap .. . Answer : Here s a demo video showing how to create a Spring Boot microservice https : vimeo.com jbossdeveloper review 170830750 b3c8467593 in the Fabric8 Microservices Platform http : fabric8.io and having a complete Continuous Deployment pipeline http : fabric8.io guide cdelivery.html get created to do the following : .. . .. . package the code create the docker image and kubernetes manifest .. . perform system integration tests .. . deploy to the staging environment with rolling updates .. . wait for optional human approval .. . deploy to the production environment with rolling updates .. . .. . Any code or configuration change in the git repository kicks off rolling updates automatically - which is a form of hot deployment . e.g . if you are running 3 containers in production new containers are spun up with the new code and or config based on the rolling upgrade policy . Typically new containers start when they are ready old ones are taken down say 1 at a time or you can do them all at once if you prefer . The rolling upgrade is included in any service load-balancing so new containers only get invoked when they are ready . Given your use of OSGi you may want the containers to keep running and just mutate on the fly . Firstly the whole move to immutable infrastructure e.g . docker images means software gets simpler and easier to reason about . Rather than rolling new bundles code config in out on the fly you just make a new image and spin that up . Mutating on the fly leads to multi-threaded code having to stop and restart services on the fly which can cause all kinds of complex hard to reproduce bugs and resource leaks as you have large complex object dependency graphs of services starting stopping on the fly . On the Fuse team we ve wasted many man years fixing bugs in restart logic and I m sure there s still a zillion bugs hidden there in restarting OSGi services on the fly . So my preference really is to use a Continuous Deployment pipeline http : fabric8.io guide cdelivery.html to roll out all changes whether code or configuration . Sure there s some latency added between the time you make a change and the moment a process is processing a new request with the new code config - but you have more quality and reliability baked in . Plus its trivial to roll back . You can also easily do rolling upgrades of the change so you get fast feedback if the change breaks things for a small subset of your users traffic rather than a big bang . That being said if you still really really want production JVMs to reload code and or config on the fly without testing it first in a big bang approach with no easy rollback there are still some options available . They are described in the configuration microservices documentation http : fabric8.io guide develop configuration.html . Essentially it boils down to using a ConfigMap in Kubernetes http : kubernetes.io docs user-guide configmap or a git repository volume http : kubernetes.io docs user-guide volumes gitrepo in both cases the configuration is exposed as volumes files - the Java code can then watch the files and reload on the fly . You can do this via OSGi Config Admin or via Spring Boot http : docs.spring.io spring-boot docs current-SNAPSHOT reference htmlsingle howto-hotswapping - whichever development framework you pick really . Just remember the tradeoff of the benefits in latency from hot-reloading from the reduced quality increased bugs and operational issues of moving away from immutable infrastructure and Continuous Delivery Comment : Completely agreed especially in a Microservices world where turnaround times are supposed to be quick because of the smaller artefact footprints . It should to be affordable to restart whole micro apps in order to get to a well defined always reproducible state . And since it mirrors the way applications are operated in production its a more realistic workflow . But this only works really well if development roundtrip times can be kept short which is imho a key requirement . Comment : I agree that hot deployment is not necessary to have short dev cycles . I personally work with OSGi in the same way as James showed for spring-boot . I create fully packaged deployment units in an automated pipeline . The main difference is that I propose to not start with microservices but rather a modular application in one process . It is much simpler . Then if needed you split out the modules with different team or dev cycles as individual microservices .",
"Question : I recently started working on a code base that uses fabric8 to manage containers pods services etc . in kubernetes . After creating a service for a given pod I need to inform our end users of the external IP via which they can access said service . From the command-line kubectl I would do a describe and get output like this .. . .. . I used wireshark to trace the REST API calls that were being made when the above command runs and it seems the raw Kubernetes REST API accesses the above info via a URL like this .. . .. . So I could theoretically get the info I want via the raw Kubernetes REST API . But since we are using fabric8 I would prefer to stick to that if there is any way to accomplish this with their API . I see that there is class that carries info about endpoints in fabric8 .. . io.fabric8.kubernetes.api.model.Endpoints but I searched and could find no documentation on how to query a service for its Endpoints information . Also when using the fabric8 API to watch for events we have tried looking at service.getStatus.getLoadBalancer.getIngress whenever we get a an event associated with our service but this is always empty .. . .. . would be most grateful for any tips or guidance... . -chris .. . Answer : The Fabric8 client has the following API call : .. . .. . client.endpoints .get .. . .. . This would give you the list of all end points . Now there are ways in which you can limit the list that you receive to a particular namespace labels using : .. . .. . client.endpoints .inNamespace 5683616f16426028459a535c .withLabel name spark-master .list Comment : Thanks Vijay btw : where can i find the javadocs for this stuff . cb Comment : github.com fabric8io kubernetes-client https : github.com fabric8io kubernetes-client",
"Question : I would have a question about the wonderful tool that I just discovered named fabric8 http : fabric8.io . When I deploy a CXF SOAP service into the system it is available at http : HOSTNAME : 8181 cxf . Until now all our stack was deployed into a tomcat container secured using TLS encryption on the regular 8443 port using or not client authentication . We by the way use WSDL policies to enforce it . Is it possible to setup this TLS encryption using fabric8 karaf Jerome .. . .. . P.S : I wanted to add the new tag fabric8 but I do not have enough points to do that so I tagged using fusefabric . Edit 1 : .. . .. . Thanks @iocanel It seems to work... . well mostly : - .. . .. . In fact if I start from a fresh fabric8 installation and if I setup in etc org.ops4j.pax.web.cfg : .. . .. . Then I can browse the hawtio web interface on the 8443 port . However as soon as I initialise the container with fabric : create the port is not available anymore . If I restart fabric8 then the logs are full of : .. . .. . Do you have an idea Jerome Comment : Could you test this with a vanilla Karaf don t know what this fabric stuff is doing on top . Comment : @AchimNierbeck I tested on a basic karaf configuration with the web-console and it works indeed . It seems specific to fabric8 . Comment : so stick to it : Comment : : . In fact I misunderstood the @iocanel answer . I modified etc org.ops4j.pax.web.cfg whereas I now understand that I have to modify org.ops4j.pax.web.properties in the fabric8 default profile . Comment : BTW I tried adding a fabric8 tag too . I hope that helps .. . Answer : I posted an issue : https : github.com fabric8io fabric8 issues 696 .. . .. . Let s see if there is a specific configuration to apply .",
"Question : I would have a question about the wonderful tool that I just discovered named fabric8 http : fabric8.io . When I deploy a CXF SOAP service into the system it is available at http : HOSTNAME : 8181 cxf . Until now all our stack was deployed into a tomcat container secured using TLS encryption on the regular 8443 port using or not client authentication . We by the way use WSDL policies to enforce it . Is it possible to setup this TLS encryption using fabric8 karaf Jerome .. . .. . P.S : I wanted to add the new tag fabric8 but I do not have enough points to do that so I tagged using fusefabric . Edit 1 : .. . .. . Thanks @iocanel It seems to work... . well mostly : - .. . .. . In fact if I start from a fresh fabric8 installation and if I setup in etc org.ops4j.pax.web.cfg : .. . .. . Then I can browse the hawtio web interface on the 8443 port . However as soon as I initialise the container with fabric : create the port is not available anymore . If I restart fabric8 then the logs are full of : .. . .. . Do you have an idea Jerome Comment : Could you test this with a vanilla Karaf don t know what this fabric stuff is doing on top . Comment : @AchimNierbeck I tested on a basic karaf configuration with the web-console and it works indeed . It seems specific to fabric8 . Comment : so stick to it : Comment : : . In fact I misunderstood the @iocanel answer . I modified etc org.ops4j.pax.web.cfg whereas I now understand that I have to modify org.ops4j.pax.web.properties in the fabric8 default profile . Comment : BTW I tried adding a fabric8 tag too . I hope that helps .. . Answer : The default profiles contains the org.ops4j.pax.web.properties file . By editing this file you could configure ssl as described here : https : ops4j1.jira.com wiki display paxweb SSL+Configuration Comment : thanks a lot but I face another issue see my edit . Comment : Ok in fact I misunderstood your answer . I modified etc org.ops4j.pax.web.cfg instead of the org.ops4j.pax.web.properties file in the default profile",
"Question : Is there a way to use Fabric8 for PHP project All the sample I can find is for java and nodejs . I am using Fabric8 on Google Container Engine with Kubernetes . .. . Answer : There s not at the moment but we can look to add one in for the next release . There s Java nodejs golang swift and ruby already but we can add php and .net hopefully in the next few days . Comment : Thanks James . I ll wait for the sample then . Comment : Hi Ivan - I forgot to mention that we added a real simple PHP https : github.com fabric8-quickstarts php-example and .Net examples along with corresponding Pipelines in a recent release . Until we have a upgrade command you should be able to just delete the fabric8 related replication controllers with kubectl delete all -l provider fabric8 and re run gofabric8 deploy Comment : Thanks James will try it today",
"Question : I am using fabric8.io to orchestrate application containers in Kubernetes . I am looking to create a Service that manages a pod with a certain label on a certain port . Is there a specific example of the API that does this . I couldnt find it in the examples .. . .. . https : github.com fabric8io kubernetes-client blob master kubernetes-examples src main java-io fabric8 kubernetes examples FullExample.java L75 .. . .. . There dont seem to be javadocs available .. . Answer : Fabric8 s Kubernetes Client is using a generated model and DSL that has the exact same structure as as the JSON and YAML configuration . So in order to create a Service instance that looks like : .. . .. . .. . .. . You can use the following code : .. . .. . If don t need to hold a reference of the service object and you just want to create it you can inline it like : .. . .. . It s even more compact that the JSON equivalent because default-value can be committed and also some stuff like selector can be optionally inlined in a single line . This is something that not only applies to Service but to every-single Kubernetes Openshift resource . If you have the JSON or YAML in-place you can load them easily by providing an input stream to the client : .. . .. . There are more options here like directly creating the service : .. . .. . It s always help to remember that structure is always the same regardless of lang format . Pretty much anything can be inlined so tab completion in your IDE can be really really helpful .",
"Question : Im using fabric8 Kubernetes Java Client and Im accessing Kubernetes through HTTP I followed the example from fabric8 https : github.com fabric8io kubernetes-client blob master kubernetes-examples src main java-io fabric8 kubernetes examples ExecExample.java but I get the following error : .. . .. . What do I need to do to upgrade my connection to http 2 Comment : That looks like the Kubernetes API server didn t like something about your request . Do you have any more details on the HTTP 400 error .. . Answer : I found out that this has to do with http2 because Kubernetes exec uses SPDY the problem went away when I upgraded to curl version 7.36 and installed nghttp2 on the server . After installing curl I was able to get the response by adding some headers .. . .. . curl -H Connection : upgrade -H Upgrade : SPDY 3.1 master url : port pod exec",
"Question : I am using fabric8 to get the status of a kuberenetes pod by the following code . I deploy an app within a container and there is a one-to-one mapping between a container and pod . My requirement is to redeploy the application . So after deleting the pod I check for the status and the method returns a status of Running while deleting . I am unable to identify that the pod has been deleted since the newly deployed app also return a status of Running . Are there any other variables of a pod that can be used to identify a healthy pod vs a terminating pod . .. . Answer : One way of doing this is to perform a rolling upgrade . This will ensure that your deployed application incurs no downtime new pods are started before old pods are stopped . One caveat is that you must be using a replication controller or replication set to do so . Most rolling deployments will simply involve just updating the container s image for the new version of software . You can do this through Java via fabric8 http : fabric8.io s Kubernetes Java client https : github.com fabric8io kubernetes-client . Here https : github.com fabric8io kubernetes-client blob a47d2e288599559069481895c8b6fc7cf3fbab3d kubernetes-examples src main java-io fabric8 kubernetes examples FullExample.java L147 s an example : .. . .. . You can change any configuration of the replication controller replicas environment-variables etc . The call will return when your pods running the new version are Ready the old replication pods have been stopped deleted .",
"Question : I try to get started with fabric 8 and open shift on docker . An open shift instance single docker-container is running as described here : https : docs.openshift.org latest getting started administrators.html running-in-a-docker-container . I installed fabric 8 as http : fabric8.io guide getStarted openshift.html and now the basic pods are running . But I cannot reach the service .. . .. . In the troubleshooting section of : http : fabric8.io guide getStarted openshift.html some ideas like .. . .. . are suggested . But I do not know how to enable them in the docker-container . Do you have any ideas why I cannot reach my basic fabric8 console Comment : try to ping curl port 80 .. . Answer : If you are trying to access a service on OpenShift remotely then you need to ensure you ve deployed a router added a Route . You can read more on routing in OpenShift at https : docs.openshift.com enterprise 3.0 architecture core concepts routes.html . In this case if you add a route with : .. . .. . cat EOF kubectl create -f - apiVersion : v1 kind : Route metadata : name : fabric8-console pec : host : EXTERNALLY RESOLVE DNS to : kind : Service name : fabric8 EOF .. . .. . As some extra info you cannot target ping at a port . Ping uses a different network protocol ICMP which doesn t have the notion of ports . Also both services pods don t respond to ping so you will not be able to ping them . If you re trying to check connectivity then you can use the nc utility : .. . .. . This will report connection success if the address port is reachable . Note that in OpenShift pod IPs service IPs are generally only routeable inside the cluster i.e . on nodes so trying this from outside the cluster will probably fail . Comment : Thank you very much . Now I have a different problem chat.stackoverflow.com rooms 105350 fabric8 http : chat.stackoverflow.com rooms 105350 fabric8 please may I ask you a couple of questions here . Comment : Sorry not enough karma - I feel this should be the accepted answer not the other one . You can come talk to the fabric8 team on IRC at freenode.net fabric8 Comment : Fixed changed to better solution",
"Question : How can we call a jboss fuse soap based webservice from another fuse soap service using kubernetes @endpoint @servicename annotations in fabric8 environment . Providing a example or reference is helpful . .. . Answer : If you re asking how to add an annotation one does from kubectl annotate -h : .. . .. . Update pod foo with the annotation description and the value my frontend . If the same annotation is set multiple times only the last value will be applied .. . kubectl annotate pods foo description my frontend .. . .. . But I would not use annotations to go directly to the endpoints . There are more standard ways to connect application tiers environment-variables and dns : http : kubernetes.io v1.0 docs user-guide connecting-applications.html accessing-the-service",
"Question : I am interested in hearing as to whether there are any frameworks using kubernetes or otherwise that one can use to write end-to-end system tests with of a series of modules applications that talk to each other in a more complex system . Alternatively I d be very interested in hearing if it is possible to write system tests using kubernetes from a first principles approach . My use-case is that the modules in question may be written in many different frameworks and languages but they can all be dockerised individually . I know that fabric8 https : github.com fabric8io fabric8 claims to support system-testing using kubernetes and arquillian http : fabric8.io guide testing.html however that seems to have the distinct disadvantage that all the applications need to be written in java which is very much a no-go for me . Update : It does look like it is possible to write end-to-end tests in kubernetes for particular examples use cases see https : github.com kubernetes kubernetes issues 6183 . However this issue doesn t seem to have been touched for a while . Though this does give me some modicum of hope that what I m after is not impossible . Ideally I wouldn t mind being walked through pointed to work that might help me see an example of e2e tests for a hello world kubernetes example like k8petstore or simpler . In particular the relevant part of the kubernetes project seems to be https : github.com kubernetes kubernetes tree master test e2e . .. . Answer : FWIW you can use fabric8-arquillian to test stuff that are not written in java . The only thing that needs to be in java is the test case itself . Comment : I see that is helpful thank you .",
"Question : I am using fabric8.io to orchestrate application containers in Kubernetes . I am looking to create a Service that manages a pod with a certain label on a certain port . Is there a specific example of the API that does this . I couldnt find it in the examples .. . .. . https : github.com fabric8io kubernetes-client blob master kubernetes-examples src main java-io fabric8 kubernetes examples FullExample.java L75 .. . .. . There dont seem to be javadocs available .. . Answer : I m using the same library and you re right the docs are a bit lacking in the creation department . I had to use Eclipse to kind of explore the API by hand because I couldn t find any explanation of this either . Here s how it works . So basically you use the KubernetesClient to create all objects . It will have methods services replicaiton controllers etc for each object and any actions associated with them . The second line loads your service definition file or String into a Service object . Then you use the client to create the object in Kubernetes . The KubernetesHelper object can load yaml or json . You can also use the ServiceBuilder object to build it programatically . EDIT : And after looking back through the answers tagged kubernetes I found this in a question asking basically the same thing : example to deploy docker image on kubernetes from java http : stackoverflow.com questions 33267107 example-to-deploy-docker-image-on-kubernetes-from-java",
"Question : I try to get started with fabric 8 and open shift on docker . An open shift instance single docker-container is running as described here : https : docs.openshift.org latest getting started administrators.html running-in-a-docker-container . I installed fabric 8 as http : fabric8.io guide getStarted openshift.html and now the basic pods are running . But I cannot reach the service .. . .. . In the troubleshooting section of : http : fabric8.io guide getStarted openshift.html some ideas like .. . .. . are suggested . But I do not know how to enable them in the docker-container . Do you have any ideas why I cannot reach my basic fabric8 console Comment : try to ping curl port 80 .. . Answer : Have you created a route to reach the fabric8 pod in openshift"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
openshift
|
UNK_RELATION
|
blend@expression-blend@63
|
blend -- microsoft blend for visual-studio formerly microsoft @placeholder is a user-interface design tool developed and sold by microsoft for creating graphical interfaces for web and desktop applications that blend the features of these two types of applications .
|
{
"confidence": [
70.57585906982422,
61.75722885131836,
61.06243896484375,
60.771968841552734,
59.43613815307617,
59.22099304199219,
59.05546951293945,
58.35200500488281,
58.13652420043945,
56.73197555541992,
56.73197555541992,
56.39738464355469,
55.66978454589844,
55.34596252441406,
55.23228073120117,
55.23228073120117,
54.7773551940918,
54.27558135986328,
54.14691925048828,
53.84767150878906,
53.84767150878906,
53.74113082885742,
53.58335494995117,
53.07173538208008,
52.14741897583008,
51.94149398803711,
51.94149398803711,
51.80889892578125,
51.157684326171875,
51.052433013916016,
50.91291427612305,
50.604095458984375,
50.491058349609375,
50.491058349609375,
50.343631744384766,
50.29443359375,
50.053558349609375,
50.053558349609375,
50.015262603759766,
50.008934020996094,
49.94178771972656,
49.73881530761719,
49.47721481323242,
49.44288635253906,
49.11626434326172,
48.923316955566406,
48.923316955566406,
48.90807342529297,
48.76530838012695,
48.73691940307617,
48.668949127197266,
48.668949127197266,
48.668949127197266,
48.668949127197266,
48.668949127197266,
48.668949127197266,
48.61526870727539,
48.3986701965332,
48.03425598144531,
48.03425598144531,
47.991825103759766,
47.9173469543457,
47.830970764160156,
47.57260513305664,
47.5712776184082,
47.530426025390625,
47.50960922241211,
47.28886795043945,
47.23065948486328,
46.96869659423828,
46.96869659423828,
46.96869659423828,
46.92344665527344,
46.830684661865234,
46.73388671875,
46.713836669921875,
46.59596633911133,
46.44404983520508,
46.296382904052734,
46.05000686645508,
46.02177810668945,
45.71874237060547,
45.606971740722656,
45.599674224853516,
45.599674224853516,
45.5304069519043,
45.503929138183594,
45.37963104248047,
45.03170394897461,
45.029178619384766,
44.911773681640625,
44.74195098876953,
44.74195098876953,
44.51435089111328,
44.47740936279297,
44.428749084472656,
44.35457229614258,
44.311031341552734,
44.311031341552734,
44.311031341552734
],
"content": [
"To resolve such problems with Visual Studio or Blend simply delete LOCALAPPDATA Microsoft VisualStudio version ComponentModelCache or LOCALAPPDATA Microsoft Blend version ComponentModelCache respectively then restart your Visual Studio or Blend .",
"It would be nice if Microsoft allows blend to create plain web sites .",
"This is a question about the blend design tool in Visual Studio 2012 .",
"in Blend or Visual Studio or not",
"From Visual Studio 2012 Microsoft had made Expression Blend available as a part of Visual Studio and not as a separate package as was before .",
"I want Blend for Visual studio to design the ui",
"Tick the Blend for Visual Studio option",
"Sadly I had to switch to the newest Version Microsoft Expression Blend for Visual Studio 2015 .",
"possible duplicate of Blend for Visual Studio 2012 - No design view http : stackoverflow.com questions 13084445 blend-for-visual-studio-2012-no-design-view",
"How can microsoft get this to work in VS2010 and not in Blend 4",
"For such properties Blend will only understand and generate the Microsoft-specific vendor prefixes .",
"For instance for VS2013 it s default path is C : Program Files x86 Microsoft Visual Studio 12.0 Blend .. . 4 .",
"visual-studio would build correctly but blend choked .",
"I m working with visual-studio-2012 and blend for visual-studio-2012 simultaneously .",
"Blend from visual-studio-2012 is available .",
"It runs side-by-side with Blend for Visual Studio .",
"Microsoft Xamarin should be able to let Blend support Xamarin.Forms in the future but not now .",
"I can do it the other way around from blend to visual-studio but not visual-studio to blend .",
"Blend support was added in Update 1 Blend for Visual Studio 2012 Update 2 has WPF support built-in .",
"Solutions are the same for Visual Studio and Expression Blend .",
"I know there was a recent release Blend for Visual Studio .",
"At the moment Blend for Visual Studio does not have support for building WPF or Silverlight applications enabled .",
"You need to include System.Windows.Interactivity.dll which is located at Blend 3 pathing ...Program Files Microsoft SDKs Expression Blend 3 Interactivity Libraries WPF .. . .. . That file is redistributable as defined by Blend 3 pathing ...Program Files Microsoft SDKs Expression Blend 3 Redist.en.txt",
"I see a lot of refs to something called blend for visual-studio which I understand a W8 version of blend .",
"then Remove the ticks for the option Blend for Visual studio .",
"I was re-building the project in Visual Studio and then going to Expression Blend I had to build it IN Expression Blend for it to work .",
"The current version of Blend Blend 2015 was mentioned in the Visual Studio 2015 release notes in July 2015 .",
"I m having troubles using Blend with my visual-studio solution .",
"As of Visual Studio 2012 the XAML design experience is based on the same code that runs in Expression Blend for Visual Studio .",
"How to create a motion path in Blend 5 visual-studio-2012 .. . .. . There is no convert to motion path as was in Blend 4",
"Blend does feature a designer for regular WPF and Silverlight applications and controls .",
"What is the best way to quickly get up to speed on Microsoft Expressions Blend 2",
"But for me it helped to rebuild the project directly in Blend without using Visual Studio .",
"Note : I am using Blend for Windows Visual Studio 2013 .",
"I am tying to build an app in Visual Studio 2015 in C and I want to create a User Interface using Blend .",
"in Blend .",
"In Expression Blend for Visual Studio 2012 the list is somewhat extended but still hardcoded .",
"How do I author a project created in Visual Studio 2012 with Blend",
"Move the extracted folder into the C : Program Files x86 Microsoft Visual Studio 12.0 Blend ProjectTemplates en CSharp WindowsPhone directory .",
"There you will find out how to do the Visual Studio and Blend design-time stuff for Silverlight .",
"If you don t want to update visual-studio yet you can install the Blend + SketchFlow Preview for Microsoft Visual Studio 2012 http : www.microsoft.com en-us download details.aspx id 30702",
"i started with Microsoft Blend and created a new WPF Application but i cannot find the settings for the screen-size as shwon in the video .",
"The Blend Insider Blog announced http : blendinsider.com technical announcing-blend-sketchflow-preview-for-visual-studio-2012-2012-08-15 Blend some time ago and if I can trust myself to read a table the one on this page tells me that all Blend functionality for .Net 4.5 Applications is incorporated in Visual Studio Professional .",
"Starting with WPF .. . .. . I personally work with a combination of Microsoft Visual Studio https : www.microsoft.com visualstudio eng environment and Microsoft Expression Blend https : www.microsoft.com expression eng elements editing .",
"Expression Blend is used in creating Sliverlight XAML .",
"I was right-clicking in Visual Studio and selecting Open In Expression Blend .",
"I am using Expression blend 4 and WPF Visual Studio .",
"I did block blend in firewall but blend tries to connect until timeout .",
"I am using Microsoft Expression Blend 3 + SketchFlow Version 3.0.1927.0 for a Visual Studio 2008 Windows Embedded CE program .",
"And also tell me the Difference between Expression Blend 4 and Blend for Visual Studio 2012 .",
"You can have it open in both Visual Studio and Blend at the same time .",
"You re prompted in Visual Studio if you make a change in Blend and vice versa .",
"Personally I create the new application in Visual Studio first then open it in Blend .",
"Blend comes with Visual Studio 2012 Pro http : www.microsoft.com expression .",
"Where can I find Expression Blend 4 for Visual Studio 2010",
"In blend for visual-studio-2012 i can t seem to find the resources tab",
"Although it should be possible to build an application entirely in Blend I would recommend writing your code in Visual Studio and only work with you XAML in Blend .",
"My understanding is that Microsoft Expression Blend is not available for free except for limited time trial .",
"Using C Visual Studio 2008 Express and Expression Blend 3 .",
"With Behaviors and Actions in Blend for Visual Studio 2013 you can use the InvokeCommandAction .",
"questions 19802227 where-is-the-shortcut-open-in-blend-in-visual-studio-2013 3 answers .. . .. . I have built a wpf application in visual-studio and would like to get the project into expression-blend to design the view .",
"To locate Blend type Blend in the Search box .",
"Using visual designer either Blend or the built-in Visual Studio is sometimes problematic .",
"The Blend design surface is designed for building apps .",
"For Blend not VS .",
"I m having a trouble on Blend for Visual Studio 2013 when I m opening a project and the pointing cursor shows after the loading cursor the blend does not show my UIElements on the Objects and Timeline tab and when I click on the blend window the Blend crashes .",
"Change Directory to Blend SDK : cd C : Program Files x86 Microsoft SDKs Expression Blend.NETFramework v4.5 Libraries .. . .. . 3 .",
"Would Expression Studio Blend be useful for my purpose",
"You can open your solution through the file menu in expression-blend or by right clicking on a xaml file in Visual Studio and select Open In Expression Blend .",
"I m new to Visual Studio and Blend and i m trying to see their difference .",
"Using Visual Studio C Express 2008 and Blend 3 .",
".. . You can also open a project in Blend from within Visual Studio .",
"You generally work with a project in Blend and work with the solution in Visual Studio .",
"I get this error in one machine with windows-7 : Blend for visual-studio supports only windows store app development on windows-8 . to develop windows presentation foundation WPF or silverlight applications please install Blend + SketchFlow Preview for Visual Studio 2012 .",
"At least in Blend 4 .",
"Also can someone recommend a good book that covers how to create WPF and or Silverlight applications using Expression blend 4 and Visual Studio 2010 together .",
"According to this http : blendinsider.com technical available-now-blend-for-visual-studio-2012-2012-08-15 Blend 4 is the way it s meant to work .",
"Available for download at Microsoft get the trial it will auto-activate after install if Blend 3 is installed .",
"I can t stand blend .",
"Blend is a WYSIWYG front-end for designing XAML-based interfaces for WPF and Silverlight applications and it s good for templates visual states and animation .",
"I use blend for creating templates or styles mostly .",
"You can also attach Visual Studio to an open instance of Blend .",
"I have been having a hard time trying to implement content navigation with slide in effect inside a window just like the one in Visual Studio Ultimate Setup.exe using Microsoft Blend for Visual Studio 2013 .",
"blend text block http : i.stack.imgur.com uQyVQ.png .. . .. . It looks just as in Blend good job Blend team in emulator and a real device .",
"Actually Blend 4 is a free download for those with Blend 3 so there is NO Reason to not have blend 4",
"When looking closer I had to open my project with Blend for Visual Studio 2013 Still unsure as to why the open in Blend option does not appear",
"Our version of Microsoft Expression Blend Preview for Silverlight 5 has expired on 30th June and there are NO online license purchase options available .",
"If that doesn t clear it out restart Blend .",
"For those of you using Expression Blend as well as Visual Studio in your real projects please help me understand how you use Blend and Visual Studio in your everyday development design tasks here is a real scenario : .. . .. . I created the following simple WPF application in Visual Studio .",
"We will be building on windows-8 but we may consider windows-10 and I have WPF as an option but I am not sure whether expression-blend as a design tool will work as it seems to be discontinued by Microsoft .",
"This is not a question for Expression blend 4 .",
"32bit interop on 64bit machine + Blend",
"The problem is in Blend assembly search path .",
"Blend settings http : i.stack.imgur.com P004r.png",
"Indeed having Visual compile the Any CPU config seems to fix Blend .",
"Now even if I : .. . .. . Select Reset Current Workspace .. . .. . Or restart Microsoft Expression Blend... . .. . I can t get the XAML view back .",
"How else can I add a StoryboardCompletedTrigger in Blend",
"I do not believe that Blend 3 supports Visual Studio 2010 projects .",
"I m not sure what the plan is for Blend and supporting Visual Studio 2010 solutions .",
"Is it possible that you are running Visual Studio as Administrator and Expression Blend normally"
]
}
|
{
"confidence": [
89.1431884765625,
85.61463928222656,
84.61604309082031,
83.0594253540039,
80.1368637084961,
79.6100082397461,
79.5894775390625,
78.06302642822266,
77.70933532714844,
76.887451171875,
76.77610778808594,
76.66040802001953,
75.94246673583984,
75.71788024902344,
74.26221466064453,
73.43994140625,
73.29559326171875,
72.74299621582031,
71.4781494140625,
71.33483123779297
],
"content": [
"Question : Everything I see pertaining to Blend for Visual Studio 2012 talks about making Window s store apps . Am I correct in assuming it can be used for regular desktop applications too .. . Answer : Yes and no . The Windows Store application templates can only be used for the Windows Store model -type applications also known as Tifkam Metro or Immersive . Blend does feature a designer for regular WPF and Silverlight applications and controls . However it isn t a tool for the end-to-end creation of applications it is strictly a user-interface design tool . Note that Visual Studio shares the exact same WPF designer codebase . Use Blend if you re a non-programmer designer or if you need a superior Tifkam HTML or Jupiter XAML not-WPF designer tool .",
"Question : null .. . Answer : I will be starting the research phase for a Signage player that we will start building in the next few months and I wanted to know what my options are for the signage player . We will be building on windows-8 but we may consider windows-10 and I have WPF as an option but I am not sure whether expression-blend as a design tool will work as it seems to be discontinued by Microsoft . We will definitely need a design tool which customers will use to create signage content . Think of content as something similar to animated web pages . What are my options If we go to windows-10 are there any blend type tools Comment : Not sure what you mean by seems to be discontinued by Microsoft . The current version of Blend Blend 2015 was mentioned in the Visual Studio 2015 release notes in July 2015 . visualstudio.com en-us news vs2015-vs.aspx Blend https : www.visualstudio.com en-us news vs2015-vs.aspx Blend Comment : Sorry I saw a reference to expression studio . Thanks for the info . Question I have is do I invest time working in wpf or do I look at an alternative on windows-10 . Comment : Also can I get expression-blend as a standalone so customers could use it as design tool I cannot see them buying vs2015 .",
"Question : I want to make an online simulation for physics and chemistry . So that everyone would be able to run this simulation in browser . What do you suggest me to use . And also tell me the Difference between Expression Blend 4 and Blend for Visual Studio 2012 . I have visited Microsoft website but could not find a satisfied answer . .. . Answer : From Visual Studio 2012 Microsoft had made Expression Blend available as a part of Visual Studio and not as a separate package as was before . Expression Blend 4 supports Silverlight 4 and WPF 4 and is also compatible with Silverlight 3 and WPF 3.5 SP1 . If you are trying to build Silverlight Applications you can try using Blend for Visual Studio 2012 2013 as its the latest available application with latest framework - allowing you to use recent APIs . Comment : but brother when I open blend only two types of projects can be created as the welcome screen shows HTML project or XAML project . Which one is used for Silverlight Application . do I need some extra Plugins or Addons . Comment : It may be because you are using Expression Edition of Visual Studio for Windows 8 . Trying using Professional Edition - Cheers . Comment : Thanks for your help mate .",
"Question : I am seriously confused about what to edit the animation and UI State part of my WPF Frontends with . Expression Blend 4 used to be a really good product but MS has really lost me http : net-fx.blogspot.de 2012 12 current-and-future-microsoft-expression.html in their product policies.. . The Blend Insider Blog announced http : blendinsider.com technical announcing-blend-sketchflow-preview-for-visual-studio-2012-2012-08-15 Blend some time ago and if I can trust myself to read a table the one on this page tells me that all Blend functionality for .Net 4.5 Applications is incorporated in Visual Studio Professional . While I can verify this partially Editing Control Templates etc . look good at first sight I really wonder how i can edit UI States and keyframe timeline animations in VS 2012 Seems http : stackoverflow.com questions 10874005 how-can-i-design-an-animation-with-a-wpf-project-in-visual-studio-2012 I m not the only one who wants to know.. . The Blend version that comes with VS 2012 Pro is for store apps only...On the other side there smoke rising http : stackoverflow.com questions 12529238 blend-in-visual-studio-2012-missing-the-resources-window-i-used-to-use-in-ble because of missing features.. . Comment : While there seems to be a real lack of question marks I think this is still an understandable issue . Stackoverflow seems to be overrun by wannabe moderators lately . Sorry but obviously Neutrino understood the question here...Instead of improving the quality of questions to make the FAQ site more complete some of you just remove stuff that can be answered.. . .. . Answer : To enable Expression Blend support for WPF apps in VS2012 you need Update 2 for VS2012 . That is available here : .. . .. . http : www.microsoft.com en-us download details.aspx id 38188 Comment : Thanks @Neutrino . I will try that",
"Question : I am new to Creating WPF GUI Applications . I am a Mid Level Programmer . I dont have any idea or knowledge about the Graphics Development . I would like to know how do I use the UI Elements designed in Photoshop in my WPF Application . Eg : I would like to replace the default textbox or the button in WPF with the button or textbox designed in Adobe Photoshop . Last Information : I am using Expression Blend 4 . Any Help Would Be Appreciated Thanks Comment : you need to do Styling and Templating http : msdn.microsoft.com en-us library ms745683 28v vs.110 29.aspx for the same . Also have a look at Customizing the Appearance of an Existing Control by Creating a ControlTemplate http : msdn.microsoft.com en-us library ee230084 v vs.110 .aspx Comment : Try import-adobe-photoshop-file-in-expression-blend-4 http : www.c-sharpcorner.com UploadFile eda428 import-adobe-photoshop-file-in-expression-blend-4 .. . Answer : Starting with WPF .. . .. . I personally work with a combination of Microsoft Visual Studio https : www.microsoft.com visualstudio eng environment and Microsoft Expression Blend https : www.microsoft.com expression eng elements editing . Blend is a WYSIWYG front-end for designing XAML-based interfaces for WPF and Silverlight applications and it s good for templates visual states and animation . .. . .. . Editing Templates .. . .. . If you are working with templates a nice tool is WPF Theme Editor http : www.devexpress.com Products NET Controls WPF Themes theme-editor.xml by DevExpress . It integrates with Blend and the tree browser and template hierarchy are very useful for locating styles . One thing you ll always find helpful is access to the actual structural templates for the elements . I usually find myself visiting the DevExpress WPF Controls http : documentation.devexpress.com WPF CustomDocument7875 website which has a very comprehensive list of libraries and controls . The Demo Center for DevExpress https : www.devexpress.com support demos is also a great downloadable app for extracting and editing templates . I find it particularly useful with complex elements like charts not included in Blend where you can toggle the visibility of elements and then move the code to your dev space . .. . .. . Creating Graphics .. . .. . For working with graphics themselves I found Microsoft Expression Design http : www.microsoft.com en-nz download details.aspx id 36180 to be quite good for drawing and exporting vectors into png WPF or Silverlight formats . It has a nice simple set of tools and you can import elements from vector . Also version 4 is free . .. . .. . Testing .. . .. . I just discovered this nice tool for testing live called Snoop https : snoopwpf.codeplex.com . It s open-source and it allows you to spy browse the visual tree of a running WPF application without the need for a debugger and change properties live . For all of these you will probably need at least a basic knowledge of how to write read WPF . I personally use all of the previous and write custom styles for custom elements . Comment : Thanks for the information . But I am not so much of Designer Geek . The real situation is this : I have got UI Elements designed in Photoshop . I want the WPF button to look like the button designed in photoshop . So how do i achieve that Comment : Try http : www.c-sharpcorner.com UploadFile eda428 import-adobe-photoshop-file-in-e xpression-blend-4 http : www.c-sharpcorner.com UploadFile eda428 import-adobe-photoshop-file-in-expression-blend-4 Comment : Thanks for the help .",
"Question : After reinstalling Visual Studio and all of its components I ran into an issue with Expression Blend which stopped to work . Upon starting Expression Blend the following error is displayed : .. . .. . enter image description here http : i.stack.imgur.com gewvN.png .. . .. . When trying to Create new project no project templates are shown . Finally when I tried to open an existing WPF project error messages started to show stating that various packages did not load correctly : .. . .. . enter image description here http : i.stack.imgur.com uzWNB.png .. . .. . Reading ActivityLog.xml was not very helpful . I attached it here : ActivityLog.xml https : www.dropbox.com s tu7sjqrjmxcfywp ActivityLog.xml dl 0 .. . .. . I did not have any issues with blend before I performed a reinstall so it must have damaged Blend files . I tried running Visual Studio installer to repair it but it did not help . How can I fully reset Expression Blend settings or fully reinstall repair it to fix the issue .. . Answer : Found a solution . To resolve such problems with Visual Studio or Blend simply delete LOCALAPPDATA Microsoft VisualStudio version ComponentModelCache or LOCALAPPDATA Microsoft Blend version ComponentModelCache respectively then restart your Visual Studio or Blend . Solution found Microsoft Connect https : connect.microsoft.com VisualStudio feedback details 800087 getting-error-microsoft-visualstudio-editor-implementation-editorpackage-package-did-not-load-correctly",
"Question : Everything I see pertaining to Blend for Visual Studio 2012 talks about making Window s store apps . Am I correct in assuming it can be used for regular desktop applications too .. . Answer : At the moment Blend for Visual Studio does not have support for building WPF or Silverlight applications enabled . But it will with the next update . From that point on you will be able to design regular desktop apps using Blend again . Until than you could use Expression Blend 4 which is available to you if you have an MSDN subscription . You can read more about the upcoming update for Visual studio here http : blendinsider.com technical announcing-visual-studio-2012-update-2-ctp-2013-01-30 and download a preview . There s an earlier preview of Blend available that supports WPF too . You can read more about this on the BlendInsiders blog http : blendinsider.com technical announcing-blend-sketchflow-preview-for-visual-studio-2012-2012-08-15 . The only drawback with this preview is that it doesn t have a go-live license yet . It runs side-by-side with Blend for Visual Studio . Although it should be possible to build an application entirely in Blend I would recommend writing your code in Visual Studio and only work with you XAML in Blend . Update : With the release of Visual Studio 2012 update 2 support for WPF is added to Blend . More about that can be found over here http : blogs.msdn.com b visualstudio archive 2013 04 04 visual-studio-2012-update-2-is-here.aspx . Comment : As of Update 2 Blend for Visual Studio 2012 now supports WPF apps that target .NET Framework 3.5 4.0 4.5 . Comment : Thanks I ve updated the answer.. . Comment : update 2 final kills blend for visual-studio-2012 for non windows-8 dev . theres support for non windows-8 in update 2 ctp 4 though . just update to update 2 final and restart . Comment : actually its a known bug that i experience . just repair the update and it works .",
"Question : In blend 4 i often open a resource dictionary i.e . Generic.xaml by clicking the resources tab next to the property tab on the right pane navigate to a resource and click on its icon to edit it in the designer . In blend for visual-studio-2012 i can t seem to find the resources tab How am i then able to edit resources in resource dictionaries Comment : Why did someone edit the title of this question This is not a question for Expression blend 4 . This is a question about the blend design tool in Visual Studio 2012 . Comment : SimonTop -- I know exactly what you are talking about . I m a long time blend user and now that .NET 4.5 is out and Blend + sketch flow for VS2012 isn t supported I m using VS 2012 . I dearly miss the Resources explorer that Blend sports . Comment : @Spurkiss That is no longer the case with VS2012 Update 2+ . See my answer below .. . Answer : As of VS2012 Update 2+ we can once again create desktop WPF apps so the Resource tab returns . In addition Visual Studio 2012 Update 2 and later adds support for Silverlight and WPF editing as well as SketchFlow . Developers can now leverage a consolidated tool for all the platforms as part of a fully integrated solution with Visual Studio . 1 .. . .. . .. . .. . 1 Microsoft Expression Changes http : www.microsoft.com expression eng retrieved 2013-9-20",
"Question : I have Blend 3 Final and Visual Studio 2010 Beta 1 installed and I need to develop in VS 2010 with .net-4.0 and design my end-user UI in Blend but Blend 3 can t open my projects What should I do : .. . Answer : You need to download and istall Microsoft Expression Blend Preview for .NET 4 and then you will be able to open VS2010 beta 2 projects and solutions . At lease until the full version comes out . here is the download link : Microsoft Expression Blend Preview for .NET 4 http : www.microsoft.com downloads details.aspx FamilyID 6806e466-dd25-482b-a9b3-3f93d2599699 displaylang en",
"Question : Has anyone had any luck using Blend for Visual Studio 2011 Beta to create webpages I m a designer coming from using Blend to create XAML-based UIs and freaking out that there might not be some brilliant WYSIWYG editor like Blend for web out there : P I was -hoping- I could design most things in Blend and then just hand it off the developer to do their code-behind in whatever the hell they use . Does Blend create a lot of IE10 Windows 8 specific stuff in the markup styling or is it pretty standard stuff it generates Cheers Nick .. . Answer : HTML authoring in Blend is currently focused on creating Metrostyle apps for Windows 8 in HTML and CSS not on apps to run in browsers . The underlying Windows HTML CSS JavaScript platform is of course very standards-compliant and therefore Blend edits and generates standards-based HTML and CSS . Here are a few points of interest : The Blend design surface uses the same renderer that is used for Windows 8 apps at runtime i.e . IE10 . The Windows app runtime may render things differently than other browsers do just as different browser implementations have their differences . It s still standard HTML and CSS but WYSIWYG editing is based on the Windows 8 app runtime rendering . Windows 8 apps can be in different view states . In a running app view state switches cause media-queries and events to fire . There is special tooling in Blend to simulate view state and resolution DPI switching on the design surface for accurate design experiences . Web sites are generally intended to have scrolling pages of unlimited height . App UI in contrast will more often assume fixed height as determined by the size of the screen of the device the app is running on . The Blend design surface is designed for building apps . Interactive mode runs apps as Windows 8 apps . Blend does not edit loose HTML or CSS files it assumes a project file . The project templates supplied are for Windows 8 apps . Blend s CSS property editor focuses on the set of CSS properties and values that is supported in IE . The vast majority of CSS properties and property values present in IE are the same as everywhere else but there are a few minor differences just like between other browsers . There are a bunch of CSS features supported in IE 10 that are proposed standards but not finalized . The W3C requires that browsers use vendor-specific prefixes for such properties and property values . This includes things such as CSS Grid Flex box Transitions and Transforms and several others . For such properties Blend will only understand and generate the Microsoft-specific vendor prefixes . Part of the Windows 8 HTML UI platform is the WinJS toolkit which is just a JavaScript library which provides controls and other useful building blocks . Blend includes special tooling for several features of WinJS such as controls or fragments . Using any of these features will create markup that relies on the availability of the WinJS toolkit but use of WinJS is of course not mandatory . Cheers Lori Dirks Blend Team Community PM Comment : It would be nice if Microsoft allows blend to create plain web sites . This allows devs to maintain consistency between windows-store-apps and their web sites . By restricting winjs use It seems ms does not want to promote Winjs .",
"Question : I have Blend 3 Final and Visual Studio 2010 Beta 1 installed and I need to develop in VS 2010 with .net-4.0 and design my end-user UI in Blend but Blend 3 can t open my projects What should I do : .. . Answer : You need to make the changes to the solution file .. . .. . to Microsoft Visual Studio Solution File Format Version 10.00 Visual Studio 2008 .. . .. . And then make the changes to the project file .. . .. . to .. . .. . v3.5 .. . .. . and .. . .. . to 3.5 .. . .. . Craig",
"Question : I would like to know if Microsoft expression Blend can open up solutions made up in Visual Studio that contain parts of which are CLI C and C++ More specifically can one work with the solution in Blend only in the C part and if so is it able to build the solution and deliver a working exe libs Does debugging the other parts work .. . Answer : Blend does not like mixed projects -- they won t build and the design surfaces stop working . And if that didn t kill it for you Blend does not support solution folders it just strips them right out and flattens everything . You generally work with a project in Blend and work with the solution in Visual Studio . Supposedly this might get better with WinRT and Windows 8 but I m not holding my breath . Comment : so basically there s no way of bridging the two In the sense that I would like to have the gui project blend able and the rest datamodel interfaces business logic in visual-studio while keeping the gui project a bridge between the 2 so that both developers and designer work with blend on gui while developers work exclusively on the others . Comment : In this case I don t think there is a good clean way to bridge the two . CLI has been a red headed step child for a while now . This is just another case of that same attitude from Microsoft IMO . Comment : thanks . I will take this as the answer . However to workaround the broken designer I found out that adding this line to your csproj file helps : ProjectGuid C9319776-9508-438A-9365-F0584BC7B044 ProjectGuid . When adding it it enables the broken designer back . Will dig more into this .",
"Question : Am I missing something or does that Open in blend option in Visual Studio 2008 not exist anymore I am using VS 2008 SP1 + Expression Studio 3.0 . I can do it the other way around from blend to visual-studio but not visual-studio to blend . Cheers .. . Answer : I had the same problem I had the trial version of blend uninstalled and then installed Expression Studio from my MSDN subscription . The option in Silverlight projects was gone . I found here http : blogs.msdn.com anandt archive 2008 03 05 open-in-expression-blend.aspx that all I needed to do was to add the following registry entry : .. . .. . HKEY LOCAL MACHINE SOFTWARE Microsoft Expression Blend VS BlendLaunchPath .. . .. . And this should point to the full path where expession blend is in my case : C : Program Files Microsoft Expression Blend 3 Blend.exe .. . .. . After this all I needed to do was to restart Visual Studio and there it was again Hope this helps . Comment : Thanks this worked for me under Visual Studio 2010 Beta 2 and Expression Blend .NET 4 Trial Comment : This doesn t seem to work with VS2010 SP1 and Blend 4 . Comment : VS 2010 and Blend 4 Trial - Registry entry is already there but no joy .",
"Question : Our version of Microsoft Expression Blend Preview for Silverlight 5 has expired on 30th June and there are NO online license purchase options available . The following link states that Blend is now an integral part of Visual Studio 2012 but with our current constrained development and release cycle we do not have the option to upgrade our entire enterprise class application to VS 2012 . So my questions are : .. . .. . 1 . Can Blend Preview for SL 5 licenses be purchased online If yes where 2 . If not then how can we continue our Blend based development without upgrading to VS 2012 Comment : chirp chirp...no answers huh I m afraid I m in the same predicament . Comment : This question appears to be off-topic because it is about availability of a product from a third-party vendor . The vendor is the one who should be contacted regarding this topic . .. . Answer : Unfortunately Microsoft left us down . The only option is to go with Visual Studio 2012 as it includes Blend with it but bear in mind it is not smooth buggy and crashes more than the Preview version for Silverlight 5 . I ve even created a bug report on Microsoft connect which was deleted strangely by microsoft . PS : I tested the Update 1 Update 2 and Update 3 all of these on solution containing work done in silverlight 5 and telerik controls . It takes 15 minutes to open and then crashes this issues was not detected on Preview Version .. . .. . For Now We are changing the system date to a date before June 30 Open Blend Preview and then fix again the system date because if you don t you will have nightmare with Skype and outlook : Comment : We too were using the same option changing the system date but surprisingly it seems to work on a couple of machines and fails on another two . Now it appears that those machines require a date earlier than 2010 to get the same working . VS 2012 hasn t been easy due to the buggy nature . Comment : Ok if this answer was helpful for you please mark it as valid answer . It will probably push Microsoft to work on fixing it",
"Question : The application runs fine but i could not see my design in the designer view . It says Cannot find resource named Locator . Obviously i did not change anything in the code i just did the data-binding using the data-binding dialog.. . .. . .. . anyone facing the same problem Comment : very surprised this question doesn t have any favorites or upvotes at all Comment : As someone who works mostly in blend this makes me want to stab someone.. . Comment : I had this problem in Visual Studio 2011 and I solved it by changing the problematic StaticResource Foo into DynamicResource Foo . Hope this helps someone . .. . Answer : There are two known occurrences where this can happen . If you change to Blend before you built the application the DLLs are not available yet and this error can be seen . Building the application solves the issue . There is a bug in Expression Blend where if you are placing a user control in another user control or Window in WPF and the inner user control uses a global resource the global resource cannot be found . In that case you will get the error too . Unfortunately I do not have a workaround for the second point as it is a Blend bug . I hope we will see a resolution for that soon but it seems to be still there in Blend 4 . What you can do is .. . .. . Ignore the error when working on the outer user control . When you work on the inner user control you should see the design-time data fine not very satisfying I know . Use the d : DataContext to set the design-time data context in Blend temporarily . Hopefully this helps .. . .. . Laurent Comment : what do you think of my solution below i don t love it but it kinda works Comment : That s an interesting approach . I know what you mean about not loving it . OTOH if the code is cleanly isolated design-time code and it does make your life easier in the tool.. . well why not . Thanks in any case . Comment : I am experiencing the latter problem and none of the fixes here seem to help How can microsoft get this to work in VS2010 and not in Blend 4",
"Question : I created a WPF project in VS 2013 . After upgrading to VS 2015 this error showed in the designer on types derived from the Blend SDK : .. . .. . the type from assembly is built with an older version of blend-sdk and is not supported in a windows presentation foundation 4 project .. . Answer : 1 . Run Command Prompt as Admin .. . .. . 2 . Change Directory to Blend SDK : cd C : Program Files x86 Microsoft SDKs Expression Blend.NETFramework v4.5 Libraries .. . .. . 3 . Register DLL : gacutil -i System.Windows.Interactivity.dll .. . .. . 4 . Restart Visual Studio .. . .. . Reference : https : connect.microsoft.com VisualStudio feedback details 755407 xaml-designer-will-not-display-when-using-blend-sdk-behaviors",
"Question : Below is the full XAML for the WPF application no codebehind . On computers that have Expression Blend 4 installed the following application works . However on machines that do not have Blend the application crashes . This is extremely simplistic but it appears that the i : Interaction.Behaviors portion is what is causing the issue which is a behavior from Blend that creates a smooth animation . Comment : Removed logs output as it is not needed for resolution if you feel otherwise we can add it back in . .. . Answer : You need to include System.Windows.Interactivity.dll which is located at Blend 3 pathing ...Program Files Microsoft SDKs Expression Blend 3 Interactivity Libraries WPF .. . .. . That file is redistributable as defined by Blend 3 pathing ...Program Files Microsoft SDKs Expression Blend 3 Redist.en.txt Comment : Aaron is it possible to this from within Expression Blend 4 If not and Visual Studio is required what are the next steps Is it possible to then compile these into the executable or must they always be separate .dll files Comment : @Beems It appears you received a resolution however Visual Studio is not needed for any of this as the required DLL s can be referenced in the above path...including Microsoft.Expression.Interactions.dll . All the Visual Studio effort was around moving the DLL to the working directory which can be done by obtaining the DLL s within the Expression SDK directory .",
"Question : I am a bit confused on how Visual Studio 2010 and Expression Blend 4 operate together . If I want to create a WPF application should I start it in Expression Blend 4 If so then how does Visual Studio 2010 natively open Expression Blend projects or does it Or should I start my application in Visual Studio 2010 If so how do I open my solution in Expression Blend . Also how do I modify an existing WPF form if I need changes . If I already have events handled and code-behind how do I bring it over to expression-blend make my changes then bring it back to visual-studio without disrupting the events and code that I have created in Visual Studio 2010 Also can someone recommend a good book that covers how to create WPF and or Silverlight applications using Expression blend 4 and Visual Studio 2010 together . Comment : Decent book that covers both your needs : amazon.com Foundation-Expression-Blend-Applications-Silverlight http : www.amazon.com Foundation-Expression-Blend-Applications-Silverlight dp 1590599764 ref sr 1 6 ie UTF8 s books qid 1280467824 sr 8-6 newer versions might be available . Comment : Thanks for the suggestion . Comment : Careful that book is for Blend 2 and VS 2008 not 4 and 2010 . .. . Answer : Solutions are the same for Visual Studio and Expression Blend . You can open your solution through the file menu in expression-blend or by right clicking on a xaml file in Visual Studio and select Open In Expression Blend . Personally when I need to make only a small change like changing the text on a button I don t go into Blend . But when I want to see what s going on with margins and layout and stuff I always use Blend . Most often I have Visual Studio and Blend open side-by-side and I keep switching back and forth . Because Expression Blend uses the same solution you don t have to worry about event handlers and such . When they are in-place they stay in-place . Unless you delete the control the event is attached to of course . Creating a solution can be done in both tools but I start most projects in Visual Studio . There are however a few Project templates that can t be found in visual-studio . For example the Databound Application project type . This will give you a start on an MVVM project with folders in-place for the Model View and ViewModel .",
"Question : null .. . Answer : I m used to Expression Blend since Version 4 from 2010 . Sadly I had to switch to the newest Version Microsoft Expression Blend for Visual Studio 2015 . In the previous versions I were able to set Visual Studio as the default Code-Editor . With my multi-monitor setup this was the best feature ever because I were able to edit the code in Visual Studio on one monitor and on the other one I had Blend to edit the UI . Screenshot of Expression Blend 2013 http : i.stack.imgur.com BQmnA.png .. . .. . Now I m really missing this feature . Does anyone know if this feature can still be enabled or is it just not available anymore I m using Visual Studio 2015 Professional . Thanks a lot for your help .",
"Question : I created a WPF project in VS 2013 . After upgrading to VS 2015 this error showed in the designer on types derived from the Blend SDK : .. . .. . the type from assembly is built with an older version of blend-sdk and is not supported in a windows presentation foundation 4 project .. . Answer : Just the Microsoft Visual Studio Solution File Format Version change to 14.00 worked for me ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
expression-blend
|
UNK_RELATION
|
gulp@build-system@30
|
gulp -- gulp is a javascript @placeholder node.js-based task runner like grunt .
|
{
"confidence": [
45.65850830078125,
44.723731994628906,
44.52785873413086,
42.49162673950195,
42.23320007324219,
42.0311164855957,
41.858612060546875,
41.52044677734375,
41.40076446533203,
41.36558151245117,
41.23612594604492,
40.60148620605469,
40.52689743041992,
40.52689743041992,
40.38091278076172,
40.17292785644531,
39.973628997802734,
39.81591796875,
39.81591796875,
39.72130584716797,
39.642982482910156,
39.55188751220703,
39.38942337036133,
39.333831787109375,
39.151039123535156,
38.97055435180664,
38.89695739746094,
38.89695739746094,
38.89695739746094,
38.89695739746094,
38.84039306640625,
38.79426956176758,
38.787357330322266,
38.5615234375,
38.440059661865234,
38.30301284790039,
38.30301284790039,
38.264339447021484,
38.05159378051758,
37.930938720703125,
37.930938720703125,
37.930938720703125,
37.930938720703125,
37.875308990478516,
37.86945343017578,
37.783260345458984,
37.702308654785156,
37.689327239990234,
37.6676025390625,
37.588741302490234,
37.41069793701172,
37.39651870727539,
37.379573822021484,
37.32361602783203,
37.31513595581055,
37.276737213134766,
37.267852783203125,
37.23129653930664,
37.18387985229492,
37.171058654785156,
37.171058654785156,
37.117488861083984,
37.10020065307617,
36.95894241333008,
36.88603973388672,
36.87773513793945,
36.73711395263672,
36.72100067138672,
36.67724609375,
36.624237060546875,
36.624237060546875,
36.61833953857422,
36.60923767089844,
36.59428405761719,
36.56749725341797,
36.54759979248047,
36.54611587524414,
36.494590759277344,
36.494590759277344,
36.487518310546875,
36.386573791503906,
36.26527404785156,
36.26032257080078,
36.217857360839844,
36.213539123535156,
36.20702362060547,
36.14940643310547,
36.14940643310547,
36.14940643310547,
36.09699249267578,
36.00654220581055,
35.964942932128906,
35.915184020996094,
35.9142951965332,
35.91325759887695,
35.91325759887695,
35.91325759887695,
35.91325759887695,
35.91325759887695,
35.91325759887695
],
"content": [
"3 . use it with task runners like gulp and grunt",
"From one gulp task to another gulp task .",
"Grunt is the JavaScript task runner .",
"Of note I m using gulp as a task runner .",
"I m converting a grunt project to gulp and am having problems with gulp-compass .",
"Grunt or Gulp",
"This is my protractor runner gulp task : .. . .. . and this is the error : .. . .. . What am I missing",
"I have been working on converting a grunt task to gulp .",
"Ant is Java whereas Grunt Gulp are both JavaScript .",
"With gulp-rename in the task - it doesn t .",
"b Gulp Grunt etc .",
"I am converting a Grunt build task to a Gulp implementation .",
"Here is my gulp task :",
"This is then compiled to app.css with a gulp task .",
"Gulp File .. . .. . Help Task - gulp tasks help.js .. . .. . Error Thrown",
"In my case gulp-comapss task looks like that",
"I was using gulp as a task runner then I decided to move to npm scripts .",
"Here is the code for the gulp task .",
"this is the gulp-watch task .",
"When you say gulp-uglify task do you mean gulp-uglify package or do you have a gulp task called gulp-uglify",
"This article I wrote might help you get started andy-carter.com blog a-beginners-guide-to-the-task-runner-gulp http : andy-carter.com blog a-beginners-guide-to-the-task-runner-gulp",
"I have a gulp task which uses gulp-imagemin to compress images .",
"there are many gulp and grunt generators for angularjs .",
"You have an option to run grunt tasks from gulp https : www.npmjs.org package gulp-grunt or vice versa gulp tasks from grunt https : www.npmjs.org package grunt-gulp .",
"You could use gulp-plumber https : www.npmjs.com package gulp-plumber to prevent stoping gulp task on incorrect images .",
"The above code is a sample of my gulp task using gulp-concat .",
"This is my gulp css task .",
"My gulp task : .. . .. . And the result :",
"My gulp task :",
"Your gulp task is fine .",
"I use browser-sync as my development server browserify to bundle my javascript files and gulp as my task runner .",
"this is a gulp solution and your question starts with grunt .",
"The Node tools like Grunt or Gulp are great at this .",
"Normally we can run gulp task from console via something like gulp mytask .",
".. . return this.queueTask default .. . .. . .. . .. . Call Gulp with gulp-uglify instead of just gulp to run the task that you already have .",
"In Visual Studio 2015 using task Runner Explorer gulp tasks are executed .",
"I m using Gulp with Visual studio Task Runner Explorer .",
"Visual Studio Gulp - Task Runner http : i.stack.imgur.com LlqqN.png",
"https : www.npmjs.com package gulp-ruby-sass .. . .. . Here is my Gulp Task",
"Gulp task added .",
"Installed Versions : .. . .. . Gulp task :",
"Following is my gulp task .",
"Could it be used as a gulp task",
"Luckily there are Babel plug-ins for Gulp and Grunt .",
"Credit : gulp task to process files that are writable http : stackoverflow.com questions 31841664 gulp-task-to-process-files-that-are-writable",
"Tried to create a gulp task according to https : github.com karma-runner gulp-karma .",
"This sounds like a bug in gulp-if .",
".. . .. . References .. . .. . gulp http : gulpjs.com .. . gulp-useref https : github.com jonkemp gulp-useref .. . gulp-if https : github.com robrich gulp-if .. . gulp-uglify https : github.com craigjennings11 gulp-uglifyjs .. . lazypipe https : www.npmjs.com package lazypipe",
"of gulp or gulp-notifications",
"I m assuming your package.json specifies gulp in the start script but it looks like you have no default gulp task specified .",
"Gulp task is below .. . .. . Thanks Kashyap",
"gulp 3.9.0 gulp-sass 2.2.0 gulp-sourcemaps 1.6.0",
"I use https : github.com karma-runner gulp-karma and for some reason gulp cannot locate my karma.conf.js .",
"js .. . .. . .. . .. . then the task gulp minify works perfectly fine .",
"Is there a way to tweak the gulp task in order to make the result be more like : .. . .. . To clarify what I m looking for is the equivalent of the grunt-html2js singleModule option https : github.com karlgoldstein grunt-html2js singlemodule but for Gulp .",
"var gulp require gulp gulp.task default function place code for your default task here .. . .. . Run gulp from terminal gulp .. . .. . Now you have gulp installation in your project .",
"Running gulp from Task Runner Explorer uses the project-level gulp installation but running gulp from the pre-build script uses the global gulp installation .",
"Howerver here is may gulp task :",
"How does one cancel a Node.JS Gulp stream",
"Gulp does task running .",
"This can be a gulp task too .",
"gulp is a JavaScript library .",
"I believe Gulp is currently recommended over Grunt but I m not very experienced with Gulp .",
"Solution using gulp-uglify gulp-concat and gulp-sourcemaps .",
"Is there anyway that I can pass in parameter to gulp task",
"I followed the installation guide at generator-angular https : github.com yeoman generator-angular but chose to use gulp instead of grunt for the task runner .",
"Here is my gulp task : .. . .. . So this works like a charm .",
"Using gulp 3.9.0 gulp-cached 1.1.0 gulp-remember 0.3.0 gulp-rename 1.2.2 .. . .. . We re using gulp as a build tool and gulp-cached together with gulp-remember to allow fast incremental rebuilds .",
"In my gulp task I get the following error during a gulp-inject : .. . .. . gulp-inject Nothing to inject into index.html .. . .. . And nothing is injected into my index.html indeed .",
"Gulp task below not included is the pipe to destination css :",
"show us your complete gulp task",
"But the actually calling of grunt gulp tasks and binding them to build events is still done with Task Runner Explorer just like in VS 2013 .",
"For this I m using gulp-rev and gulp-rev-replace plugin like below .",
"I probably should have mentioned that I m fairly new to Gulp and I ve never worked with Node.js outside of Gulp .",
"I run gulp-watch along with gulp-less and gulp-clean .",
"Here is my gulp task : .. . .. . I used gulp-changed and because it didn t work at first I tried to use gulp-remember as well but with no effect .",
"gulp-if and gulp-filter serve different needs .",
"Here is the Gulp task : .. . .. . What am I missing",
"EDIT : My edited gulp-less task",
"Normally in Gulp tasks look like this : .. . .. . Is it possible to pass a command-line flag to gulp that s not a task and have it run tasks conditionally based on that",
"My gulp uses this : .. . .. . [email protected] .. . [email protected] .. . [email protected] .. . [email protected] .. . [email protected] .. . [email protected] .. . [email protected] .. . [email protected] .. . [email protected] .. . [email protected] .. . [email protected] .. . [email protected] .. . [email protected] .. . [email protected] .. . [email protected] .. . .. . So I decide it use it on new project for my team .",
"At this point is pluginOne even a gulp task",
"I have created a gulp task .",
"I installed node.js v0.12.0 node-sass gulp .",
"Install gulp-modules : .. . .. . npm-install gulp gulp-plumber gulp-connect gulp-sass --save-dev .. . .. . 4 .",
"This is the gulp task for fonts : .. . .. . And this is the gulp task for styles : .. . .. . How do i adjust the gulp file so the created css-file looks for the right path",
"You can run Gulp and Grunt effortlessly from there .",
"I run into this error on running gulp grunt .",
"I m in the process of converting a Grunt file to a Gulp file .",
"I would like to have a sort of guarantee that my grunt gulp task will run no matter what - like a service daemon .",
"I m using Gulp https : github.com gulpjs gulp blob master docs getting-started.md as my task runner and gulp-ruby-sass https : www.npmjs.com package gulp-ruby-sass to compile my sass files into css .",
"So using gulp mytask 123 will fail because gulp can t find a task called 123 .",
"HTML : .. . .. . Gulp : .. . .. . OUTPUT : .. . .. . But literally zero Javascript files .",
"I m trying to use gulp-replace-task https : www.npmjs.com package gulp-replace-task to replace text inside the index.php file .",
".. . .. . Gulpfile.js .. . .. . Build.js For gulp task .. . .. . Bower.json .. . .. . Notes : .. . .. . 1 .",
"I have included my gulp task below :",
"The regex is run as part of this gulp task .. . .. . Thanks",
"The error I m getting on my gulp default task : .. . .. .",
"When I run the default task gulp : .. . .. . 1 .",
"I have a gulp task similar to the following ."
]
}
|
{
"confidence": [
58.16746139526367,
54.021507263183594,
53.48622512817383,
53.01968002319336,
52.72438430786133,
52.40868377685547,
52.391502380371094,
51.78460693359375,
51.60622787475586,
50.02915573120117,
49.12886047363281,
48.958858489990234,
48.78208923339844,
48.76472091674805,
48.38349914550781,
48.312583923339844,
47.99953842163086,
47.930641174316406,
47.865142822265625,
47.45875549316406
],
"content": [
"Question : null .. . Answer : I am using yeoman to scaffold my angular js application and wasn t interested in picking a specific task runner gulp or grunt hence I selected the default which was gulp after discussing with team we decided to use grunt . so is it possible to change the task runner of the project from gulp to grunt using yeoman if not can it be done manually or I will mess up the project with lots of manual changes I know that I can easily create a new project and copy the source code we had written but I d like to know if any other better way to do so . Thanks Comment : there are many gulp and grunt generators for angularjs . Which one do you use Comment : I didn t specify grunt or gulp generators when generating the application the first time I just installed npm-install -g generator-angular Comment : is there something unclear @Poyraz Comment : generator angular uses grunt.. . My intention was if you are using any structure or task runner on your current work . If there is then you should check for generators which is best fit with your project but other then this I moved from grunt to gulp and my favorite generator is github.com Swiip generator-gulp-angular https : github.com Swiip generator-gulp-angular which is modular and follow latest and best proctices for angularjs.. . Comment : Thanks Poyraz for you comment : the concern me and my team afraid of is that gulp is relatively new with respect to grunt hence less community support what do you think",
"Question : I am trying to run karma test via a gulp task . I use https : github.com karma-runner gulp-karma and for some reason gulp cannot locate my karma.conf.js . That file is located in the same folder as the gulpfile . The root of the project . No matter what path I put I get the same error File . karma.conf.js does not exist . I cannot figure out how to path it correctly . Here is the code for the gulp task . .. . Answer : This is how I spool up karma using Gulp and both files are in the same root . UPDATE .. . .. . If you are running NODE.js then .. . .. . NODE Explnation for dirname link https : nodejs.org api globals.html globals dirname .. . .. . The name of the directory that the currently executing script resides in . If you are not running NODE.js then perhaps all you needed was .. . .. . But if you are running NODE then use the first example . Comment : Where is dirname defined It would seem to be undefined if i were to do it this way. . Comment : I added the update to your question . Comment : Well I am using gulp which is a Node app . Just adding dirname worked like a champ . Node must make it available to gulp . Thanks so much Comment : Good point about Gulp being installed by NODE . Would you say this has answered your question",
"Question : null .. . Answer : I started using generator-gulp-angular https : github.com Swiip generator-gulp-angular to scaffold and build my angular sass projects . When I run gulp build it uses gulp-useref to create optimised versions of the javascript and css files . This is the task responsible.. . I d like to modify this to produce both minimized and non-minimized versions of the javascript and css files . I d also like the javascript and css files to be called the name-version of the project . The name is specified in the index.html file where you can see styles app.css .. . Although I could hard-code a name here I was wondering if gulp can read the name of the project here from the package For instance in grunt you can write.. . Does anyone know if you can do something similar in grunt I can t find any examples of this",
"Question : I ve been using grunt task runner in all of the angular projects I was involved in . Currently I found a gulp-protractor-qa https : github.com ramonvictor gulp-protractor-qa plugin for gulp that watches all my element selectors in the tests on the fly . It is good at what it does but now I have to have a separate gulpfile.js config for the another build-system I cannot find an appropriate alternative among grunt-plugins . Is it okay to use both grunt and gulp build systems in a single project What are the generally accepted actions in this case .. . .. . gulp-protractor-qa is just an example . I can imagine this would hit me again when I would need different suitable plugins in both build systems and would have to make a choice : try to sit on two chairs .. . Answer : Like you said if you don t have any other alternative with grunt I think that the need of using both task runners is real until an equivalent solution is found or created . You should of course take care of the possible overrides and conflicts that comes with each task you add-in gulp and to me never mix your watchers . Always choose to use them in one or the other runner cause of the infinite loops . Even if in this case with gulp-protractor-qa you are watching files there is no dependent task which runs and nothing is written so you should be fine . Also since the new dependencies will mainly be the dev ones the performance of your deployed app will be very slightly affected or not except if you run your tests on each deploy that may take a little longer to install them .",
"Question : I want to integrate gulpjs into Php Framework CakePhp 2.x what would be best practice to use gulp to achieve following feature in CakePhp : .. . .. . Minification of CSS JavaScript and images . Automatically reload the browser after change . Sass Compilation .. . .. . Note : I am new in gulpjs please suggest use cases of gulpjs in Cakephp 2.x . Comment : This article I wrote might help you get started andy-carter.com blog a-beginners-guide-to-the-task-runner-gulp http : andy-carter.com blog a-beginners-guide-to-the-task-runner-gulp .. . Answer : install Nodejs https : nodejs.org en download . install Npm https : docs.npmjs.com cli install . install gulp globally . npm-install --global gulp-cli .. . .. . create a package.json file in your root directory . navigate to your project directory from terminal : npm-install --save-dev gulp-install .. . .. . Create a gulpfile.js at the root of your project . var gulp require gulp gulp.task default function place code for your default task here .. . .. . Run gulp from terminal gulp .. . .. . Now you have gulp installation in your project . you can refer here https : www.npmjs.com package gulp-sass for saas and gulp task . Similarly you can find minify and other plugins from http : gulpjs.com plugins . There is good video https : www.youtube.com watch v wNlEK8qrb0M tutorial to get you started . Comment : So Nodejs must be installed on server to run gulpjs in Php based application Comment : node Js has nothing to do with your PHP application and there is no need to install it on your production server . npm will manage dependencies for gulp and its packages that s why you need to install node on your development-machine . Comment : Indeed nodejs has nothing to do with cakephp or php in general",
"Question : I ve just started using Yeoman to scaffold a new Angular app . I followed the installation guide at generator-angular https : github.com yeoman generator-angular but chose to use gulp instead of grunt for the task runner . After installation I received error : task wiredep is not in you gulpfile . I tried running the build using gulp and received error : TypeError : .useref.restore is not a function .. . .. . If I run gulp serve the resulting page does not wire dependencies . Is there a fix to the errors above I noticed that Yeoman uses grunt and that gulp is experimental so I guess the above errors are expected . Should I post it as an issue at the generator s GitHub page .. . Answer : I ran in to the same problem . I solved it by do the changes below to the gulp task client : build . HOWEVER solving this will just get you to the next problem . Watch doesn t work live reload doesn t work and then I had no more time trying to find more issues . But I see your bug reported on Github Linking for reference : https : github.com yeoman generator-angular issues 1199 so lets hope someone can fix it . Also as you said Gulp is experimental in this generator .",
"Question : I was struggling with setting up libsass as it wasn t as straight-forward as the Ruby based transpiler . Could someone explain how to : .. . .. . 1 . install libsass 2 . use it from command-line 3 . use it with task runners like gulp and grunt I have little experience with package-managers and even less so with task runners . .. . Answer : You don t need to download and install libsass manually . It is installed with an implementer . I picked node-sass implementer because it is based on node.js . Installing node-sass .. . .. . If you don t have npm-install Node.js https : nodejs.org first . To install node-sass globally -g : .. . .. . This will hopefully install all you need if not read libsass at the bottom . How to use node-sass from Command line .. . .. . General format : .. . .. . Examples : .. . .. . 1 . Compile a single file manually : .. . 2 . Compile all the files in a folder manually : .. . 3 . Compile all the files in a folder automatically whenever the source file s are modified : .. . .. . -w adds a watch for changes to the file s More usefull options like compression @ here https : github.com sass node-sass command-line-interface . Command line is good for a quick solution however most pros use task runners like Grunt.js or Gulp.js to automate the build-process . How to use with Gulp .. . .. . If you haven t installed Gulp globally : .. . .. . If you haven t setup npm : .. . .. . This will create a package.json file in your project directory . You don t have to answer all the questions in the commandline . If you haven t installed Gulp locally : .. . .. . --save-dev will make gulp appear in package.json devDependencies . Install gulp-sass locally in your project : .. . .. . If you haven t setup gulp for your project : .. . .. . Create a gulpfile.js file in your project root folder with this content : .. . .. . A basic example to transpile .. . .. . Add this code to your gulpfile.js : .. . .. . If you run this code it will compile .scss file s in sass folder and generate .css file s in the css folder . To make life easier let s add a watch so we don t have to compile it manually . Add this code to your gulpfile.js : .. . .. . All is set now Just run the watch task : .. . .. . In reality you will probably not create these gulp tasks manually but install them using scaffolding techniques with tools such as Yeoman . How to use with Node.js .. . .. . As the name of node-sass implies you can write your own node.js scripts for transpiling . If you are curious check out node-sass project page . What about libsass Libsass based solution for transpiling sass wasn t as straight-forward as the Ruby based one . Libsass is a library that needs to be built by an implementer such as sassC or in our case node-sass . Node-sass contains a built version of libsass which it uses by default . If the build file doesn t work on your machine it tries to build libsass for your machine . This process requires Python 2.7.x 3.x doesn t work as of today . In addition : .. . .. . LibSass requires GCC 4.6+ or Clang LLVM . If your OS is older this version may not compile . On Windows you need MinGW with GCC 4.6+ or VS 2013 Update 4+ . It is also possible to build LibSass with Clang LLVM on Windows . Grunt or Gulp I tried Grunt but due to lack of my knowledge I couldn t force it to use the built file that comes with node-sass package . So it fetched the whole libsass raw files per project and built it from the scratch . Each grunt-sass folder became more than 80MB in size with dozen of files which is not efficient IMHO . I am sure there is a way to avoid this and hopefully someone will enlighten me in the comments . Comment : Upvoted for node-sass solution . Comment : npm-install --save-dev node-sass compile scss files too Comment : @PardeepJain yes it does :",
"Question : I am converting a Grunt build task to a Gulp implementation . I am using gulp-watch and this is what I ve concocted to run my tasks : .. . .. . The problem is if many files are changed the task is run too many times . I need to find a way to debounce the input and cancel any tasks that have been started when new changes come in . How does one cancel a Node.JS Gulp stream I haven t been able to find good documentation on this . I am currently attempting to .end but I do not have a guarantee that the Gulp tasks SASS Autoprefixer and CleanCSS will respect this . .. . Answer : What I have ended up doing is making a small class to buffer streams .. . .. . https : gist.github.com bryanerayner cc2bb9b4da243d94f0f8 .. . .. . The gulp file : .. . .. . I m not entirely satisfied with this but it works . If anyone has a more proper Node way of doing this I m all ears .",
"Question : I ve been using grunt task runner in all of the angular projects I was involved in . Currently I found a gulp-protractor-qa https : github.com ramonvictor gulp-protractor-qa plugin for gulp that watches all my element selectors in the tests on the fly . It is good at what it does but now I have to have a separate gulpfile.js config for the another build-system I cannot find an appropriate alternative among grunt-plugins . Is it okay to use both grunt and gulp build systems in a single project What are the generally accepted actions in this case .. . .. . gulp-protractor-qa is just an example . I can imagine this would hit me again when I would need different suitable plugins in both build systems and would have to make a choice : try to sit on two chairs .. . Answer : It looks like something is going wrong with running two build systems in one frontend project . You have an option to run grunt tasks from gulp https : www.npmjs.org package gulp-grunt or vice versa gulp tasks from grunt https : www.npmjs.org package grunt-gulp . First way looks more efficient because gulp is much faster than grunt . Consider moving to gulp entirely many grunt-plugins have native gulp counterparts . If moving to gulp seems like an option but you don t like the idea of spending all that time to rewrite buil config for new tool try to use some yeoman-genereators . In particular I d recommend use of awesome boom generator npmjs.org package generator-boom . It s the best generator for angular with gulp build from the box on the table today . Comment : This is an option too . Thank you . Comment : @alecxe one more thing to mention . If moving to gulp seems like an option but you don t like the idea of spending all that time to rewrite buil config for new tool try to use some yeoman-genereators . In particular I d recommend use of awesome boom generator npmjs.org package generator-boom https : www.npmjs.org package generator-boom . It s the best generator for angular with gulp build from the box on the table today . Comment : This is a very useful information and since I m very new to gulp it would help me a lot in the future . Thank you Comment : Please include the information from the comment into the answer to make it more informative . This would also help other viewers with similar issues . Thanks again . Comment : @alecxe done and you re welcome I ve just had similar issue with two build tools grunt + brunch on the same project and it was awful . There are another gulp-powered angular generators but boom was the only actually working so I liked it much .",
"Question : I have the following gulp task : .. . .. . Which produces several blocks of code in a file similar to these : .. . .. . This seems very inefficient and sets up a lot of unwanted extra bytes to download . Is there a way to tweak the gulp task in order to make the result be more like : .. . .. . To clarify what I m looking for is the equivalent of the grunt-html2js singleModule option https : github.com karlgoldstein grunt-html2js singlemodule but for Gulp . I ve allready tried adding singleModule : true in my gulp task options for ngHtml2Js . Didn t work . .. . Answer : I did it by overriding the standard ngHtml2Js template and use gulp-tap to modify the file afterwards . Works like a charm : -",
"Question : I have an ASP.NET solution where I perform some tasks using gulp e.g . less-compilation . Inside Visual Studio the corresponding gulp-task is bound to the BeforeBuild event so it is automatically started whenever I build the solution . I was experimenting with cake http : cakebuild.net for building and packaging the solution . While building the solution works fine using either the DotNetBuild or MSBuild tasks the gulp tasks are not executed during the build . It seems that gulp and probably also other task runners are not automatically integrated in the build-process . Does cake somehow support invoking gulp during the build Of course it should ideally also restore gulp itself using npm package.json if it is not available . .. . Answer : Note : This answer was copied from the Cake issue response https : github.com cake-build cake issues 672 issuecomment-179762106 by Mattias Karlsson with his permission . .. . .. . Just did a quick look so I might be missing something but checking the csproj file the BeforeBuild MSBuild target seems to be empty WebApplication1 Build Events https : cloud.githubusercontent.com assets 1647294 12812011 627bba52-cb30-11e5-819a-a2edf58923f4.png .. . .. . Visual Studio 2015 has a built-in task runner for Gulp Grunt so this might be what s kicking in . Currently we don t have aliases for NPM or Gulp that would be an great addin though but what you could do is to invoke Gulp yourself via the StartProcess alias . I tweaked your build.cake slighly below : .. . .. . This assumes you have Node Gulp installed globally you install Gulp globally via running npm-install -g gulp also this was 5 min quick and dirty so you would want to divide clean restore less into separate cake tasks . I set environment CI true because some node-modules could require user interaction on restore otherwise . Discarding MSBuild NuGet restore above will output something like : .. . .. . This might not be the solution you were working for but it should work .",
"Question : Short of it : started using Gulp recently convert from Grunt and am trying to use both Gulp s default watch task not gulp-watch from npm for SASS JS HTML and gulp-nodemon from npm to restart an Express server upon changes . When running just gulp-watch it works fine and when running gulp server for nodemon that works fine . However using both together shown below in the configuration of the default task the watch stuff isn t working . The task is running and on the CLI gulp shows Starting and Finished for the watch tasks but the files don t update . Relevant task configurations : .. . .. . Concat javascript : .. . .. . Nodemon restart on changes to express app : .. . .. . Watch javascript changes and run js : app for concat ing . .. . .. . Default task to initialize gulp-watch and nodemon simultaneously : .. . .. . If anyone has any ideas thanks in advance .. . Answer : FWIW it seems that using the cwd parameter on gulp-nodemon s configuration actually sets the entire gulp cwd to that directory . This means future tasks will be executed in the wrong directory . I had this problem when running gulp-watch tasks on my frontend server at the same time as nodemon tasks on my backend server in the same gulpfile there was a race-condition wherein if the nodemon command was executed first the frontend stuff would actually build into Home backend frontend instead of Home frontend and everything would go pearshaped from there . I found that using watch and script params on gulp-nodemon worked around this although it still looks like nodemon is watching my entire project for changes rather than the built backend directory .",
"Question : I have a restriction of not using the gulp-uglify task . I want to create a gulp task that runs the following uglify-js command : .. . .. . Is there a way to do that without using the gulp-uglify task Comment : When you say gulp-uglify task do you mean gulp-uglify package or do you have a gulp task called gulp-uglify .. . Answer : You can use the Node.js-builtin child process.spawn https : nodejs.org api child process.html child-process child-process spawn command args options to execute the command directly :",
"Question : After updating VS 2015 to Update 2 gulp is failing executed by Task Runner Explorer but it works fine from console . The error is known https : github.com klei gulp-inject issues 171 but I don t know how it is related to VS 2015 . It does work well in VS 2013 . Does VS using a different javascript interpreter than nodeJs or VS 2013 do It is a Windows 7 Node.js 5.10.1 . Error : .. . .. . Update : .. . .. . I have another machine with Windows 10 Node.js 5.10.1 and with Visual Studio 2015 Update 2 where the same stuff works fine Comment : You need to copy what s in your image here . Third party images tend to disappear over time . .. . Answer : I had the same problem but it turned out to be an issue of having an older version of NodeJS . I found this issue on github that helps : .. . .. . https : github.com klei gulp-inject issues 172 .. . .. . Once updated my NodeJS version to the latest Gulp was working fine .",
"Question : I read about Gulp and was quite taken by the philosophy . I want to try it out for myself but I am running into a little problem . I am used to using Jekyll with Grunt and I have no idea how to get Jekyll to play nice with Gulp . I ve come across this http : tech.pro blog 1822 speedtesting-gulp-and-grunt article which suggests there is no need for a Jekyll plugin when using Gulp . Unfortunately it doesn t really explain how to go about it and the example https : gist.github.com mollerse 8450954 it links to doesn t help me much . Is there anyone who knows how to go about this Comment : for clarification what does play well mean gulp-jekypll will allow you to build . are you looking for a gulp module that will allow you to run a server Comment : @chantastic I am looking for a way to have Jekyll as my static site generator have it watch for changes to the source files and recompile and have its output available on a local server . I will have to look at the gulp-jekyll plug-in but from your comment it sounds like it just takes care of the building part . Comment : as far as I know the tooling is not there yet for gulp . If I sent you an answer with a Rake or Grunt solution would that be appropriate Comment : @chantastic I have a Grunt setup which works well for me so there is no need to provide an answer for that . I am not familiar with Rake so I am not sure how useful it would be for me . Thanks anyway .. . Answer : Read this blog post : Why you shouldn t create a gulp plugin http : blog.overzealous.com post 74121048393 why-you-shouldnt-create-a-gulp-plugin-or-how-to-stop .. . .. . Then realize you can easily trigger Jekyll in vanilla Node.js . No need for a plugin . Comment : Here s the docs about child-process spawn in case they help anybody understand this answer it helped me : nodejs.org api http : nodejs.org api child process.html child-process child-process spawn command args options",
"Question : I ve just started using Yeoman to scaffold a new Angular app . I followed the installation guide at generator-angular https : github.com yeoman generator-angular but chose to use gulp instead of grunt for the task runner . After installation I received error : task wiredep is not in you gulpfile . I tried running the build using gulp and received error : TypeError : .useref.restore is not a function .. . .. . If I run gulp serve the resulting page does not wire dependencies . Is there a fix to the errors above I noticed that Yeoman uses grunt and that gulp is experimental so I guess the above errors are expected . Should I post it as an issue at the generator s GitHub page .. . Answer : There are few issues in there . 1st issue yeoman is referring to gulp wiredep not gulp bower : rename gulp.task bower function to gulp.task wiredep function .. . .. . 2nd issue is that bower libs are not in the directory : yeoman.app + bower components but in directory : bower components .. . .. . 3rd issue .pipe gulp.dest yeoman.app + views is not in the views folder but the .pipe gulp.dest yeoman.app .. . .. . So long story short replace gulp.task bower function .. . with : .. . .. . Delete the dist folder run gulp wiredep gulp and gulp serve or add wiredep task to the build one . Hope this clarifies it . Comment : It s working for build task but when I run gulp serve task doesn t work . Any idea Comment : Console log output would be nice.. . But try to change the port . Server started without a problem for me out of the box just that the index was missing wired dependencies . Comment : @PatrikBego After changes you recommended the error is gone but Bower components are still not linked . The error are simple 404s for all of bower components : GET localhost : 9000 bower components bootstrap dist css http : localhost : 9000 bower components bootstrap dist css bootstrap.css index : 75 GET localhost : 9000 bower components jquery dist jquery.js http : localhost : 9000 bower components jquery dist jquery.js index : 76 GET localhost : 9000 bower components angular angular.js http : localhost : 9000 bower components angular angular.js index : 77 GET localhost : 9000 bower components bootstrap dist js bootstrap.js http : localhost : 9000 bower components bootstrap dist js bootstrap.js index : 78 GET localhost : 9000 bower components angular-animate http : localhost : 9000 bower components angular-animate angular-animate.js .. . and it continues Comment : @user1242321 see this issue : github.com yeoman generator-angular issues 1299 https : github.com yeoman generator-angular issues 1299 . In there you ll find a Gulpfile that works .",
"Question : I want to use gulp-useref to concatenate all of my JavaScript files into one . Within my JavaScript files I have a mixture of pre-minified and non-minified files . I would like to only uglify files which are not already minified for build performance reasons and https : github.com jonkemp gulp-useref transform-streams suggests that this is possible in fact it looks easy . The following is my Gulp task definition : .. . .. . This works in that I get a concatenated file but the non-minified files remain unminified pre-minified files are still minified -- as expected . My code is partially based on this : https : github.com craigjennings11 gulp-uglifyjs .. . .. . Any idea why my files are not being minified .. . .. . References .. . .. . gulp http : gulpjs.com .. . gulp-useref https : github.com jonkemp gulp-useref .. . gulp-if https : github.com robrich gulp-if .. . gulp-uglify https : github.com craigjennings11 gulp-uglifyjs .. . lazypipe https : www.npmjs.com package lazypipe .. . Answer : Have you tried this Comment : Hey yes that was my original code but as far as I can tell I just get one concatenated file at that stage so it just minifies everything . Comment : Isn t that what you want The gulp-useref plugin concatenates the files by default so you would need to use the no-concat option to split them out and then concatenate them again somewhere else . Comment : Ultimately yes . However I want to process some of those files prior to the concatenation -- hence the use of the transform stream github.com jonkemp gulp-useref transform-streams https : github.com jonkemp gulp-useref transform-streams Comment : the docs suggest that transform streams are for this very purpose Transform assets before concat . -- am I misunderstanding Comment : Minification doesn t really fit that use-case though . That use-case is more for something like transpiling css or javascript files before concatenating them . As you can see the gulp task above is a much simpler way to do it if you just want minification .",
"Question : I am using visual-studio task runner 2015 to run a Gulp task bound to before build . I have set it up so that when the gulp tasks fails it sends exit code 1 and at the end it says Process terminated with code 1 . however the build continues . This will cancel the build in team city so seems an issue linked Task Runner inside visual-studio . How can I prevent the build from taking place if it exits with a code other than 0 .. . Answer : You are correct in that this seems to be a Task Runner issue . The task runner does not communicate with MSBuild to stop a build if a BeforeBuild task fails . To get around this you can run your Gulp task via the project s pre-build event instead of via the Task Runner bindings . Set the pre-build event .. . .. . For class libraries you can access Build Events by right-clicking your project and selecting Properties - Compile - Build Events.. . . For web projects they are located at Properties - Build Events . Here is the command I used to call the Gulp task in pre-build event which will prevent the MSBuild from running if it exits with a failure : .. . .. . gulp -b ProjectDir --gulpfile ProjectDir gulpfile.js my-task .. . .. . This command calls Gulp passing absolute paths for working directory and gulpfile.js . Notes : .. . .. . I found all kinds of context and working directory issues trying to use a more straight up command like gulp my-task . ProjectDir is one of the Macros for Build Commands https : msdn.microsoft.com en-us library c02as0cs.aspx . It is assumed that Gulp is installed globally : npm-install -g gulp . See jonas.ninja http : stackoverflow.com users 3688464 jonas-ninja s answer http : stackoverflow.com a 36064728 120783 for how to build this install into the command or for an alternative that does not require the global dependency . Comment : Had not thought of this option thanks",
"Question : Short of it : started using Gulp recently convert from Grunt and am trying to use both Gulp s default watch task not gulp-watch from npm for SASS JS HTML and gulp-nodemon from npm to restart an Express server upon changes . When running just gulp-watch it works fine and when running gulp server for nodemon that works fine . However using both together shown below in the configuration of the default task the watch stuff isn t working . The task is running and on the CLI gulp shows Starting and Finished for the watch tasks but the files don t update . Relevant task configurations : .. . .. . Concat javascript : .. . .. . Nodemon restart on changes to express app : .. . .. . Watch javascript changes and run js : app for concat ing . .. . .. . Default task to initialize gulp-watch and nodemon simultaneously : .. . .. . If anyone has any ideas thanks in advance .. . Answer : gulp.run calls have been deprecated https : github.com gulpjs gulp issues 193 issuecomment-33277999 so I d try a different approach . Since you re already using gulp may I suggest giving gulp-nodemon https : www.npmjs.org package gulp-nodemon a try As per gulp-nodemon documentation https : github.com JacksonGariety gulp-nodemon onevent-tasks you can pass it an array of tasks to execute : .. . .. . UPDATE : Here s the full gulpfile.js file together with a working sample on github https : github.com gfestari gulp-sample . This way you spawn the watch task upon nodemon s start and ensure that the watch task is again triggered whenever nodemon restarts your app . EDIT : seems you should be calling the on- change event from gulp-nodemon https : github.com JacksonGariety gulp-nodemon onevent-tasks which will handle compile tasks before the restart event triggers . Comment : gaston - the setup i m using is already w gulp-nodemon actually however i didn t configure it so that it would restart the watch task on change . i ll give it a go and let ya know . thx Comment : so wasn t able to get it to work that way . what s confusing me : if I run the nodemon task like so : gulp.task demon watch function nodemon .. . both nodemon AND the watch task will execute and show output on a file changing - but the changes from the watch task aren t written to the appropriate files . like the task is run but its not piping the changes to disk . Comment : @jiveTurkey I ve updated my answer with the full gulpfile and left a working github sample https : github.com gfestari gulp-sample . Basically this will start nodemon and link it with a gulp-watch task to monitor file changes . Let me know how it goes Comment : Thanks for your answer Gaston . This worked like a charm and really helped me In my gulpfile.js I removed .on change watch because the watch task was running twice once right before the change and once again after the server restarted . Comment : @Gaston - thx again for the help approach above didn t solve the issue unfortunately although it put me on the right track : . It seems that running either a watch task or a nodemon task independently works fine . However if the nodemon configuration has cwd : something relative here that will influence the paths used by the watch tasks . You d think that they d be completely isolated but for some reason the cwd property in nodemon will influence paths in gulp.watch .. . configurations . Solution was to make paths absolute . Not ideal . Will post explanation in full below .",
"Question : null .. . Answer : I have tried many times to init a webapp by yo angular and chosen gulp instead of grunt but failed with .. . .. . then without any moving on task . when I use ctrl + C to stop it and run with gulp serve or gulp it shows no error or warning but the browser s console shows Uncaught ReferenceError : angular is not defined . then I tried to replace .. . .. . with .. . .. . and I have also tried to update my npm but they all don t work . Any ideas Comment : Are you using gulp-angular-generator Comment : Yes . I start the task with yo -- angular -- gulp instead of grunt I can t understand what your point is . Comment : take a look at this one stackoverflow.com questions 33459298 http : stackoverflow.com questions 33459298 yeoman-generator-angular-task-wiredep-is-not-in-gulpfile-useref-restore 36073950 36073950"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
build-system
|
UNK_RELATION
|
introspection@programming-languages@55
|
introspection -- a capability of some object-oriented @placeholder to determine the type of an object at runtime .
|
{
"confidence": [
35.41065216064453,
30.235939025878906,
28.832353591918945,
28.641502380371094,
28.541122436523438,
27.097627639770508,
26.82562255859375,
25.588775634765625,
25.42203712463379,
25.329303741455078,
24.971954345703125,
24.72071075439453,
24.573780059814453,
24.490890502929688,
24.490890502929688,
24.400341033935547,
23.87765121459961,
23.809486389160156,
23.809486389160156,
23.47633171081543,
23.374889373779297,
23.35540771484375,
23.206790924072266,
23.170196533203125,
23.13704490661621,
23.026874542236328,
22.99457550048828,
22.912866592407227,
22.878883361816406,
22.827396392822266,
22.783035278320312,
22.783035278320312,
22.759227752685547,
22.47406578063965,
22.3859806060791,
22.239049911499023,
21.950820922851562,
21.950820922851562,
21.8475341796875,
21.762798309326172,
21.68311882019043,
21.550495147705078,
21.542919158935547,
21.513927459716797,
21.509281158447266,
21.44772720336914,
21.392650604248047,
21.379451751708984,
21.379451751708984,
21.379451751708984,
21.379451751708984,
21.379451751708984,
21.155553817749023,
21.074138641357422,
21.074138641357422,
21.074138641357422,
21.074138641357422,
20.99982452392578,
20.970109939575195,
20.692142486572266,
20.67157554626465,
20.605083465576172,
20.605083465576172,
20.605083465576172,
20.582782745361328,
20.502506256103516,
20.495162963867188,
20.492664337158203,
20.448307037353516,
20.448307037353516,
20.448307037353516,
20.448307037353516,
20.448307037353516,
20.448307037353516,
20.169187545776367,
20.169187545776367,
20.169187545776367,
20.16213607788086,
20.128787994384766,
20.07421112060547,
20.044143676757812,
20.044143676757812,
20.043933868408203,
20.043933868408203,
20.043933868408203,
19.98906707763672,
19.98906707763672,
19.98906707763672,
19.98906707763672,
19.98906707763672,
19.98906707763672,
19.98906707763672,
19.98906707763672,
19.98906707763672,
19.98906707763672,
19.84912109375,
19.803569793701172,
19.800384521484375,
19.740428924560547
],
"content": [
"Perl does introspection in the fact that an object will tell you what type of object it is .",
"It uses the inspect module from the Python standard-library for the object introspection underneath .",
"by Glib : : Object : : Introspection and it s probably not blessing the hashref correctly .",
"Object Oriented Programming does define the difference between an object and a class .",
"locals globals dir object and type object .",
"I m trying to create a Gtk3 application in Perl using GObject Introspection https : metacpan.org pod Glib : : Object : : Introspection and Moo https : metacpan.org pod Moo .",
"In Perl 6 I know about the introspection methods .WHO .WHAT .WHICH .HOW and .WHY but these are at a class or object level .",
"identifier.subidentifier actually refers to an object of type etc .",
"Introspection allows for finding out the methods and properties of an object as does the function I provided above .",
"An implementation of Map for JavaBeans which uses introspection to get and put properties in the bean : .. . .. . Note : despite the fact the API returns Map Object Object since 1.9.0 the actual class for keys in the returned map is java.lang.String",
"this creates Map Object Object not Map String Object",
"So if I type identifier.subidentifier in the interpreter now I will get that object class object member package method etc .",
"Didn t know the term was introspection .",
"Class wrappers like Moose provide introspection as part of their implementation but Perl s built-in object support is much more primitive than that .",
"I guess that relates to this : .. . .. . introspection - How do I list available methods on a given object or package in Perl",
"How do I determine the calling object -- which object called the method I m currently in",
"So if I type identifier in the interpreter now I will get that object .",
"You can use JavaBeans introspection for this .",
"property classmethod and staticmethod are not related to introspection .",
"I often work on a huge not-very-well-documented object-oriented Perl repo at my place of employment .",
"It s about time we got real object property and method introspection on top of every NSObject .",
"I try python introspection in some weird manner .",
"In Perl methods can be dynamically generated at runtime so there is no tool that can examine an object and tell you what methods are supported .",
"great quick introspection tool",
"So the question is do we have Java ways of instantiating a object the way new-operator does by some form of introspection when the only information we have is the qualified-name of the class and of course that is present somewhere in the classpath",
"dir object is usually useful but in some cases it may not list all methods .",
"However I m aware of the following : .. . .. . list out all methods of object - perlmonks.org http : www.perlmonks.org node id 884054 884061 .. . Out of the box Perl doesn t do object introspection .",
"object . dict",
"This does not determine the type of a field .",
"Replacing object with the object you re interested in will return all the callables for any object with a single callable .",
"I thought Perl does support introspection e.g .",
"Python has a strong set of introspection features .",
"As described in This Answer http : stackoverflow.com a 582456 you can determine a derived object from a string as long as you know the base type .",
"The issue is that when an object of that subclass is created it remains of the type of the parent class - i.e .",
"Or because of the strongly typed nature of the language is the Type of the object immediately accessable as a top-level attribute of the object in memory",
"Does it require reflection or introspection",
"Introspection uses reflection the relationship between Introspection and Reflection can be seen as similar to JavaBeans and other Java classes .",
"Check this list khelll.com blog ruby ruby-introspection http : www.khelll.com blog ruby ruby-introspection",
"No you cannot because python is not a statically typed language http : stackoverflow.com a 1517670 1357527 so before an object is instantiated that object has no type .",
"@godel9 I get that I m more so curious as to why for-in doesn t implement introspection when you specify a type .",
"I ve seen using this in some context IIRC in a function which is called outside an object to get the global object .",
"I am trying to dynamically create a class instance based type using generics however I am encountering difficulty with class introspection .",
"So reflection refers to additional capabilities beyond merely discovering the type of an object .",
"Introspection taken from here http : web.archive.org web 20090226224821 http : java.sun.com docs books tutorial javabeans introspection index.html .. . .. . Introspection is the automatic process of analyzing a bean s design-patterns to reveal the bean s properties events and methods .",
"of an object in Python",
"It will display all the methods available for that object .",
"I ve filed a bug on those limitations and also on the general lack of class introspection .",
"It also doesn t show introspection properties such as func defaults .",
"If you need introspection you cannot use python .",
"It is all about general introspection not about values .",
"You can t pass a pointer in GObject introspection .",
"This library utilizes gobject-introspection and exposes a method create codec array .",
"Doing self.methods just returns all the methods that the Object object contains .",
"The challenge : I want a function that takes an object and returns a Map String Object where the keys are strings attr1 attr2 etc .",
"In 1.9.0 they have changed it to Map Object Object but in fact it always contains String only keys .",
"Given a Python object of any kind is there an easy way to get a list of all methods that this object has",
"@marsh To print the methods : print method for method in dir object if callable getattr object method .",
"It appears you can use this code replacing object with the object you re interested in : - .. . .. . I discovered it at this site http : www.diveintopython.net power of introspection index.html hopefully that should provide some further detail",
"Take a look at the following built-in functions http : docs.python.org library functions.html : .. . .. . type .. . dir .. . id .. . getattr .. . hasattr .. . globals .. . locals .. . callable .. . .. . type and dir are particularly useful for inspecting the type of an object and its set of attributes respectively .",
"Again some languages could give a list of those methods for an object and a description .",
"Shorter and with less object instantiated",
"Is there any way to get the name of an object in Python",
"Return first matching object name .. . .. . 1 .",
"Returns a MethodBase object representing the currently executing method .",
"When I research introspection and VAPI I see lots of documentation referencing the fact that the VAPI can be automatically generated from the introspection annotations.. . but what about a project that already has a VAPI but no introspection",
"The package name varies by distribution but it s the one containing usr lib pkgconfig gobject-introspection-1.0.pc or usr lib64 pkgconfig gobject-introspection-1.0.pc for some 64-bit distros : .. . .. . Fedora CentOS RHEL etc . : gobject-introspection-devel .. . Debian Ubuntu Mint etc . : libgirepository1.0-dev .. . Arch : gobject-introspection .. . FreeBSD : gobject-introspection .. . Cygwin : libgirepository1.0-devel",
"a and b refer to the same object so a function receiving this object has no way to know which name was used to refer to the object in the function-call .",
"The object Environment Record has as its base object the global object of the associated Realm .",
"Is it possible to automatically generate the introspection annotations given the VAPI",
"VAPI bindings are not necessarily related to GObject introspection .",
"Magical introspection does not work well with JavaScript .",
"I would prefer to do this with introspection if possible .",
"It does use GObject Introspection and in theory it is possible .",
"It s not true introspection but the documentation is usually pretty good .",
"For example imagine a class like this : .. . .. . What would the type of self.a be before an object is instantiated",
"Note IsAssignableFrom takes a Type not an object so you need to actually do OtherObj.getType .",
"Edit : For that example a typical usage would be : .. . .. . Then s is an object of type Foo the same each time .",
"Right now I have a specialized toMap implementation for each object-type that I care about and it s too much boilerplate .",
"The ability to consider boxed and unboxed conversions seems to imply to me some sort of introspection .",
"Whenever you call .say on an object you implicitly call its .gist method which is meant to give you a summarized string representation of the object - i.e .",
"It returns a list of all attributes of an object .",
"I want the actual callable object .",
"In any particular Python interpreter session I wish I could build a function full introspect whose output would be such a tree structure : .. . .. . The meaning of such a structure would be : .. . .. . identifier actually refers to an object of type type .",
"If a Class object represents an array type you can ask for the element type : .. . .. . Asking for the PropertyDescriptor for a class doesn t really make sense but perhaps you re looking for the BeanInfo :",
"want to return a new instance of the same Type than the object you have been given and the Type can be constructed with an init you can do : .. . .. . I quickly tested it with String : .. . .. . which worked fine .",
"There are different introspection strategies and dedicated libraries like Objenesis geared towards it .",
"RealBasic s Introspection is kinda of different than what I expected .",
"I want to use introspection to at least see what methods and classes are in the modules .",
"Can any one explain the use of Java reflection and introspection",
"I am learning about Python and Gtk 3 using GObject introspection .",
"Did you do that before you installed the gobject-introspection package",
"Anything else I can do other than disabling gobject-introspection",
"I have version gobject-introspection 0.9.12 installed and glibc 2.12 .",
"Yes you are all right for-in fast-enumeration does not perform introspection but why not",
"Suggestion : take the time to study and understand iteration enumeration this is not introspection .",
"I haven t found any framework who determines a generic field type through the inheritance layers so i ve written some method : .. . .. . This logic determines the type through the field information and the current object class .",
"The idea was to simplify some of the arguments to a method by automatically reflecting some information about the calling object .",
"First the code : .. . .. . Every time I do .append on ListStore object I get such error : .. . .. . Of course the ListStore object is str str str boolean type .",
"Converting it to a protobuf object"
]
}
|
{
"confidence": [
36.55083084106445,
35.42680740356445,
33.191532135009766,
32.126522064208984,
31.85991668701172,
31.727760314941406,
31.05483627319336,
30.5618896484375,
30.386917114257812,
30.272117614746094,
29.81949234008789,
29.739017486572266,
29.15699005126953,
29.052173614501953,
28.858112335205078,
28.44150161743164,
28.432716369628906,
28.259807586669922,
27.609928131103516
],
"content": [
"Question : A colleague asked me an interesting question today - is the C keyword operator is considered reflection How is this operator implemented behind the scenes Does it require reflection or introspection Or because of the strongly typed nature of the language is the Type of the object immediately accessable as a top-level attribute of the object in memory MSDN http : msdn.microsoft.com en-us library scekt9xw 28VS.71 29.aspx states that : .. . .. . Note that the is operator only considers reference conversions boxing conversions and unboxing conversions . Other conversions such as user-defined conversions are not considered by the is operator . The ability to consider boxed and unboxed conversions seems to imply to me some sort of introspection . Comment : related stackoverflow.com questions 57701 http : stackoverflow.com questions 57701 what-are-the-performance-characteristics-of-is-reflection-in-c lq 1 .. . Answer : Other languages have runtime time information sufficient to support dynamic casting and yet nothing that could be described as reflection C++ being an obvious example . So reflection refers to additional capabilities beyond merely discovering the type of an object . To reflect on an object implies the ability to walk its members for example . Comment : It would be more correct to say that reflection is parsing the members of a class than those of an object since you do not need to have an instance alive . Also reflection enables discovering what classes you have in an assembly not only members and other info of a class . Comment : @Danny Varod - Not all languages have classes or assemblies . Comment : C++ has classes and libraries Java has classes and packages . Object Oriented Programming does define the difference between an object and a class . Comment : Also C++ could not have reflection - since the binary files do not have the required info embedded in them . - That is why you need h files to consume a binary and lib files to link expect from the assemblies to run . Comment : @Danny Varod - Languages with prototypal-inheritance Self JavaScript do not have classes but they may have reflection JavaScript allows you to walk through the members of an object .",
"Question : I m trying to create a Gtk3 application in Perl using GObject Introspection https : metacpan.org pod Glib : : Object : : Introspection and Moo https : metacpan.org pod Moo . There s a non-Moo class from Gtk Gtk : : ApplicationWindow which I subclass through Moo using extends Gtk : : ApplicationWindow . The issue is that when an object of that subclass is created it remains of the type of the parent class - i.e . Gtk : : ApplicationWindow . I tried the same thing by subclassing my own non-Moo based class instead and the object created from this subclass is of the correct type . What could be the reason for this difference Comment : Nice find . I tested with DateTime worked like a charm . .. . Answer : I can t find Gtk : : ApplicationWindow to verify but it probably does .. . .. . instead of Comment : Thanks it does look to be the case . The bindings for Gtk : : ApplicationWindow are automatically generated at runtime or compile-time by Glib : : Object : : Introspection and it s probably not blessing the hashref correctly . Comment : Ah I get what the module does now . Unfortunately fixing the module would not be trivial at least not to someone not familiar with its inner workings .",
"Question : I have been trying to determine the type of a field in a class . I ve seen all the introspection methods but haven t quite figured out how to do it . This is going to be used to generate xml json from a java class . I ve looked at a number of the questions here but haven t found exactly what I need . Example : .. . .. . When I marshall this object I need to know that the chidren field is a list of objects of type Person so I can marshall it properly . Thanks Comment : List Person Unless I am missing the point . Comment : That is what I meant .. . Answer : I haven t found any framework who determines a generic field type through the inheritance layers so i ve written some method : .. . .. . This logic determines the type through the field information and the current object class . Listing 1 - logic : .. . .. . Listing 2 - Samples Tests : .. . .. . I m looking forward to hear your feedback",
"Question : I m trying to become comfortable in Perl 6 . One of the things I found handy in Python when I was at a REPL prompt was that I could do a dir object and find out the attributes of an object which in Python includes the object s methods . This often served as a helpful reminder of what I wanted to do Oh that s right trim in Python is called strip that sort of thing . In Perl 6 I know about the introspection methods .WHO .WHAT .WHICH .HOW and .WHY but these are at a class or object level . How do I find out what s inside an object and what I can do to it .. . Answer : How do I find out what s inside an object and what I can do to it You mentioned that you already know about the introspection methods - but are you aware of what you can find out by querying an objects metaobject available from .HOW There is a shortcut for querying an object s metaobject a . b translates to a.HOW.b a . The methods and attributes for Article are themselves objects - instances of Method and Attribute . Whenever you call .say on an object you implicitly call its .gist method which is meant to give you a summarized string representation of the object - i.e . the gist of it . The attributes of the builtin Str type appear to be of type BOOTSTRAPATTR type - which doesn t implement the .gist method . As an alternative we can just ask for the attributes to spit out their names instead .. . .. . You can find our more here https : perl6advent.wordpress.com 2015 12 19 day-19-introspection which is where just about everything for this answer came from . Comment : Thank you . I didn t realise what I was seeing when I called .HOW . I could vaguely recall seeing . syntax before but I couldn t figure out how to find out what methods it supported to find out what I could call : - Comment : instead of .map : .name you can also use .name",
"Question : I have been trying to determine the type of a field in a class . I ve seen all the introspection methods but haven t quite figured out how to do it . This is going to be used to generate xml json from a java class . I ve looked at a number of the questions here but haven t found exactly what I need . Example : .. . .. . When I marshall this object I need to know that the chidren field is a list of objects of type Person so I can marshall it properly . Thanks Comment : List Person Unless I am missing the point . Comment : That is what I meant .. . Answer : if you want to compare the field type you should try this .. . .. . or Comment : This does not determine the type of a field . This assumes you know what class you re looking for String YOURCLASS and you just want to test if you can assign it .",
"Question : I have been trying to determine the type of a field in a class . I ve seen all the introspection methods but haven t quite figured out how to do it . This is going to be used to generate xml json from a java class . I ve looked at a number of the questions here but haven t found exactly what I need . Example : .. . .. . When I marshall this object I need to know that the chidren field is a list of objects of type Person so I can marshall it properly . Thanks Comment : List Person Unless I am missing the point . Comment : That is what I meant .. . Answer : Here s an example that answers my question .. . .. . This outputs",
"Question : I have a Java object obj that has attributes obj.attr1 obj.attr2 etc . The attributes are possibly accessed through an extra level of indirection : obj.getAttr1 obj.getAttr2 if not public . The challenge : I want a function that takes an object and returns a Map String Object where the keys are strings attr1 attr2 etc . and values are the corresponding objects obj.attr1 obj.attr2 . I imagine the function would be invoked with something like .. . .. . toMap obj .. . or toMap obj attr1 attr3 where attr1 and attr3 are a subset of obj s attributes .. . or perhaps toMap obj getAttr1 getAttr3 if necessary . I don t know much about Java s introspection : how do you do that in Java Right now I have a specialized toMap implementation for each object-type that I care about and it s too much boilerplate . .. . .. . NOTE : for those who know Python I want something like obj . dict . Or dict attr obj . getattribute attr for attr in attr list for the subset variant . Comment : Does it have to be recursive Comment : @biziclop : no no recursion .. . Answer : You can use JavaBeans introspection for this . Read up on the java.beans.Introspector class : .. . .. . Big caveat : My code deals with getter methods only it will not find naked fields . For fields see highlycaffeinated s answer . : - You will probably want to combine the two approaches . Comment : Whats the difference between Introspector vs just reflection Comment : @Amir : Introspection uses reflection to do its work but works at a higher level than reflection . Reflection finds Java-level fields and methods introspection finds JavaBeans-level properties and events . Comment : All the answers were good . I ll accept this one because it proved the most useful to me in my final solution which involves BeanInfo and java.io.Serializable . Thanks all .",
"Question : For many framework development we need to instantiate class by reading qualified class names from a config file . There are different introspection strategies and dedicated libraries like Objenesis geared towards it . However for classes with no default constructor overloaded I believe no introspection works if we do not know the signature of the overloaded constructor . The non standard approach is to use sun.misc.Unsafe class to allocate . This is what I understand . Is that a correct understanding Then there s a problem with that as super classes are not instantiated by using Unsafe . But I thought Unsafe is the closest to whatever C code new-operator invokes at least a part of it . So the question is do we have Java ways of instantiating a object the way new-operator does by some form of introspection when the only information we have is the qualified-name of the class and of course that is present somewhere in the classpath Comment : You can always inspect the available constructors and see if you have any values you can pass to them . Dependency injection frameworks will do this for autowired constructor-injected objects - the assumption is that the objects you re creating mostly need other objects from your codebase not generic parameters like strings and that the DI container also manages these dependencies and thus knows how to create them . Comment : Do you want to get an initialized object a constructor invoked or uninitialized one no constructors and initializers invoked fields have default 0 or null values Comment : I want to have the superclass members initialized the same way . So is that allocation of an object on the heap and instantiation of its members which in turn might need allocation are part of different strategies @millimoose What you are saying is correct for a DI framework since as you said it is mostly objects from your codebase . However I am kind of trying a generic object generator for a project which takes external adaptor classes and did not want to restrict to a you-need-to-have-a-default-constructor defined . .. . Answer : i m not sure if i understand your question but usually in java if you know the class name you can simply write : classname myObject new classname Comment : This question is related to runtime - in compile-time he did not know type so cannot write this . He has only string that contain class name .",
"Question : Given an array .. . .. . Would the output of the log message be 5 or 5 6 7 8 . ie . Does the for in loop introspect top level objects in a dictionary array or deeply inspect nested-sets arrays dictionaries etc. . Edit .. . .. . I realize I m taking a lot of heat for this question so let me clarify what I was getting at . Yes you are all right for-in fast-enumeration does not perform introspection but why not If I m specifically designating a type such as NSNumber or NSString why doesn t the for in loop perform a kindOfClass method with the type you designated rather than casting an object as the incorrect type In the example above is it not intuitive that I would only be iterating over the NSNumbers in the array I suspect that the answer is performing introspection on each item in an array may negate the performance enhancements of fast-enumeration But could this not be solved with using id when we want dynamic-typing and explicit types when we d like to perform introspection Comment : What happened when you tried it Comment : Suggestion : take the time to study and understand iteration enumeration this is not introspection . As Josh comments : try it and also enough different configurations that you fully understand the for-in loop and arrays with array elements . Comment : How can anyone be so lazy as to ask what would happen if I ran this code Comment : This question appears to be off-topic because it is so trivial as not be worth even a pennyworth of bandwidth . Comment : @matt Step away from SO you are getting jaded BTDT . .. . Answer : Your code will generate : .. . .. . A few comments.. . .. . .. . 1 The for-loop only enumerates one level of whatever object you re enumerating so it doesn t go down levels . 2 You should be careful to make sure that your loop variable is the correct type . Not every element of your NSArray is an NSNumber . If you try to send a message specific to NSNumber you ll get a run-time error . 3 Your code doesn t crash because using @ with NSLog sends a description message to the object which is implemented by all the elements of the array . In your example you should still make myNumber of type id however unless you re 100 sure everything in the array is actually an NSNumber . Comment : Generally an array will only contain one type . Comment : @Zaph that s besides the point . Comment : @godel9 I get that I m more so curious as to why for-in doesn t implement introspection when you specify a type .",
"Question : I have been trying to determine the type of a field in a class . I ve seen all the introspection methods but haven t quite figured out how to do it . This is going to be used to generate xml json from a java class . I ve looked at a number of the questions here but haven t found exactly what I need . Example : .. . .. . When I marshall this object I need to know that the chidren field is a list of objects of type Person so I can marshall it properly . Thanks Comment : List Person Unless I am missing the point . Comment : That is what I meant .. . Answer : take this snippet : .. . .. . the key class is Field http : java.sun.com javase 6 docs api java lang reflect Field.html Comment : That s public fields only including static with Class.getFields . Also it ll be the erased type . Comment : then I misunderstood the question",
"Question : I have a Java object obj that has attributes obj.attr1 obj.attr2 etc . The attributes are possibly accessed through an extra level of indirection : obj.getAttr1 obj.getAttr2 if not public . The challenge : I want a function that takes an object and returns a Map String Object where the keys are strings attr1 attr2 etc . and values are the corresponding objects obj.attr1 obj.attr2 . I imagine the function would be invoked with something like .. . .. . toMap obj .. . or toMap obj attr1 attr3 where attr1 and attr3 are a subset of obj s attributes .. . or perhaps toMap obj getAttr1 getAttr3 if necessary . I don t know much about Java s introspection : how do you do that in Java Right now I have a specialized toMap implementation for each object-type that I care about and it s too much boilerplate . .. . .. . NOTE : for those who know Python I want something like obj . dict . Or dict attr obj . getattribute attr for attr in attr list for the subset variant . Comment : Does it have to be recursive Comment : @biziclop : no no recursion .. . Answer : Use Apache Commons BeanUtils : http : commons.apache.org beanutils . An implementation of Map for JavaBeans which uses introspection to get and put properties in the bean : .. . .. . Note : despite the fact the API returns Map Object Object since 1.9.0 the actual class for keys in the returned map is java.lang.String Comment : +1 Ok this one is officially the least amount of code . Comment : It seems this solution is only one handling put method so far : Comment : this creates Map Object Object not Map String Object Comment : @vvondra Thanks at the time of writing it was returning typeless Map so the code was producing an unchecked assignment warning . In 1.9.0 they have changed it to Map Object Object but in fact it always contains String only keys . Comment : it sucks they did it to keep BC when adding generics in 1.9 commons.apache.org proper commons-beanutils javadocs v1.9.2 http : commons.apache.org proper commons-beanutils javadocs v1.9.2 RELEASE-NOTES.txt",
"Question : I m starting to code in various projects using Python including Django web development and Panda3D game development . To help me understand what s going on I would like to basically look inside the Python objects to see how they tick - like their methods and properties . So say I have a Python object what would I need to print out its contents Is that even possible .. . Answer : Python has a strong set of introspection features . Take a look at the following built-in functions http : docs.python.org library functions.html : .. . .. . type .. . dir .. . id .. . getattr .. . hasattr .. . globals .. . locals .. . callable .. . .. . type and dir are particularly useful for inspecting the type of an object and its set of attributes respectively . Comment : Didn t know the term was introspection . That s a great help Aswell as all the functons you ve given me.. . Thank you Comment : property classmethod and staticmethod are not related to introspection . These methods all create special types of objects that can be used to define classes with special behavior but are of no help at inspecting those classes or constructs . Comment : Quite right . I got overzealous in my enumerating . I have edited my post accordingly . Thanks . Comment : The answer from @Brian below shows you how to also view the source code of various python objects from within python . That is what I was originally searching for and I m sure I won t be alone . It might be worth including a reference to his answer in this answer since it s the most accepted . Comment : I just realized how much I love python after reading your answer . Thanks",
"Question : I have this Perl code : .. . .. . The returned object c is HTTP : : Daemon : : ClientConn GLOB 0x85543d8 . Original code indicates there is a sockhost member but I wonder what other members it might have None of my printing efforts helped . Even meta : : CPAN https : metacpan.org pod HTTP : : Daemon : : ClientConn page is silent but I want a general solution in code to reveal what c is . For reference I have Perl v5.12.4 . Comment : perldoc.perl.org UNIVERSAL.html http : perldoc.perl.org UNIVERSAL.html has some interesting stuff . Like the can method . Might be worth looking at autoload too though which might give an idea why this is hard . .. . Answer : HTTP : : Daemon documents the methods it supports http : search.cpan.org gaas HTTP-Daemon-6.01 lib HTTP Daemon.pm . It also supports all the IO : : Socket : : INET methods via inheritance . However on the more general question of how you can examine in general to see what methods a Perl class exposes the answer is you can t . In Perl methods can be dynamically generated at runtime so there is no tool that can examine an object and tell you what methods are supported . Comment : Since Perl methods can be dynamically generated that is exactly why I want a run-time tool . I thought Perl does support introspection e.g . stackoverflow.com questions 10142530 http : stackoverflow.com questions 10142530 how-can-i-perform-introspection-in-perl . use Help Modulename also seems promising . Comment : @MKaama If a method isn t documented then it s not part of the module s public API and it could change at any time . The documentation is the only tool you should be using for this .",
"Question : I have a Java object obj that has attributes obj.attr1 obj.attr2 etc . The attributes are possibly accessed through an extra level of indirection : obj.getAttr1 obj.getAttr2 if not public . The challenge : I want a function that takes an object and returns a Map String Object where the keys are strings attr1 attr2 etc . and values are the corresponding objects obj.attr1 obj.attr2 . I imagine the function would be invoked with something like .. . .. . toMap obj .. . or toMap obj attr1 attr3 where attr1 and attr3 are a subset of obj s attributes .. . or perhaps toMap obj getAttr1 getAttr3 if necessary . I don t know much about Java s introspection : how do you do that in Java Right now I have a specialized toMap implementation for each object-type that I care about and it s too much boilerplate . .. . .. . NOTE : for those who know Python I want something like obj . dict . Or dict attr obj . getattribute attr for attr in attr list for the subset variant . Comment : Does it have to be recursive Comment : @biziclop : no no recursion .. . Answer : Here is a really easy way to do this . Use Jackson JSON http : jackson.codehaus.org lib to convert the object to JSON . Then read the JSON and convert it to a Map . The map will contain everything you want . Here is the 4 liner .. . .. . And additional win of course is that this is recursive and will create maps of maps if it needs to Comment : That s way too roundabout when you can use straight JavaBeans introspection . Comment : Not sure which one is less code . Comment : I like this way because I don t have to care anything about reflection or how the object is actually structured . Comment : Plus how will it deal with JSON-incompatible objects The solutions from highlycaffeinated and me will deal with that just fine . Comment : @Chris Jester-Young This is also recursive where the other way is not . And I don t have to worry about getters .",
"Question : I am trying to dynamically create a class instance based type using generics however I am encountering difficulty with class introspection . Here are the questions : .. . .. . Is there a Swift-equivalent to Obj-C s self.class Is there a way to instantiate a class using the AnyClass result from NSClassFromString Is there a way to get AnyClass or otherwise type information strictly from a generic parameter T Similar to C s typeof T syntax Comment : stackoverflow.com a 24069875 292145 http : stackoverflow.com a 24069875 292145 gives some hints on the Swift reflection API . Comment : Objective-C s self.class would become self.dynamicType.self in Swift I belief Comment : In an instance method here s how to call a class-method : self.dynamicType.foo .. . Answer : Swift implementation of comparing types .. . .. . NOTE : Notice that it also works with protocols the object may or may not extend",
"Question : I m about to start a script that may have some file lookups and manipulation so I thought I d look into some packages that would assist me mostly I d like the results of the iteration or search to be returned as objects which would have base name path file size uid modification time etc as some sort of properties . The thing is I don t do this all that often and tend to forget APIs when that happens I d rather let the code run on an example directory and dump all of the properties in an object so I can remind myself what is available where obviously I d like to dump in order to avoid having to code custom printouts . However I m aware of the following : .. . .. . list out all methods of object - perlmonks.org http : www.perlmonks.org node id 884054 884061 .. . Out of the box Perl doesn t do object introspection . Class wrappers like Moose provide introspection as part of their implementation but Perl s built-in object support is much more primitive than that . Anyways I looked into : .. . .. . Files and Directories Handling in Perl - Perl Beginners Site http : perl-begin.org topics files-and-directories .. . .. . .. . and started looking into the libraries referred there also related link : rjbs s rubric : the speed of Perl file finders http : rjbs.manxome.org rubric entry 1981 . So for one File : : Find : : Object seems to work for me this snippet : .. . .. . .. . prints this : .. . .. . .. . which is mostly what I wanted except the stat results are an array and I d have to know its layout dev ino mode nlink uid gid rdev size atime mtime ctime blksize blocks stat - perldoc.perl.org http : perldoc.perl.org functions stat.html to make sense of the printout . Then I looked into IO : : All which I like because of utf-8 handling but also say socket functionality which would be useful to me for an unrelated task in the same script and I was thinking I d use this package instead . The problem is I have a very hard time discovering what the available fields in the object returned are e.g . with this code : .. . .. . .. . I get a printout like this : .. . .. . .. . which clearly doesn t show attributes like mtime etc . - even if they exist which you can see if you uncomment the respective print line . I ve also tried Data : : Printer s How can I perform introspection in Perl http : stackoverflow.com questions 10142530 how-can-i-perform-introspection-in-perl 10143427 p function - it prints exactly the same fields as Dumper . I also tried to use print Dumper ref contentry . : : list out all methods of object - perlmonks.org http : www.perlmonks.org node id 884054 884061 and this prints stuff like : .. . .. . .. . but only if you use the print contentry- uid .. . line beforehand else they are not listed I guess that relates to this : .. . .. . introspection - How do I list available methods on a given object or package in Perl 911294 http : stackoverflow.com questions 910430 how-do-i-list-available-methods-on-a-given-object-or-package-in-perl 911294 911294 .. . In general you can t do this with a dynamic language like Perl . The package might define some methods that you can find but it can also make up methods on the fly that don t have definitions until you use them . Additionally even calling a method that works might not define it . That s the sort of things that make dynamic languages nice . : .. . .. . Still that prints the name and type of the field - I d want the name and value of the field instead . So I guess my main question is - how can I dump an IO : : All result so that all fields including stat ones are printed out with their names and values as is mostly the case with File : : Find : : Object I noticed the IO : : All results can be of type say IO : : All : : File http : search.cpan.org frew IO-All-0.57 lib IO All File.pm but its docs defer to See IO : : All http : search.cpan.org frew IO-All-0.57 lib IO All.pod which doesn t discuss IO : : All : : File explicitly much at all . I thought if I could cast contentry to a IO : : All : : File maybe then mtime etc fields will be printed - but is such a cast possible at all If that is problematic are there other packages that would allow introspective printout of directory iteration results - but with named fields for individual stat properties .. . Answer : Perl does introspection in the fact that an object will tell you what type of object it is . You can also see if an object can do something : .. . .. . What Perl can t do directly is give you a list of all the methods that a particular object can do . You might be able to munge some way.Perl objects are stored in package namespaces which are in the symbol-table . Classes are implemented via Perl subroutines . It may be possible to go through the package namespace and then find all the subroutines . However I can see several issues . First private methods the ones you re not suppose to use and non-method subroutines would also be included . There s no way to know which is which . Also parent methods won t be listed . Many languages can generate such a list of methods for their objects I believe both Python and Ruby can but these usually give you a list without an explanation what these do . For example File : : Find : : Object : : Result which is returned by the next obj method of File : : Find : : Object has a base method . What does it do Maybe it s like basename and gives me the name of the file . Nope it s like dirname and gives me the name of the directory . Again some languages could give a list of those methods for an object and a description . However those descriptions depend upon the programmer to maintain and make sure they re correct . No guaranteed of that . Perl doesn t have introspection but all Perl modules stored in CPAN must be documented via POD embedded documentation and this is printable from the command-line : .. . .. . This is the documentation you see in CPAN pages in http : Perldoc.perl.org and in ActiveState s Perl documentation . It s not bad . It s not true introspection but the documentation is usually pretty good . After all if the documentation stunk I probably wouldn t have installed that module in the first place . I use perldoc all the time . I can barely remember my kids names let alone the way to use Perl classes that I haven t used in a few months but I find that using perldoc works pretty wall . What you should not do is use Data : : Dumper to dump out objects and try to figure out what they contain and possible methods . Some cleaver programmers are using Inside-Out Objects http : www.stonehenge.com merlyn UnixReview col63.html to thwart peeking toms . So no Perl doesn t list methods of a particular class like some languages can but perldoc comes pretty close to doing what you need . I haven t use File : : Find : : Object in a long while but going over the perldoc I probably could write up such a program without much difficulty . Comment : Thanks for the answer @DavidW - all of these are details that I don t usually keep in mind so it s great to have them written down Part of this is not only for forgetfulness but also to print out the values so I can see if some conditions I d be about to write make any sense at all.. . I am trying to avoid writing a specialized printing function and I just learned of Moose so I thought maybe I can have a Moosified class that extends IO : All where I would just redeclare fields from the docs i.e . mtime and then they d hopefully print. . but I get stuck w AUTOLOAD : Cheers Comment : @sdaau The m obj command in the perl debugger does a reasonable job of listing what methods are available on a particular instance or class . It will not catch triggered AUTOLOAD methods without a corresponding sub declaration not definition but that is seldom a problem in your own code . Now go thou and do likewise .",
"Question : I m trying to create a Gtk3 application in Perl using GObject Introspection https : metacpan.org pod Glib : : Object : : Introspection and Moo https : metacpan.org pod Moo . There s a non-Moo class from Gtk Gtk : : ApplicationWindow which I subclass through Moo using extends Gtk : : ApplicationWindow . The issue is that when an object of that subclass is created it remains of the type of the parent class - i.e . Gtk : : ApplicationWindow . I tried the same thing by subclassing my own non-Moo based class instead and the object created from this subclass is of the correct type . What could be the reason for this difference Comment : Nice find . I tested with DateTime worked like a charm . .. . Answer : new constructors need to be written in a way to observe the caller s actual class which works with subclassing but they can also hard-code which class they create objects with . Compare : .. . .. . Glib looks like it s an XS module wrapper around a C library and it might hard code the class . You could probably just try to re-bless call bless again on the object that was constructed the object into your actual subclass . Not sure exactly how that would work with Moo but probably in the BUILD method . You could also skip inheritance and use delegation instead . Create an attribute to hold the original Window object and then delegate all methods to it except your own in the subclass . In Moose not Moo you can do this with a regex : https : metacpan.org pod Moose handles-ARRAY-HASH-REGEXP-ROLE-ROLETYPE-DUCKTYPE-CODE .. . .. . Not sure how to do that nicely with Moo . Comment : Yes this does appear to be the case and re-blessing in the BUILD sub makes things work fine and the subclass behaves like it should . Thank you",
"Question : I have been trying to determine the type of a field in a class . I ve seen all the introspection methods but haven t quite figured out how to do it . This is going to be used to generate xml json from a java class . I ve looked at a number of the questions here but haven t found exactly what I need . Example : .. . .. . When I marshall this object I need to know that the chidren field is a list of objects of type Person so I can marshall it properly . Thanks Comment : List Person Unless I am missing the point . Comment : That is what I meant .. . Answer : As dfa points out you can get the erased type with java.lang.reflect.Field.getType . You can get the generic type with Field.getGenericType which may have wildcards and bound generic parameters and all sorts of craziness . You can get the fields through Class.getDeclaredFields Class.getFields will give you public fields including those of the supertpye - pointless . To get the base type fields go through Class.getSuperclass . Note to check modifiers from Field.getModifiers - static fields probably will not be interesting to you .",
"Question : How can I get a list in the form of an NSArray or NSDictionary of a given object attributes in Objective-C Imagine the following scenario : I have defined a parent class which just extends NSObject that holds an NSString a BOOL and an NSData object as attributes . Then I have several classes which extend this parent class adding a lot of different attributes each . Is there any way I could implement an instance method on the parent class that goes through the whole object and returns say an NSArray of each of the child class attributes as NSStrings that are not on the parent class so I can later use these NSString for KVC .. . Answer : If someone is in the need of getting as well the properties inherited from the parent classes as I did here is some modification on orange80 http : stackoverflow.com questions 754824 get-an-object-attributes-list-in-objective-c 8380836 8380836 code to make it recursive : Comment : Couldn t we make this a category and extend NSObject with it so this functionality is built into every class that is a child of NSObject Comment : That sounds like a good idea if I can find the time will update the answer with that option . Comment : Once you re done with that I ll add a method dump when I have time . It s about time we got real object property and method introspection on top of every NSObject . Comment : I ve been working on adding value output as well but it appears that for some structures rects the type is the actual value of the property . This is the case with the caretRect of a tableViewController and other unsigned ints in a viewController struct return c or f as the type which conflicts with the objective-C Runtime docs . Clearly more work is needed here to get this complete . developer.apple.com library mac documentation cocoa conceptual https : developer.apple.com library mac documentation cocoa conceptual ObjCRuntimeGuide Articles ocrtPropertyIntrospection.html Comment : I was giving a look but there is a problem I cannot workaround to make it recursive I need to call the method for the superclass like in the last line of the previous code as NSObject is the root class that wont work inside a category . So no recursivity possible.. . : not sure if a category in NSObject is the way to go anymore.. ."
]
}
|
[] |
programming-languages
|
UNK_RELATION
|
jaws-wordnet@database@150
|
jaws-wordnet -- the java-api for wordnet searching jaws is an api that provides java applications with the ability to retrieve data from the wordnet @placeholder .
|
{
"confidence": [
100.27704620361328,
97.35610961914062,
93.16716766357422,
91.60042572021484,
90.09758758544922,
87.06023406982422,
78.33692932128906,
75.08369445800781,
73.09378051757812,
70.70880889892578,
69.08027648925781,
69.05738067626953,
68.71802520751953,
67.92420959472656,
65.89585876464844,
65.56702423095703,
64.4719467163086,
63.022377014160156,
62.058929443359375,
62.058929443359375,
59.738563537597656,
59.62183380126953,
59.473899841308594,
59.32591247558594,
59.185279846191406,
58.94451904296875,
58.798126220703125,
58.35694885253906,
57.684043884277344,
57.684043884277344,
57.4029541015625,
57.33021545410156,
56.77735900878906,
56.622291564941406,
56.622291564941406,
56.24176025390625,
56.132896423339844,
54.88636779785156,
53.12353515625,
52.72621154785156,
52.401123046875,
52.401123046875,
52.401123046875,
52.247406005859375,
51.49736022949219,
51.400020599365234,
51.18438720703125,
50.538787841796875,
50.480201721191406,
50.31916046142578,
50.16828155517578,
50.16828155517578,
49.077781677246094,
49.077781677246094,
49.077781677246094,
48.92236328125,
48.02623748779297,
48.02623748779297,
48.02623748779297,
48.02623748779297,
48.02623748779297,
47.4864616394043,
47.46391677856445,
47.46391677856445,
47.156822204589844,
47.087860107421875,
46.9517936706543,
46.715240478515625,
46.715240478515625,
46.715240478515625,
46.715240478515625,
46.234901428222656,
45.83087158203125,
45.30710983276367,
45.22856140136719,
44.76329040527344,
44.72532272338867,
44.72532272338867,
44.72532272338867,
44.72532272338867,
44.70289611816406,
43.36376953125,
43.31719207763672,
43.31719207763672,
43.024391174316406,
42.37944793701172,
42.37944793701172,
42.340354919433594,
42.340354919433594,
42.340354919433594,
41.24543762207031,
40.933467864990234,
40.93222427368164,
40.89995574951172,
40.72118377685547,
40.509498596191406,
39.5705680847168,
39.54267883300781,
39.54267883300781
],
"content": [
"I use Java API for wordnet searching JAWS for accessing wordnet from java .",
"I am programming in java with JAWS api to access wordnet database .",
"I m working in Java using WordNet through JAWS .",
"I am using WordNet 2.1 tool and accessing it pro-grammatically via JAWS Java API for WordNet Searching .",
"I use jaws-wordnet searching and am new to it .",
"I am using JAWS http : lyle.smu.edu tspell jaws index.html Java API for WordNet Searching and have set up the wordnet dictionary with VM Arguments in eclipse .",
"I ve searched for java library for wordnet similarity and also found some questions like this http : stackoverflow.com questions 5976537 wordnet-similarity-in-java-jaws-jwnl-or-java-wnsimilarity and this http : stackoverflow.com questions 11217499 jaws-wordnet-similarity .",
"I use JAWS for normal wordnet to find similarity between words .",
"I use JAWS for normal wordnet stuff because it s easy to use .",
"for example : .. . .. . I have used Stanford nlp and WordNet with JAWS .",
"2 Is there a general tutorial on various things we can do on WordNet via JAVA JAWS",
"Example : Tiger must return Animal similarly for other things like car - automobile .. . .. . I am using JAWS api for access to WordNet via JAVA .",
"i am using JAWS-Java API for wordnet searching.i have been searching alot but unable to find how to count the number of senses the given word can have.Is there any function for it",
"See related question answers : stackoverflow.com questions 5976537 http : stackoverflow.com questions 5976537 wordnet-similarity-in-java-jaws-jwnl-or-java-wnsimilarity",
"I couldn t give you a JAWS explanation of what i mean above but from WordNet in NLTK interface for python .",
"I need to use Wordnet in a java-based app .",
"Till now I have implemented sentence detector tokenizer and I am using WORDNET LIBRARY via JAWS api to find various meaning of words .",
"also see stackoverflow.com questions 2827671 wordnet-java-interface rq 1 http : stackoverflow.com questions 2827671 wordnet-java-interface rq 1",
"Maybe wordnet is not a good place .",
"WordNet alone is not sufficient for this .",
"I have installed WordNet 3.0 for this .",
"I am using wordnet 3.0 for windows .",
"Source : http : www.d.umn.edu tpederse Group01 WordNet wordnet-stoplist.html",
"How to get this in java using JAWS .",
"My question is : - How do I use WordNet Domains along with WordNet in Java",
"Is there any way to retrieve the indirect antonym in java program using jaws",
"Download wordnet from http : wordnet.princeton.edu wordnet download current-version .. . .. . Put it s contents in this directory : C : Program Files WordNet 2.1 .. . .. . Added the jar file : edu.mit.jwi 2.1.4.jar and edu.sussex.nlp.jws.beta.11.jar .",
"Check that this user has permissions to read the file D : Program Files WordNet 2.1 WordNet-InfoContent-2.1 .",
"WordNet is about semantics i.e .",
"The problem is Wordnet Dict is not a jar. .",
"http : www.d.umn.edu tpederse Data WordNet-InfoContent-2.1.tar.gz .. . .. . Extract it and copy into C : Program Files WordNet 2.1 ie inside 2.1 folder",
"You ll also need to download this http : code.google.com p xssm source browse trunk commons-lib WordNet r 151 WordNet 3.0 folder containing pre-processed WordNet and corpus data for it to work .",
"So download WordNet database from the link given below : http : wordnet.princeton.edu wordnet download current-version .. . .. . Add the path of the dict directory for the database directory :",
"I mean do people use wordnet for this task",
"I want to check whether a string is in wordnet or not .",
"I found 2 libraries in Java JWNL and JAWS .",
"In which directory you installed the JAWS api",
"This wordID is the wordnet 2.1 wordID .",
"I ve found the following jars : .. . .. . General library - JAWS http : lyle.smu.edu tspell jaws index.html .. . General library - JWNL http : sourceforge.net projects jwordnet .. . Similarity library Perl - Wordnet : : similarity http : wn-similarity.sourceforge.net .. . Java version of Wordnet : : similarity http : www.cogs.susx.ac.uk users drh21 beta .. . .. . What would you recommend for my app",
"I am trying to implement Resnik s similarity measure using WordNet hierarchy in java .",
"WordNet is a graph or more precisely a tree of hyponym hypernym relations .",
"There is a sense file in dict folder of WordNet but what can be done with it how",
"How can I make use of the sense file included in wordnet",
"One alternative I have currently found is WordNet .",
"I installed wordnet 2.1 and I added the jar file : edu.mit.jwi 2.1.4.jar and edu.sussex.nlp.jws.beta.11.jar and I copier the WordNet-2.1-InfoContent in D : Program Files WordNet 2.1 but i have this problem when i run my application .. . .. . please help and thank you .",
"yes jane..but from current location from where WordNetDatabase.java stored it is searching . C : Users piyush p Desktop workspace Wordnet src WordNet-3.0 dict index.sense .. . it should search from C : drive not from current location .",
"But they have not mentioned how to integrate this file into the wordnet database or is it that I have to programatically call this along with wordnet dict",
"There is function in JAWS to find similar wordForms Here are details : .. . .. . public AdjectiveSynset getSimilar throws WordNetException and here is link that you can check out : http : lyle.smu.edu tspell jaws doc edu smu tspell wordnet AdjectiveSynset.html this link it contails details that you can use .",
"I am searching for a way to find all the synonyms of a particular word using wordnet .",
"BTW look at this tutorial : - lyle.smu.edu tspell jaws http : lyle.smu.edu tspell jaws",
"Caused by : java.io.FileNotFoundException : . C : Users piyush p Desktop workspace Wordnet src WordNet-3.0 dict index.sense The filename directory name or volume label syntax is incorrect ..pretty easy huh",
"I changed the path of the dict to C : Program Files x86 WordNet dict and did the same in System.setProperty as follows : .. . .. . System.setProperty wordnet.database.dir C : Program Files x86 WordNet dict .. . .. . And it worked .",
"I am using jaws",
"Does this JAWS work for windows",
"Is there any function in jaws for this",
"I see it is listed as one of the available API in http : wordnet.princeton.edu wordnet related-projects Java I also see it has getAllSynonyms method they provide an example and it works .",
"This in turn will have 3-4 hypernyms . . wordnet gives machine calculator .",
"application as a program Wordnet only has one direct hypernym .",
"Shameless plug : .. . .. . I m writing a Scala library to access WordNet .",
"If anyone has some other algorithm than WordNet Kindly share it .",
"I am trying to access the top most object in the WordNet hierarchy .",
"Today I came across this new thing called WordNet Domains which has assigned DOMAIN labels to each word in WordNet .",
"The whole exception trace is there where the last line is my function calling WordNet synset API .",
"At the moment I am trying to access the synsets API made available by WordNet jar .",
"Check this out : .. . .. . Make sure to get the latest downloads and documentation from http : www.rednoise.org rita wordnet-old documentation index.htm",
"I am using JAWS .",
"Got it right by downloading the source files from here http : lyle.smu.edu tspell jaws jaws-src.zip and placing it in my project .",
"Do you know if there is some tool to use wordnet to check if a noun is a countable uncountable noun",
"I get the error as Error opening index file : C : ProgramFiles WordNet 2.1 dict index.sense .",
"I am working on Wordnet project while running the code there is a problem that edu.smu.tspell.wordnet doesn t exist .",
"With the below command I can check if the word actually exists in the wordnet database but this needs me to specify the POS i.e .",
"I am trying to get the sister terms I could see this on wordnet 3.1 online version to a particular word but I could not get that .",
"I have already the jar files but i m trying to execute with : java -classpath jaws.jar -Dwordnet.database.dir WordNet-3.0 dict Wordnettest And it didn t work too. .",
"JAWS Code snippet : .. . .. . PS : monosemous is a monosemous word .",
"Not sure if GAE allows the kind of reading WordNet does to read its files .",
"From personal experience I would say instead of using Domain Labels you can use values for the domains : Extended WordNet Domains project http : adimen.si.ehu.es web XWND on WordNet 3.0 .",
"Sticking with just WordNet you could try to use semantic similarity to determine if two words synsets are similar enough to be synonyms .",
"In WordNet you have similar words representing the same concept under this term call the Synset .",
"For the moment lets assume I am sticking with WORDNET atleast for a while since i have just started working on it .",
"My question is : - How do I programatically access the WordNet hierarchy node positions",
"I use JAWS .",
"Below is a quick example that came from modifying another of my answers on semantic similarity using WordNet http : stackoverflow.com a 14638272 1988505 .",
"How about using RitaWN instead of JAWS",
"I understand you already know about JAWS .",
"I am not sure if either JAWS or JWNL provide methods to calculate similarity between synsets but I have tried both for searching synsets and I ve found JAWS easier to use .",
"I am not sure if JAWS can be used to measure similarity between the words .",
"No JAWS has no built-in functions to find what you seek .",
"In Wordnet the IS-A-relation is called hypernym opposite : hyponym and the HAS-A relation is called meronym opposite : holonym .",
"I m using WordNet 3 to validate English words but it does not have a definition for the word for .",
"you can use rita wordnet for that : http : rednoise.org rita reference RiWordNet getDistance",
"To get synonyms in the coverage of your example you would require more than wordnet possibly some semantic similarity methods to extract the other words .",
"Example http : i.stack.imgur.com tNKIA.png .. . .. . I have used the jaws API and managed to get synonyms of particular words that I have entered .",
"There is no specific method to find the distance between words in JAWS .",
"Furthermore I added synset names and synonym type to my data so that I could make use of other Wordnet data like definition and or examples http : www.nltk.org howto wordnet.html words .",
"I am new to wordnet API and I am struggling how I can get to th following issue .. . .. . I would like that if I give for example George Bush I will arrive to the term person .",
"I m trying to use JAWS Api for Wordnet and i want to do a test with this code : .. . .. . But when i compile using : javac -cp jaws.jar Wordnettest.java My Wordnettest.class is here but when i launch it with : java Wordnettest I have this : .. . .. . I don t understand why because i set the dic with setProperty.. . .. . .. . Could you help me",
"It s a database I don t really understand their doc. . lyle.smu.edu tspell jaws index.html http : lyle.smu.edu tspell jaws index.html I precise i m on Ubuntu. .",
"I am trying to use WordNet in GAE but I am getting the error mentioned below .",
"I am able to access the WordNet after specifying the directory with the help of appengine properties ."
]
}
|
{
"confidence": [
113.84637451171875,
110.74725341796875,
107.27175903320312,
106.50565338134766,
105.16742706298828,
104.91682434082031,
102.86924743652344,
102.55301666259766,
101.19783020019531,
100.03295135498047,
98.81829071044922,
98.6379623413086,
98.32508087158203,
97.295654296875,
96.43131256103516,
95.0079345703125,
93.3351821899414,
92.87516784667969,
92.018798828125,
91.67169189453125
],
"content": [
"Question : null .. . Answer : I am working on a NLP project . I am using wordnet 3.0 for windows . I am programming in java with JAWS api to access wordnet database . I am trying to get the sister terms I could see this on wordnet 3.1 online version to a particular word but I could not get that . Is there any way to retrieve those sister terms with the current version of api I am using Please help me . Thanks in advance .",
"Question : I use Java API for wordnet searching JAWS for accessing wordnet from java . When i got to read a few papers about semantic similarity with java they expect me to find the distance between two synsets is a relationship is used in building the hierarchy . There is no specific method to find the distance between words in JAWS . Please tell me if there exists some method in java that gives the distance between two words .. . .. . Is there a built-in method that performs this function .. . Answer : you can use rita wordnet for that : http : rednoise.org rita reference RiWordNet getDistance Comment : rednoise.org rita reference RiWordNet getDistance http : rednoise.org rita reference RiWordNet getDistance",
"Question : I am using JAWS http : lyle.smu.edu tspell jaws index.html Java API for WordNet Searching and have set up the wordnet dictionary with VM Arguments in eclipse . I downloaded the jaws-bin.jar file and placed it in my project directory C : Users My-pc Projects MyApp src . After this I ran the code successfully using : .. . .. . Now when I import the package edu.smu.tspell.wordnet . it is giving the error The import edu cannot be resolved . I followed the set-up guide closely but can t figure out what is wrong . Can anyone please help me in resolving this . Thanks . .. . Answer : Got it right by downloading the source files from here http : lyle.smu.edu tspell jaws jaws-src.zip and placing it in my project .",
"Question : I am trying to access the top most object in the WordNet hierarchy . Example : Tiger must return Animal similarly for other things like car - automobile .. . .. . I am using JAWS api for access to WordNet via JAVA . 1 How to do it 2 Is there a general tutorial on various things we can do on WordNet via JAVA JAWS .. . Answer : This page http : lyle.smu.edu tspell jaws index.html contains most of the necessary information and there is a number of recipes for different tasks available online . You should at least try something before asking questions no",
"Question : null .. . Answer : I ve searched for java library for wordnet similarity and also found some questions like this http : stackoverflow.com questions 5976537 wordnet-similarity-in-java-jaws-jwnl-or-java-wnsimilarity and this http : stackoverflow.com questions 11217499 jaws-wordnet-similarity . I have done all of instructions mentioned in those questions but still when I use below code JWS isn t recognized . enter image description here http : i.stack.imgur.com RJFYM.png .. . .. . How can I solve it Thanks",
"Question : I need to use Wordnet in a java-based app . I want to : .. . .. . search synsets .. . .. . find similarity relatedness between synsets .. . .. . My app uses RDF graphs and I know there are SPARQL endpoints with Wordnet but I guess it s better to have a local copy of the dataset as it s not too big . I ve found the following jars : .. . .. . General library - JAWS http : lyle.smu.edu tspell jaws index.html .. . General library - JWNL http : sourceforge.net projects jwordnet .. . Similarity library Perl - Wordnet : : similarity http : wn-similarity.sourceforge.net .. . Java version of Wordnet : : similarity http : www.cogs.susx.ac.uk users drh21 beta .. . .. . What would you recommend for my app Is it possible to use a Perl library from a java app via some bindings Thanks Mulone .. . Answer : I am not sure if either JAWS or JWNL provide methods to calculate similarity between synsets but I have tried both for searching synsets and I ve found JAWS easier to use . Specifically the simple : .. . .. . was easier for me to understand than JWNL s file properties.xml requirement .",
"Question : I need to use Wordnet in a java-based app . I want to : .. . .. . search synsets .. . .. . find similarity relatedness between synsets .. . .. . My app uses RDF graphs and I know there are SPARQL endpoints with Wordnet but I guess it s better to have a local copy of the dataset as it s not too big . I ve found the following jars : .. . .. . General library - JAWS http : lyle.smu.edu tspell jaws index.html .. . General library - JWNL http : sourceforge.net projects jwordnet .. . Similarity library Perl - Wordnet : : similarity http : wn-similarity.sourceforge.net .. . Java version of Wordnet : : similarity http : www.cogs.susx.ac.uk users drh21 beta .. . .. . What would you recommend for my app Is it possible to use a Perl library from a java app via some bindings Thanks Mulone .. . Answer : There is function in JAWS to find similar wordForms Here are details : .. . .. . public AdjectiveSynset getSimilar throws WordNetException and here is link that you can check out : http : lyle.smu.edu tspell jaws doc edu smu tspell wordnet AdjectiveSynset.html this link it contails details that you can use .",
"Question : I get the error as Error opening index file : C : ProgramFiles WordNet 2.1 dict index.sense . Does this JAWS work for windows wats wrong with index.sense file Comment : In which directory you installed the JAWS api Comment : BTW look at this tutorial : - lyle.smu.edu tspell jaws http : lyle.smu.edu tspell jaws Comment : I ve tried JAWS under UNIX systems and it runs smoothly and the same example works good under OSX and it should in every UNIX-like system . I think that s a problem with compatibility under Windows . .. . Answer : I also faced the same problem in windows . I changed the path of the dict to C : Program Files x86 WordNet dict and did the same in System.setProperty as follows : .. . .. . System.setProperty wordnet.database.dir C : Program Files x86 WordNet dict .. . .. . And it worked .",
"Question : null .. . Answer : I m working in Java using WordNet through JAWS . My requirement is to get the most appropriate synset for a word . For this I have done almost everything I think ...having found out lexical file no the offset sense key lexical id synset pointer based on the id and finally the synset through synset factory . Still the result includes all the synsets for a given synset type What am I missing There is a sense file in dict folder of WordNet but what can be done with it how Any help would really be appreciated as I m under a time constraint . Comment : Since the sense key offset are known how can I retrieve the exact synset Can it be done using JAWS otherwise what would be the point of including methods to get these values anyway How can I make use of the sense file included in wordnet",
"Question : I use Java API for wordnet searching JAWS for accessing wordnet from java . When i got to read a few papers about semantic similarity with java they expect me to find the distance between two synsets is a relationship is used in building the hierarchy . There is no specific method to find the distance between words in JAWS . Please tell me if there exists some method in java that gives the distance between two words .. . .. . Is there a built-in method that performs this function .. . Answer : It seems there isn t using only JAWS but this answer http : stackoverflow.com a 6394708 331719 gives a solution . Comment : Thanks . But it gives the similarity between two words . I just want the distance between the two terms Comment : Technically a similarity measure is a distance measure : the smaller the similarity the larger the distance between the two words . If you mean by distance the number of edges to a common root then you will have to count them . The similarity measure Wu Palmer 1994 that is available in the linked API does just that : you could check its source code or just use the similarity it gives as a measure of your distance .",
"Question : I use JAWS for normal wordnet to find similarity between words . I installed wordnet 2.1 and I added the jar file : edu.mit.jwi 2.1.4.jar and edu.sussex.nlp.jws.beta.11.jar and I copier the WordNet-2.1-InfoContent in D : Program Files WordNet 2.1 but i have this problem when i run my application .. . .. . please help and thank you . Comment : Which user are you running your program as Check that this user has permissions to read the file D : Program Files WordNet 2.1 WordNet-InfoContent-2.1 . .. . Answer : I am not sure if JAWS can be used to measure similarity between the words .",
"Question : I am using JAWS http : lyle.smu.edu tspell jaws index.html Java API for WordNet Searching and have set up the wordnet dictionary with VM Arguments in eclipse . I downloaded the jaws-bin.jar file and placed it in my project directory C : Users My-pc Projects MyApp src . After this I am trying to set up the classpath using the method provided in the link : .. . .. . But I am getting this error : Could not find or load main class MyAppName . As a result I can t import edu.smu.tspell.wordnet . and continue my work . Can anyone help me out in resolving this problem . Thanks . P.S The class MyAppName contains this function : Comment : Yeah that s the method in class MyAppName . I have named the class MyAppName for trying the tutorial . .. . Answer : Just solved it . Was browsing in src folder of code instead of bin folder where .class files are placed . Though the import issue was resolved by this http : stackoverflow.com a 23643466 2852045 .",
"Question : I am searching for a way to find all the synonyms of a particular word using wordnet . I am using JAWS . For example : .. . .. . love v : admire adulate be attached to be captivated by be crazy about be enamored of be enchanted by be fascinated with be fond of be in love with canonize care for cherish choose deify delight in dote on esteem exalt fall for fancy glorify go for gone on... . .. . .. . love n : Synonym : adulation affection allegiance amity amorousness amour appreciation ardency ardor attachment case cherishing crush delight devotedness devotion emotion enchantment enjoyment fervor fidelity flame fondness friendship hankering idolatry inclination infatuation involvement .. . .. . In a related question http : stackoverflow.com questions 13745631 trying-to-find-synonyms-using-wordnet-java-api user Ram has pointed to some code but that does not suffice as it just gives a vastly different output : .. . .. . love passion : any object of warm affection or devotion beloved dear dearest honey love : a beloved person used as terms of endearment love sexual love erotic love : a deep feeling of sexual desire and attraction love : a score of zero in tennis or squash sexual love lovemaking making love love love life : sexual activities often including sexual intercourse between two people love : have a great affection or liking for .. . .. . So how do I achieve it and is wordnet suited for what I want to do .. . Answer : How about using RitaWN instead of JAWS I see it is listed as one of the available API in http : wordnet.princeton.edu wordnet related-projects Java I also see it has getAllSynonyms method they provide an example and it works . Check this out : .. . .. . Make sure to get the latest downloads and documentation from http : www.rednoise.org rita wordnet-old documentation index.htm",
"Question : null .. . Answer : I m trying to use JAWS Api for Wordnet and i want to do a test with this code : .. . .. . But when i compile using : javac -cp jaws.jar Wordnettest.java My Wordnettest.class is here but when i launch it with : java Wordnettest I have this : .. . .. . I don t understand why because i set the dic with setProperty.. . .. . .. . Could you help me Thanks Comment : This is my answer to similiar question which will help you stackoverflow.com questions 24057041 http : stackoverflow.com questions 24057041 unable-to-load-java-class-from-w3c 24057478 24057478 You need to add that class into classPath.I guess Wordnet is some external library If you have jar simply add it corrctly to class path.Easy way is to let IDE do it for you . Comment : Thanks for answer The problem is Wordnet Dict is not a jar. . It s a database I don t really understand their doc. . lyle.smu.edu tspell jaws index.html http : lyle.smu.edu tspell jaws index.html I precise i m on Ubuntu. . There is no explanation for linux : Comment : Im not sure if im looking at a corect lib lyle.smu.edu tspell jaws http : lyle.smu.edu tspell jaws bottom of the page shows code that you have here you can downlaod docs src bin . . also jar file.What ide are you using Exception that you posted here is showing that you have problem with class its not in classPath . . there isnt any other problem visible here . Comment : Yeah i use their demo code for testing the compilation. . I have already the jar files but i m trying to execute with : java -classpath jaws.jar -Dwordnet.database.dir WordNet-3.0 dict Wordnettest And it didn t work too. . Comment : Maybe problem with paths incorrect locations -I doubt that command differs on linux windows.Bud i have no experience with linux.If i woud be you i woud just download theyr lib take source code recompile in ide.Less error prone .",
"Question : I am searching for a way to find all the synonyms of a particular word using wordnet . I am using JAWS . For example : .. . .. . love v : admire adulate be attached to be captivated by be crazy about be enamored of be enchanted by be fascinated with be fond of be in love with canonize care for cherish choose deify delight in dote on esteem exalt fall for fancy glorify go for gone on... . .. . .. . love n : Synonym : adulation affection allegiance amity amorousness amour appreciation ardency ardor attachment case cherishing crush delight devotedness devotion emotion enchantment enjoyment fervor fidelity flame fondness friendship hankering idolatry inclination infatuation involvement .. . .. . In a related question http : stackoverflow.com questions 13745631 trying-to-find-synonyms-using-wordnet-java-api user Ram has pointed to some code but that does not suffice as it just gives a vastly different output : .. . .. . love passion : any object of warm affection or devotion beloved dear dearest honey love : a beloved person used as terms of endearment love sexual love erotic love : a deep feeling of sexual desire and attraction love : a score of zero in tennis or squash sexual love lovemaking making love love love life : sexual activities often including sexual intercourse between two people love : have a great affection or liking for .. . .. . So how do I achieve it and is wordnet suited for what I want to do .. . Answer : What do you mean by synonym In WordNet you have similar words representing the same concept under this term call the Synset . To get synonyms in the coverage of your example you would require more than wordnet possibly some semantic similarity methods to extract the other words . I couldn t give you a JAWS explanation of what i mean above but from WordNet in NLTK interface for python . You can see that WN is insufficient for the coverage you want . Code above outputs : Comment : definition and lemma names may need bracket I think Comment : yes the new NLTK versions need brackets .",
"Question : I need to use Wordnet in a java-based app . I want to : .. . .. . search synsets .. . .. . find similarity relatedness between synsets .. . .. . My app uses RDF graphs and I know there are SPARQL endpoints with Wordnet but I guess it s better to have a local copy of the dataset as it s not too big . I ve found the following jars : .. . .. . General library - JAWS http : lyle.smu.edu tspell jaws index.html .. . General library - JWNL http : sourceforge.net projects jwordnet .. . Similarity library Perl - Wordnet : : similarity http : wn-similarity.sourceforge.net .. . Java version of Wordnet : : similarity http : www.cogs.susx.ac.uk users drh21 beta .. . .. . What would you recommend for my app Is it possible to use a Perl library from a java app via some bindings Thanks Mulone .. . Answer : I use JAWS for normal wordnet stuff because it s easy to use . For similarity metrics though I use the library located here http : code.google.com p xssm source browse trunk XMLSchemaMSM lib edu.sussex.nlp.jws.beta.11.jar r 140 . You ll also need to download this http : code.google.com p xssm source browse trunk commons-lib WordNet r 151 WordNet 3.0 folder containing pre-processed WordNet and corpus data for it to work . The code can be used like this assuming you placed that folder in another called lib in your project folder : .. . .. . This will print something like the following showing the similarity score between each possible combination of synsets represented by the words to be compared : .. . .. . There are also methods that allow you to specify which sense of either both words : res String word1 int senseNum1 String word2 partOfSpeech etc . Unfortunately the source documentation is not JavaDoc so you ll need to inspect it manually . The source can be downloaded here http : www.sussex.ac.uk Users drh21 . The available algorithms are : .. . .. . Also it requires you to have the jar file for MIT s JWI http : projects.csail.mit.edu jwi Comment : One item of note . I would get beta 11.01 instead of 11.02 if you get the package from cogs.susx.ac.uk users drh21 http : www.cogs.susx.ac.uk users drh21 . Comment : @mj : why 11.01 and not 11.02 Comment : Does the code above gives the similarity between the different synsets Comment : @Noor I edited the answer to give you the needed information . Comment : thanks a lot for this",
"Question : i am using JAWS-Java API for wordnet searching.i have been searching alot but unable to find how to count the number of senses the given word can have.Is there any function for it And after finding how the monosemous words can be tagged . Comment : what do mean tagged .. . Answer : If a word belongs-to only one synset it has only one meaning - monosemy . JAWS Code snippet : .. . .. . PS : monosemous is a monosemous word . Comment : Thank you for your help . do you know anything about scoring function used in iterative word sense disambiguation.i wanted to know how the monosemous word found by above method can be used to disambiguate the remaining words in the sentence in increasing order of their degree of polysemy . Comment : TLDR frame that in proper question example . I m sure somebody will be a help .",
"Question : I am using WordNet 2.1 tool and accessing it pro-grammatically via JAWS Java API for WordNet Searching . Today I came across this new thing called WordNet Domains which has assigned DOMAIN labels to each word in WordNet . link : - http : wndomains.fbk.eu labels.html .. . .. . I have downloaded the same from above link . Its a zip file . My question is : - How do I use WordNet Domains along with WordNet in Java Comment : My answer is : - Read the README Comment : Yes Qnan I have read it . Specifically this is what I want - wn-domains-3.2-20070223 contains the mapping between Princeton WordNet 2.0 synsets and their corresponding domains . But they have not mentioned how to integrate this file into the wordnet database or is it that I have to programatically call this along with wordnet dict Can you clear my doubt . Comment : Is it a way to integrate them somehow at all Comment : This question s answer http : stackoverflow.com questions 13881425 get-wordnets-domain-name-for-the-specified-word 13919227 13919227 shows how to do it in Python . You could try something similar in Java . Comment : Please post your current code edited down to the vital information plus your stacktrace . .. . Answer : Since you are using java you can load the labels as a HashMap String List String . From personal experience I would say instead of using Domain Labels you can use values for the domains : Extended WordNet Domains project http : adimen.si.ehu.es web XWND on WordNet 3.0 .",
"Question : I am using WordNet 2.1 tool and accessing it pro-grammatically via JAWS Java API for WordNet Searching . Today I came across this new thing called WordNet Domains which has assigned DOMAIN labels to each word in WordNet . link : - http : wndomains.fbk.eu labels.html .. . .. . I have downloaded the same from above link . Its a zip file . My question is : - How do I use WordNet Domains along with WordNet in Java Comment : My answer is : - Read the README Comment : Yes Qnan I have read it . Specifically this is what I want - wn-domains-3.2-20070223 contains the mapping between Princeton WordNet 2.0 synsets and their corresponding domains . But they have not mentioned how to integrate this file into the wordnet database or is it that I have to programatically call this along with wordnet dict Can you clear my doubt . Comment : Is it a way to integrate them somehow at all Comment : This question s answer http : stackoverflow.com questions 13881425 get-wordnets-domain-name-for-the-specified-word 13919227 13919227 shows how to do it in Python . You could try something similar in Java . Comment : Please post your current code edited down to the vital information plus your stacktrace . .. . Answer : Th answer is : The WNDomains project comes with a doc file that supplies the wordID and word domain . This wordID is the wordnet 2.1 wordID . So in java you can write a program thats maps the corresponding ID by mapping reading doc file line by line",
"Question : I use JAWS for normal wordnet to find similarity between words . I installed wordnet 2.1 and I added the jar file : edu.mit.jwi 2.1.4.jar and edu.sussex.nlp.jws.beta.11.jar and I copier the WordNet-2.1-InfoContent in D : Program Files WordNet 2.1 but i have this problem when i run my application .. . .. . please help and thank you . Comment : Which user are you running your program as Check that this user has permissions to read the file D : Program Files WordNet 2.1 WordNet-InfoContent-2.1 . .. . Answer : Download wordnet from http : wordnet.princeton.edu wordnet download current-version .. . .. . Put it s contents in this directory : C : Program Files WordNet 2.1 .. . .. . Added the jar file : edu.mit.jwi 2.1.4.jar and edu.sussex.nlp.jws.beta.11.jar . Downloaded this file http : www.d.umn.edu tpederse Data WordNet-InfoContent-2.1.tar.gz .. . .. . Extract it and copy into C : Program Files WordNet 2.1 ie inside 2.1 folder"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
database
|
UNK_RELATION
|
slimframework@web-applications@97
|
slimframework -- slim is a php micro framework that helps you quickly write simple yet powerful @placeholder and apis .
|
{
"confidence": [
21.82755470275879,
16.487855911254883,
16.322546005249023,
16.072507858276367,
16.072507858276367,
14.659829139709473
],
"content": [
"I have a folder structure like this : .. . .. . app .. . .. . - db users.php .. . .. . Slim .. . .. . vendor .. . .. . index.php .. . .. . and inside the index.php : .. . .. . My purpose is to get an integer value returned If i use the following path into the browser : .. . .. . But seems the way i write the routing of passing parameter is mistaken .",
"Notice : this is a bad structur it would be better when you define a function or class for this it could be like this : .. . .. . functions.php .. . .. . index.php or route file .. . .. . Then you wouldn t need the file-get-contents .",
"You are trying to get a file with the name users.php action get type seller props totalnumber which doesn t exist in the file : protocol when you really what to do this you need to extra specify the http or https protocol like this : .. . .. . and it will succeed .",
"You need to give us the contents of app db users.php .. . On a side note this is terrible design .",
"Your dependency should be a class then you can simply ask for an output from the class and jsonify it .",
"I got a warning of .. . .. . How could i fix it"
]
}
|
{
"confidence": [
23.931766510009766
],
"content": [
"Question : I have a folder structure like this : .. . .. . app .. . .. . - db users.php .. . .. . Slim .. . .. . vendor .. . .. . index.php .. . .. . and inside the index.php : .. . .. . My purpose is to get an integer value returned If i use the following path into the browser : .. . .. . But seems the way i write the routing of passing parameter is mistaken . I got a warning of .. . .. . How could i fix it Comment : You need to give us the contents of app db users.php .. . On a side note this is terrible design . Your dependency should be a class then you can simply ask for an output from the class and jsonify it . .. . Answer : You are trying to get a file with the name users.php action get type seller props totalnumber which doesn t exist in the file : protocol when you really what to do this you need to extra specify the http or https protocol like this : .. . .. . and it will succeed . Notice : this is a bad structur it would be better when you define a function or class for this it could be like this : .. . .. . functions.php .. . .. . index.php or route file .. . .. . Then you wouldn t need the file-get-contents ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
web-applications
|
UNK_RELATION
|
triplestore@triplestore@167
|
triplestore -- a triplestore is a purpose-built database for the storage and retrieval of resource description framework rdf metadata -- http : en.wikipedia.org wiki @placeholder .
|
{
"confidence": [
57.851036071777344,
44.38618469238281,
41.41705322265625,
41.41705322265625,
40.37358093261719,
39.76011657714844,
38.716644287109375,
38.716644287109375,
36.395633697509766,
35.35215759277344,
34.9686279296875,
34.81291961669922,
34.101524353027344,
34.101524353027344,
33.717994689941406,
33.43659973144531,
33.11682891845703,
32.347660064697266,
32.226287841796875,
31.863693237304688,
31.863693237304688,
31.863693237304688,
31.151182174682617,
31.151182174682617,
30.882518768310547,
30.82021713256836,
29.860265731811523,
28.473604202270508,
27.186420440673828,
26.946548461914062,
26.048076629638672,
25.983463287353516,
25.983463287353516,
25.437463760375977,
24.93998908996582,
24.93998908996582,
24.671829223632812,
24.63727569580078,
24.505268096923828,
24.261611938476562,
24.096508026123047,
23.959959030151367,
23.896743774414062,
23.472381591796875,
23.215946197509766,
23.14851188659668,
23.024860382080078,
22.970321655273438,
22.532438278198242,
22.45779800415039,
22.17380142211914,
22.084062576293945,
22.032285690307617,
21.799345016479492,
21.779376983642578,
21.6950626373291,
21.632667541503906,
21.62537956237793,
21.567180633544922,
21.56011390686035,
21.56011390686035,
21.56011390686035,
21.378032684326172,
20.957393646240234,
20.94199562072754,
20.887760162353516,
20.887760162353516,
20.887760162353516,
20.877975463867188,
20.782869338989258,
20.731338500976562,
20.4874210357666,
20.309480667114258,
20.309480667114258,
20.309480667114258,
20.2834415435791,
20.120437622070312,
20.011871337890625,
19.984783172607422,
19.984783172607422,
19.984783172607422,
19.984783172607422,
19.984783172607422,
19.984783172607422,
19.87969207763672,
19.805126190185547,
19.805126190185547,
19.805126190185547,
19.805126190185547,
19.805126190185547,
19.805126190185547,
19.805126190185547,
19.805126190185547,
19.789955139160156,
19.730480194091797,
19.730480194091797,
19.637126922607422,
19.577932357788086,
19.47994613647461
],
"content": [
"There is also a pretty good list of triple stores here : en.wikipedia.org wiki Triplestore http : en.wikipedia.org wiki Triplestore",
"So is it possible to create one for triplestore database",
"How do I store null values in a triplestore database",
"You can convert an arbitrary sql database to a triplestore on this basis .",
"We would like to migrate our project on a triplestore database such as OpenRDF Sesame .",
"Assuming your Triplestore is populated with the correct statements then try -",
"I think this depends a bit on the triplestore that you are using .",
"I have a Sesame triplestore with an ontology imported in it .",
"In my triplestore there should be no case where something linked is used by another point .",
"I send queries to a Sesame triplestore and render the results on a webpage .",
"Now for educational purposes I want to substitute the relational db with a pure triplestore database but I m not sure about the procedure to follow .",
"As OWL files are RDF any RDF triplestore will do for storing them - though not every triple store will support OWL reasoning but then again you might not even need that .",
"I had sesame triplestore installed on my computer and it was working fine .",
"I am trying to access FactForge from Sesame triplestore .",
"Which I guess means that I should be using either a triplestore or a graph database such as Neo4j",
"Additionally should a triplestore be allowed to store twice the same triple within the same context",
"However when I try to imagine this going on in a triplestore database I can t figure out how this would be happening without ending up with very fragmented storage of the data .",
"I can t give you a full list of features for either tool but I reckon that an important difference for your use-case given what little you ve told us is that wile 4Store is an RDF database implementation or triplestore Sesame is a framework API for handling RDF in Java giving access to multiple triplestore implementations including some of its own but also many third-party products .",
"RDF Resource Description Framework is a conceptual data model which can be rendered physically serialized using various formats such N3 Turtle RDF XML etc .",
"I have a question about the deletion of elements from a triplestore in my case a Virtuoso using SPARQL .",
"I m new to Jena and triplestore when I deployed my application in tomcat 7 I m getting the following exception .",
"Alternatively how would you keep track of revision while using a context-aware triplestore",
"Also I highly recommend looking at D2RQ http : d2rq.org which accesses data in your existing relational store through a triplestore overlay .",
"Have a look at this page http : answers.semanticweb.com questions 397 what-are-specific-triplestore-strengths-and-weaknesses for an overview of some of the strengths and weaknesses of the various offerings .",
"I already used the search and all results tell me that it s not possible to import Freebase into any triplestore without usage of 3rd Party Tools like BaseKB http : basekb.com or Freebase to RDF https : github.com castagna freebase2rdf .. . .. . As I can see the dump is already available as RDF so where is the problem if I want to import the dump into my 4store triplestore and access the data via SPARQL",
"But what types of use cases would lead one to choose a triplestore over a property graph",
"If you re not worried about reasoning then you can drop it into any triplestore out there access it via Sesame http : openrdf.org or Jena http : jena.sourceforge.com if you re using Java and still be able to query the explicit facts via SPARQL http : www.w3.org TR rdf-sparql-query .",
"RDF Store Benchmarking http : www.w3.org wiki RdfStoreBenchmarking",
"RDF has no built-in concept of such kind .",
"The semantic-web is built using this concept RDF .",
"RDFS RDF Schema is a general-purpose language for representing simple RDF vocabularies on the Web .",
"I am trying to add triples in triplestore 4store with .. . .. . but I am getting this error .. . .. . I searched and found it is related to ipv6 problem but could not find proper solution for the same",
"So which triplestore API you pick depends on your requirements in terms of things like ease of use scalability reasoning support required and just generally which one you think looks cool .",
"RDF Repository http : i.stack.imgur.com 07fFv.png",
"To fetch all the triples of a named graph in my triplestore openlink virtuoso I have wrote the SPARQL query : .. . .. . But it seems I can t define the graph URI in the GRAPH declaration the query doesn t return any triples .",
"If I try to access the triplestore from another computer say computer B using computer A s IP address I get this error : .. . .. . How can I resolve this issue",
"Does the related Modelling an equivalent of database NULL in RDF http : stackoverflow.com q 16873174 1281433 question help here",
"How Wikidata is represented in RDF and thus in SPARQL is described at MediaWiki.org page Wikibase Indexing RDF Dump Format https : www.mediawiki.org wiki Wikibase Indexing RDF Dump Format .",
"Using the W3C XML Validator http : validator.w3.org validate by input I get the following errors : .. . .. . Error Line 2 Column 8 : Namespace prefix rdf on RDF is not defined rdf : RDF .. . .. . Error Line 3 Column 19 : Namespace prefix rdf on Description is not defined .. . rdf : Description .. . .. . Error Line 4 Column 57 : Namespace prefix rdf on subject is not defined rdf : subject resource http : www.w3.org Home Lassila .. . .. . Error Line 5 Column 66 : Namespace prefix rdf on predicate is not defined .. . rdf : predicate resource http : description.org schema Creator .. . .. . Error Line 6 Column 14 : Namespace prefix rdf on object is not defined .. . rdf : object Ora Lassila rdf : object .. . .. . Error Line 7 Column 76 : Namespace prefix rdf on type is not defined .. . rdf : type resource http : www.w3.org 1999 02 22-rdf-syntax-ns Statement .. . .. . Error Line 8 Column 18 : Namespace prefix a on attributedTo is not defined .. . a : attributedTo Ralph Swick .. . .. . Similarly using the W3C RDF XML Validator http : www.w3.org RDF Validator I get the following error : .. . .. . FatalError : The prefix rdf for element rdf : RDF is not bound .",
"Neo4j http : neo4j.org or RDF triple stores e.g .",
"See this guide to the bulk loader http : virtuoso.openlinksw.com dataspace doc dav wiki Main VirtBulkRDFLoader and this page of RDF loading methods http : virtuoso.openlinksw.com dataspace doc dav wiki Main VirtRDFInsert .",
"It s somewhat more complex than that but it s described in this whitepaper : http : 4store.org publications harris-ssws09.pdf .. . .. . There s a number of indexes 2 are tables of 4 elements indexed by a Patricia Trie the quadstore part one is an index from graph IDs to lists of triples the triplestore part .",
"possible duplicate of import of rdf data in 4store http : stackoverflow.com questions 30658547 import-of-rdf-data-in-4store",
"You can play around with the RDF Validator http : www.w3.org RDF Validator to see what RDF triples result from a piece of RDF XML .",
"Considering the below conceptual triples : .. . .. . .. . Elephant is a pachyderm .. . Eagle is a bird .. . Monkey is a mammel .. . .. . .. . ...and the following conceptual inferences : .. . .. . .. . pachyderm is a animal .. . bird is a animal .. . mammel is a animal .. . .. . .. . From what I can guess in order to identify each of Elephant Eagle and Monkey as animal s then we have to run the triplestore through a Reasoner https : en.wikipedia.org wiki Semantic reasoner .",
"RDF is a concept .. . .. . RDF is a concept or a way of describing things .",
"A good news for freebase dump users is that Freebase now offer RDF dump now : http : wiki.freebase.com wiki Data dumps .",
"fyi people sometimes refer to a database that is implementing the property graph model as a property graph which is different than a triplestore containing RDF triples because in a triple store essentially all verbs are edges whereas the property graph has the distinction between attributes that identify an entity properties and attributes that identify a relationship between entities an edge .",
"RDF can be divided into separate graphs of triples analogous to tables in a database .",
"RDF is a concept .",
"I ve been reading about semantic-web technologies such as RDF and OWL and am intrigued about the possibilities of building an RDF triple-store semantic database on top of my existing relational DBs .",
"Some popular open-source choices for RDF storage querying are OpenRDF Sesame Apache Jena OpenLink Virtuoso Redland 4store and dotNetRdf .",
"However most rdf stores are actually quad stores sets of rdf graphs also known as datasets and in that case the triple may appear multiple times .",
"In RDF you ll tend to identify things by URI in neo4j it s a database object that gets a database ID automatically .",
"Moreover Freebase allows you to export data in RDF so you could potentially use that data directly in an RDF database and query it with SPARQL .",
"Sesame is a quadstore framework which comes with a few built-in database types in-memory and native but of course numerous third-party Sesame-compatible RDF databases exist that each have their own performance characteristics .",
"RDF defines the abstract model of subject- predicate- object and advocates that non-proprietary standards are used for their exchange and description .",
"http : stackoverflow.com questions 1740341 what-is-the-difference-between-rdf-and-owl",
"So to speed up the query you can filter some of the triples based on the named graph : .. . .. . I have found that this approach speeds up the query although as I mentioned before it is triplestore dependent as I have only played with a number of triplestores .",
"RDF and RDFS is not interchangeable .",
"RDF is also a NAME of a vocabulary .",
"RDF XML is hard to work with .",
"RDF is a language for expressing factual claims organized and grouped into graphs .",
"RDF and triple stores are mostly built for the kinds of architectural challenges you d run into with the semantic-web .",
"http : 4store.org trac wiki SparqlServer",
"This is not how RDF S ontologies work .",
"RDF RDFS and ontology are not interchangeable terms .",
"RDF is a way of modelling your data .",
"In particular see 13.1 Examples of RDF Datasets http : www.w3.org TR sparql11-query exampleDatasets which mentions that : .. . .. . The definition of RDF Dataset does not restrict the relationships of named and default graphs .",
"PREFIX rdfs : https : www.w3.org 2000 01 rdf-schema .. . http : yourdomain.com Teacher rdfs : subClassOf http : yourdomain.com Person .. . .. . .. . So RDF has terms for creating instances RDFS has terms for creating classes .",
"I resorted to using Pubby directly since the jena framework is fast enough to handle the rdf about 1.2 GB",
"Note : Some RDF terms are defined using RDFS terms and some RDFS terms are defined using RDF terms .",
"Same situation with RDF .",
"SPARQL queries RDF triples .",
"So this is a snippet of the rdf file .",
"They define concepts important for their application using one of the OWL2 profiles http : www.w3.org TR owl2-profiles and then use a reasoner http : en.wikipedia.org wiki Reasoner to infer new knowledge based on their ontology .",
"However there is a fundamental difference between RDF and neo4j maybe other non-RDF graphs too in that in RDF you have directed graphs .",
"It is in turtle format so it is very convenient to use any graph database designed for RDF .",
"The RDF dump has been improving over time .",
"Is there a problem with the turtle syntax of the Freebase RDF in common",
"RDF in general is a method of conceptual data modelling .",
"So in essence RDFS is a semantic extension of RDF .",
"RDF is a standard vocabulary that provides a set of terms .",
"OWL terms are defined using RDF and RDFS terms .",
"In RDF it would be something like this : .. . .. . In a graph database like neo4j it would be this : .. . .. . Notice that in RDF it s 3 relationships but only one of those relationships actually expresses semantics between two entities .",
"could you provide a small sample new1.rdf that shows this behavior",
"I am having a problem with my Virtuoso RDF Store .",
"What is the preferred method for mapping these into triples RDF in MarkLogic 8",
"But are you sure that s it s OWL XML and not RDF XML",
"Yeah the file was OWL XML but now I changed it to RDF XML .",
"Do you know the base concept of triples in RDF knowledge bases",
"I need to store RDF triples while keeping track of modifications .",
"Is that available in the RDF view of the data and if so how can it be queried using SPARQL",
".. . .. . Can Blazegraph store 4-column Quad data natively or am I mis-understanding the nature of RDF Triple Quad storage",
"that I can import ttl or rdf file then query0 .. . .. . but now I want to connect the remote neo4j .",
"An RDF triple store is a set of triples so the same triple cannot be present twice by definition .",
"Turtle is often preferred by the rdf community .",
"Metadata such as the original source of the triple possible strength of connection information etcetera .",
"See answer stackoverflow.com questions 1740341 http : stackoverflow.com questions 1740341 what-is-the-difference-between-rdf-and-owl 16004706 16004706"
]
}
|
{
"confidence": [
71.79293823242188,
55.403953552246094,
54.71963882446289,
50.71377944946289,
50.39393997192383,
50.145870208740234,
50.013763427734375,
48.996116638183594,
48.05035400390625,
47.37598419189453,
45.627254486083984,
45.547264099121094,
45.37158966064453,
43.7335205078125,
43.61661148071289,
43.517913818359375,
43.23207092285156,
42.63923263549805,
42.258113861083984,
41.82786560058594
],
"content": [
"Question : I m new with triple stores and I need a good recommendation for an open-source triple store where I can store OWL files . Does someone have some recommendations for me Thank you a lot Bests M .. . Answer : As OWL files are RDF any RDF triplestore will do for storing them - though not every triple store will support OWL reasoning but then again you might not even need that . Some popular open-source choices for RDF storage querying are OpenRDF Sesame Apache Jena OpenLink Virtuoso Redland 4store and dotNetRdf . It s probably worth pointing out that several of these e.g . Sesame Jena dotNetRdf are storage-neutral APIs which means that several other open-source commercial triplestores can be accessed via them . So which triplestore API you pick depends on your requirements in terms of things like ease of use scalability reasoning support required and just generally which one you think looks cool . Have a look at this page http : answers.semanticweb.com questions 397 what-are-specific-triplestore-strengths-and-weaknesses for an overview of some of the strengths and weaknesses of the various offerings . Comment : I d also add that you have the option of using a dedicated OWL reasoner such as Pellet or HermiT . These won t provide persistent-storage and won t scale to the same level a database will but they ll probably give you the best performance for reasoning and are your only options if you need DL reasoning . There is also a pretty good list of triple stores here : en.wikipedia.org wiki Triplestore http : en.wikipedia.org wiki Triplestore",
"Question : null .. . Answer : I see that SPARQL and RDF are all about standards which is cool . But what types of use cases would lead one to choose a triplestore over a property graph Comment : what s a property graph as in Property Graph Model https : github.com tinkerpop blueprints wiki Property-Graph-Model Based on the definition at the end of that document I d say that they re about the same except that if your edges end up having lots of properties you ve essentially got reified triples or n-ary relations . Comment : yes thats exactly what I meant . fyi people sometimes refer to a database that is implementing the property graph model as a property graph which is different than a triplestore containing RDF triples because in a triple store essentially all verbs are edges whereas the property graph has the distinction between attributes that identify an entity properties and attributes that identify a relationship between entities an edge . property graph enthusiasts tout its strengths in network-analysis and all of the popular algorithms that go along with it . Comment : Interesting question but it seems to me that this is rather too broad not to mention likely to attract subjective opinionated answers for StackOverflow . Comment : fwiw property graphs are easily represented in RDF so you can use a triple store as the backend and use either model you want",
"Question : null .. . Answer : With a relational-database I can roughly visualise in my mind how the data on tables would be stored referenced and updated . However when I try to imagine this going on in a triplestore database I can t figure out how this would be happening without ending up with very fragmented storage of the data . Considering the below conceptual triples : .. . .. . .. . Elephant is a pachyderm .. . Eagle is a bird .. . Monkey is a mammel .. . .. . .. . ...and the following conceptual inferences : .. . .. . .. . pachyderm is a animal .. . bird is a animal .. . mammel is a animal .. . .. . .. . From what I can guess in order to identify each of Elephant Eagle and Monkey as animal s then we have to run the triplestore through a Reasoner https : en.wikipedia.org wiki Semantic reasoner . The way I m imagining it is as a cross between defragmenting a hard drive and performing a join in SQL to give : .. . .. . .. . Elephant is a pachyderm .. . Elephant is a animal .. . Eagle is a bird .. . Eagle is a animal .. . Monkey is a mammel .. . Monkey is a animal .. . .. . .. . If it s something along these lines then is a triplestore effectively some sort of massive normalised three field table that gets written out in full by the reasoner Comment : This is probably too broad for Stack Overflow . The short answer is yes a triple store s data is a massive three field table . Triple stores are typically going to efficiently index that in various ways to make query efficient . Reasoners might be built-in to a triple store or compatible with it but conceptually it s a distinct and optional thing . A triple store just needs to store triples . Comment : Oh isn t that an oversimplification . Granted some triplestores use a relational model under the hood but aren t there any that actually use a graph model Or something in between Comment : @TomaszPluskiewicz But conceptually what s the difference A graph of labelled edges is isomorphic to a set of triples source label destination . So yes a triple store is also a graph . But as far as the user is concerned the implementation doesn t really matter a triple store just has to be able to store triples . Comment : It s also important to note there s no reason that a reasoner needs to save the inferences ie materialize them they can all be computed on the fly at query time .",
"Question : How do I store null values in a triplestore database Should I use no triples for null values or use something like rdf : nil If I use no triples how do I query then for non existing triples Comment : Does the related Modelling an equivalent of database NULL in RDF http : stackoverflow.com q 16873174 1281433 question help here There are several answers and I think that question is a bit more comprehensive . .. . Answer : You can use the FILTER NOT EXISTS syntax to check for non-existence .. . .. . For example assuming you know the subject and predicate and want to check for a null value i.e . non-existence of the relevant triple you could do the following :",
"Question : I m currently planning a big project containing big data . I already used the search and all results tell me that it s not possible to import Freebase into any triplestore without usage of 3rd Party Tools like BaseKB http : basekb.com or Freebase to RDF https : github.com castagna freebase2rdf .. . .. . As I can see the dump is already available as RDF so where is the problem if I want to import the dump into my 4store triplestore and access the data via SPARQL Comment : Did you import the freebase data into triple store If yes how much time it took to complete the process and what is the machine configuration that you used . I am also planning to import the data . So please let me know the details . Thanks .. . Answer : For everybody having Problems importing the Freebase Dump : .. . .. . 1 Keep your RDF Turtle Parser updated . Latest Version of raptor 2 can recognize the . e.g . at ns : common.topic.notable for.example .. . .. . 2 The dump must be cleaned up before you can import it . I used this scipt : http : people.apache.org andy Freebase20121223 fixit .. . .. . 3 The Turtle specification only allows these characters for URIs : .. . .. . So it s very important to add this line to the fixit script at line 80 : .. . .. . As a result invalid syntax like this : .. . .. . becomes",
"Question : We have to work on a JPA-based project using Hibernate . For now it is running on the default H2 database with the default H2 dialect . We would like to migrate our project on a triplestore database such as OpenRDF Sesame . I was wondering if the best way is to find create a custom dialect for OpenRDF Possible Or if we have to stop using Hibernate I am quite new in Hibernate dialect but I saw some custom ones.. . So is it possible to create one for triplestore database Comment : FWIW we are currently investigating the possibility of a Sesame implementation for Hibernate OGM . Early days though . .. . Answer : You might try using Empire https : github.com mhgrove Empire which is an implementation of JPA for RDF SPARQL as opposed to RDBMS SQL . Empire is API agnostic so you can easily use any Sesame or Jena API compatible database with it which requires only changes to configuration . It should be pretty straightforward to implement support for other providers . It doesn t cover all of JPA there s some mismatch between parts which is currently omitted but the basics are covered . There are a few RDF specific annotations you d need to include to make an existing Hibernate implementation work but it should be an easy transition . I ve done a migration via Empire from an RDBMS to Sesame in the past including a step where I was persisting to both and it went quite well . disclaimer I m the author of Empire Comment : Nice project I didn t know it . I just had a meeting for this project and we won t store the whole data on Sesame . Is it possible to have a JPA project with 2 JPA data providers Comment : I did just that using the Play framework Sesame and mysql which worked out fine Play made it quite easy for me to make that happen but ymmv",
"Question : null .. . Answer : I am trying to add triples in triplestore 4store with .. . .. . but I am getting this error .. . .. . I searched and found it is related to ipv6 problem but could not find proper solution for the same Comment : could you provide a small sample new1.rdf that shows this behavior Comment : apparently you should stop 4s-httpd before the import . https : groups.google.com forum topic 4store-support 1soAFzqNy-0 Comment : possible duplicate of import of rdf data in 4store http : stackoverflow.com questions 30658547 import-of-rdf-data-in-4store",
"Question : I m currently planning a big project containing big data . I already used the search and all results tell me that it s not possible to import Freebase into any triplestore without usage of 3rd Party Tools like BaseKB http : basekb.com or Freebase to RDF https : github.com castagna freebase2rdf .. . .. . As I can see the dump is already available as RDF so where is the problem if I want to import the dump into my 4store triplestore and access the data via SPARQL Comment : Did you import the freebase data into triple store If yes how much time it took to complete the process and what is the machine configuration that you used . I am also planning to import the data . So please let me know the details . Thanks .. . Answer : The problem with freebase turtle dump is this they are not COMPLIANT with w3c turtle specification . 1 according to http : www.w3.org TR turtle sec-grammar character . can only appear at the end of the triple however freebase dump has lots of . before end of the triple . I read somewhere that is not allowed as well outside uri so they instead chose to use . latest raptor2 library can get around this . but not the older ones .. . .. . 2 I think the way emit blank node is also not valid for e.g . line 141567 ns : m.01000m1 ns : common.topic.notable for . Comment : 1 Update Raptor2",
"Question : I m currently planning a big project containing big data . I already used the search and all results tell me that it s not possible to import Freebase into any triplestore without usage of 3rd Party Tools like BaseKB http : basekb.com or Freebase to RDF https : github.com castagna freebase2rdf .. . .. . As I can see the dump is already available as RDF so where is the problem if I want to import the dump into my 4store triplestore and access the data via SPARQL Comment : Did you import the freebase data into triple store If yes how much time it took to complete the process and what is the machine configuration that you used . I am also planning to import the data . So please let me know the details . Thanks .. . Answer : You are probably getting search results from at least two if not three different data sets : .. . .. . 1 . the old quad format dump .. . 2 . the early RDF dumps .. . 3 . perhaps the current RDF dump .. . .. . The format in 1 is what required conversion . The early RDF dumps 2 were syntactically invalid so wouldn t import to most tools . The RDF dump has been improving over time . I m not sure whether it s still true that it won t import at all without preprocessing but regardless it ll almost be more useful if you pre-process it to remove redundancy normalize to the format that works best for your application etc . Did you try importing the current dump What were your results Comment : Thanks for your fast answer . Today I ordered a root server installed 4store DL Freebase Dump and splitted it by 10.000.000 triples for each file . Now I m getting an error while importing : URI file : root freebase xaa : 8 raptor error - syntax-error . Is there a problem with the turtle syntax of the Freebase RDF in common Comment : The first line causes a syntax-error : ns : american football.football historical roster position.number ns : type.property.expected type ns : type.int . Comment : I fixed it.. . After updating Raptor2 it works right now with the help of this nice fix : people.apache.org andy Freebase20121223 http : people.apache.org andy Freebase20121223",
"Question : I need to store RDF triples while keeping track of modifications . Is there anything out there for this service Alternatively how would you keep track of revision while using a context-aware triplestore Edit : please note that I don t need only the changeset . I also need to see the triples at any time in the past . .. . Answer : Take a look at this Semantic Overflow question on the same subject - http : www.semanticoverflow.com questions 453 how-to-implement-semantic-data-versioning 462 462 - there s a variety of relevant links there .. . .. . Generally versioning in Triple stores relies on either using named graphs and storing meta-data about each named graph in a separate graph or the Triple Store having some in-built mechanism for versioning such as the Talis platform though that s not a context aware store so not suitable for you",
"Question : I need to store RDF triples while keeping track of modifications . Is there anything out there for this service Alternatively how would you keep track of revision while using a context-aware triplestore Edit : please note that I don t need only the changeset . I also need to see the triples at any time in the past . .. . Answer : I tried to address this sort of thing by storing additional triples describing who said what when . But you need reification named graphs or quads which can ruin decidability .",
"Question : I m looking for a triple store to use with Java EE . I ended with 2 possibilities 4Store and Sesame but can t see the real difference between the two in term of features . I don t mind about performances details . Comment : Your question is likely to be closed as this kind of opinion-based question is considered off-topic for this site . I recommend that you try and determine what your requirements are then find out how each tool meets those requirements and then pick one . If you have more specific questions about either tool you might also try answers.semanticweb.com . Comment : Thx for your comment . I m asking what are the differences in term of features I don t think this is opinion-based that s facts . Comment : I don t dispute that but any answer you get is likely to be opinion-based in the sense that it will highlight a particular feature of one tool . Without knowing more about your use-case requirements it s not really possible to make a valid objective recommendation . Having said that I gave it a stab hope it s useful I ve tried to be as objective as possible . Comment : My use-case is quite simple : import RDF store in a triple store setup a SPARQL end point . .. . Answer : I can t give you a full list of features for either tool but I reckon that an important difference for your use-case given what little you ve told us is that wile 4Store is an RDF database implementation or triplestore Sesame is a framework API for handling RDF in Java giving access to multiple triplestore implementations including some of its own but also many third-party products . The possible advantage of this is that it allows you switching to a different database if you so require without major changes to your code . I would also imagine that Sesame s API being developed in and for Java is slightly more feature-rich and easy to use in a Java EE environment but this is merely an assumption as I am not sufficiently familiar with 4Store to make an actual comparison . disclosure : I am on the Sesame development team Comment : Thanks I see the main difference between the two system and can guess that for a simple use-case there isn t big differences .",
"Question : if a triple store contains twice the same triple what is if any exist the authoritative position about this redundancy Additionally should a triplestore be allowed to store twice the same triple within the same context I ask this because in rdflib apparently you can store the same triple twice or more . This is the reader .. . .. . and this is the writer .. . .. . This is what I obtain .. . .. . To me it appears as a bug . A modified version shows me that both triples belong to the same context and there are indeed two triples as well .. . Answer : An RDF triple store is a set of triples so the same triple cannot be present twice by definition . However most rdf stores are actually quad stores sets of rdf graphs also known as datasets and in that case the triple may appear multiple times . That is sometimes called context depending on the store eg mine Redland http : librdf.org . Authority is really up to the user to define what meaning a particular graph name context name has . Comment : That was my thought as well but apparently I found a bug in rdflib since I am pushing the same triples again and again and I get duplicates .",
"Question : i m trying to create a sparql query that returns every column where the column subject is http : purl.org dc elements 1.1 creator . In sql it should be something like this : .. . .. . The sparql query that comes close to what I want looks like this : .. . .. . It returns a table with all the three columns but the subject column is empty for some reason . The predicate and the object column are not empty and show the correct data . Anyone who can help me with this Thanks a lot : D Comment : Actually purl.org dc elements 1.1 creator http : purl.org dc elements 1.1 creator is supposed to be a property so do you really want to get all triples about this property Do you know the base concept of triples in RDF knowledge bases .. . Answer : Assuming your Triplestore is populated with the correct statements then try - Comment : Awesome This worked like a charm : D Thanks a lot : D",
"Question : if a triple store contains twice the same triple what is if any exist the authoritative position about this redundancy Additionally should a triplestore be allowed to store twice the same triple within the same context I ask this because in rdflib apparently you can store the same triple twice or more . This is the reader .. . .. . and this is the writer .. . .. . This is what I obtain .. . .. . To me it appears as a bug . A modified version shows me that both triples belong to the same context and there are indeed two triples as well .. . Answer : One should keep in mind that any particular triple may have different metadata than other - otherwise identical - triples . Metadata such as the original source of the triple possible strength of connection information etcetera . It may also be feasible to merely count the number of copies of a triple in order to judge the relative strength of a connection compared to other possible contradictory connections . So as always it all depends upon what you intend to do with your data .",
"Question : I need to store RDF triples while keeping track of modifications . Is there anything out there for this service Alternatively how would you keep track of revision while using a context-aware triplestore Edit : please note that I don t need only the changeset . I also need to see the triples at any time in the past . .. . Answer : in addition to the other answers also take a look at the Lensfield system http : www.dspace.cam.ac.uk bitstream 1810 223838 1 ieee-lensfield.pdf research software at the moment developed by Jim Downing et al. . Lensfield will not only keep track of different versions of your data but also of any scripts transformation instructions you use to process your data and change your graph . In short it s a mixture of version-control maven and make for semantic data . Maybe that helps . Comment : Yes that was my plan if PMR granted me the help I asked .",
"Question : I ve been reading about semantic-web technologies such as RDF and OWL and am intrigued about the possibilities of building an RDF triple-store semantic database on top of my existing relational DBs . It s simply an R D exercise to see what I can do . I like the look of OWLIM http : www.ontotext.com owlim but some basics are failing me . How exactly is one meant to build and then use an OWL ontology Do you build it with something like Protege http : protege.stanford.edu then import it into your repository Or is the ontology a byproduct of the software you develop to communicate with the repo It s a newbie question but I m just not sure where OWL fits into the grand order of things.. . I wouldn t ask the question if I hadn t looked around for guidance . .. . Answer : I don t think there s a specific way you have to use OWL http : www.w3.org TR owl2-overview to build an application . Hell you don t even need to use it to have built a semweb application . Generally I think there s a couple ways people tend to use OWL . I think one of the primary ones is for reasoning . They define concepts important for their application using one of the OWL2 profiles http : www.w3.org TR owl2-profiles and then use a reasoner http : en.wikipedia.org wiki Reasoner to infer new knowledge based on their ontology . There is even some work now in using OWL ontologies as schemas for integrity constraints . In other cases people use it as a documentation artifact to just be able to outline what it is that is in their data but they don t use it more formally than that . There are some piecemeal use cases in between and there are similar uses for RDF schemas http : www.w3.org TR rdf-schema which can be use like OWL ontologies just with a lower level of expressive-ness or something like SKOS http : www.w3.org 2004 02 skos which can be used to simply define a taxonomy within your application without any formal expressivity attached to it . Getting Protege http : protege.stanford.edu going is a good start . That will let you explore some of the basics of building an ontology and most of the reasoners are available as plugins so you can also explore how you can build your ontology and what kind of inferences you can get as a result . Once you have an ontology if you want to use it for something other than documentation ie reasoning you ll have to load it into a reasoner Pellet http : www.racer-systems.com Fact++ http : owl.man.ac.uk factplusplus RacerPro http : www.racer-systems.com HermiT http : hermit-reasoner.com or a database that does OWL reasoning Stardog http : stardog.com OWLIM http : www.ontotext.com owlim . If you re not worried about reasoning then you can drop it into any triplestore out there access it via Sesame http : openrdf.org or Jena http : jena.sourceforge.com if you re using Java and still be able to query the explicit facts via SPARQL http : www.w3.org TR rdf-sparql-query . So I guess the short answer is that there is not a correct way to use OWL it gets used in a variety of different capacities . One think you might find interesting is the W3C keeps a page with a list of semantic-web applications http : www.w3.org 2001 sw sweo public UseCases . These case studies talk about problems companies had and how they approached solving them using semantic technologies . You can read through a few of them to get a better idea of how folks in various industries are making use of the technology .",
"Question : Can somebody please describe the steps neccessary to convert a SQLite Database to a triple store Is there a tool that can accomplish the task .. . Answer : This is a more complicated question then it seemed when I asked it but the simple answer is that you normalize your database completely . After it is completely normalized each table stands for a predicate one columns values represent the subject and one columns values represent the object . You can convert an arbitrary sql database to a triplestore on this basis .",
"Question : I m new to Jena and triplestore when I deployed my application in tomcat 7 I m getting the following exception . Appreciate your help thank you . Exception is .. . .. . And the code where it is failing is .. . .. . TDBFactory.createDataset datasetPath .. . Answer : You have probably been updating the dataset non-transactionally and not sync ed it . The database has become corrupted and you ll need to rebuild it . Using transactions will mean the database on disk is robust against server exit .",
"Question : I ve been reading about Semantic Web technologies such as RDF RDFS and ontology but was wondering how each of these are related At the moment the terms all seem interchangeable or I m not understanding a fundamental concept here . Comment : See answer stackoverflow.com questions 1740341 http : stackoverflow.com questions 1740341 what-is-the-difference-between-rdf-and-owl 16004706 16004706 Comment : I found this post quite informative . br stackoverflow.com questions 1740341 http : stackoverflow.com questions 1740341 what-is-the-difference-between-rdf-and-owl 1813585 1813585 .. . Answer : RDF RDFS and ontology are not interchangeable terms . RDF Resource Description Framework is a conceptual data model which can be rendered physically serialized using various formats such N3 Turtle RDF XML etc . RDFS RDF Schema is a general-purpose language for representing simple RDF vocabularies on the Web . 1 http : www.w3.org 2001 sw wiki RDFS . The elements of RDFS can be used to construct an ontology . Of course if you want more expressive power for ontology and you need to encode some properties that cannot be done using RDFS elements you always have the OWL http : www.w3.org 2004 OWL option ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
triplestore
|
UNK_RELATION
|
xnet@http@104
|
xnet -- xnet - a class-library for .net framework which includes classes for work with proxy servers : @placeholder socks4 a socks5 classes for work with http 1.0 1.1 protocol : keep-alive gzip deflate chunked ssl proxies and more classes for work with multithreading : a multithreaded bypassing the collection asynchronous events and more .
|
{
"confidence": [
18.681312561035156,
18.311687469482422,
15.447957992553711,
15.447957992553711,
15.447957992553711,
15.447957992553711,
15.447957992553711,
15.447957992553711,
15.447957992553711,
15.447957992553711,
15.447957992553711,
15.447957992553711,
15.447957992553711,
15.447957992553711
],
"content": [
"http : meta.stackexchange.com questions 19190 where the consensus is no they should not .",
"Try this option code : .. . .. . And read documentation here http : xnet.codeplex.com",
"But after request program trys to open file value 1 .",
"Why",
"We need some implementation details...what s request",
"Obviously not an HttpRequest object",
"Welcome to Stack Overflow",
"I have edited your title .",
"Please see Should questions include tags in their titles",
"Post string address string path - send file .",
"You can set the parameters as : .. . .. . 1 : .. . .. . 2 : .. . .. . 3 : .. . .. . 4 :",
"Im tried to auth on G2A.com but server responed me error 400 Wrong Post-request .",
"Im spend a lot of time to anylize that could be my problem but this tries didn t succsesive .",
"Code is below :"
]
}
|
{
"confidence": [
15.254202842712402,
15.059938430786133,
14.235888481140137
],
"content": [
"Question : But after request program trys to open file value 1 . Why Comment : We need some implementation details...what s request Obviously not an HttpRequest object Comment : Welcome to Stack Overflow I have edited your title . Please see Should questions include tags in their titles http : meta.stackexchange.com questions 19190 where the consensus is no they should not . .. . Answer : Try this option code : .. . .. . And read documentation here http : xnet.codeplex.com",
"Question : But after request program trys to open file value 1 . Why Comment : We need some implementation details...what s request Obviously not an HttpRequest object Comment : Welcome to Stack Overflow I have edited your title . Please see Should questions include tags in their titles http : meta.stackexchange.com questions 19190 where the consensus is no they should not . .. . Answer : Post string address string path - send file . You can set the parameters as : .. . .. . 1 : .. . .. . 2 : .. . .. . 3 : .. . .. . 4 :",
"Question : null .. . Answer : Im tried to auth on G2A.com but server responed me error 400 Wrong Post-request . Im spend a lot of time to anylize that could be my problem but this tries didn t succsesive . Code is below :"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
http
|
UNK_RELATION
|
xhtmlrenderer@pdf@146
|
xhtmlrenderer -- xhtmlrenderer also calledflying saucer takes xml or xhtml and applies css 2.1-compliant stylesheets to it in order to render to @placeholder via itext images and on-screen using swing or swt .
|
{
"confidence": [
62.919593811035156,
60.38855743408203,
55.23847198486328,
52.98633575439453,
52.98633575439453,
51.16819763183594,
49.84052276611328,
48.54076385498047,
47.365692138671875,
44.23616027832031,
42.97166442871094,
42.64617156982422,
42.26123046875,
42.03904724121094,
41.50083541870117,
40.99258041381836,
40.99258041381836,
40.98150634765625,
40.893714904785156,
39.998836517333984,
38.66351318359375,
38.60712432861328,
37.96966552734375,
37.92168426513672,
37.14807891845703,
37.0899658203125,
36.18072509765625,
35.077911376953125,
34.885093688964844,
34.24592971801758,
34.1075439453125,
33.64872741699219,
33.26826095581055,
33.10059356689453,
32.37982177734375,
31.727880477905273,
31.376237869262695,
30.11844825744629,
29.775409698486328,
29.775409698486328,
28.576492309570312,
28.513761520385742,
28.513761520385742,
28.259851455688477,
28.259851455688477,
28.087074279785156,
27.990528106689453,
27.64387321472168,
27.22339630126953,
26.675535202026367,
26.169742584228516,
25.97711753845215,
25.899829864501953,
25.82793617248535,
25.56902503967285,
25.0604190826416,
24.84041976928711,
24.190624237060547,
23.326234817504883,
23.14535903930664,
23.13705062866211,
23.015775680541992,
22.941635131835938,
22.89925765991211,
22.637134552001953,
22.637134552001953,
22.520431518554688,
22.487089157104492,
22.28421401977539,
21.93854522705078,
21.888824462890625,
21.735305786132812,
21.668243408203125,
21.585878372192383,
21.484413146972656,
21.484413146972656,
21.484413146972656,
21.45860481262207,
21.327152252197266,
21.327152252197266,
21.327152252197266,
21.264419555664062,
21.264419555664062,
21.23166275024414,
21.23166275024414,
21.00041961669922,
20.977535247802734,
20.9114990234375,
20.9114990234375,
20.86204719543457,
20.717674255371094,
20.377582550048828,
20.185104370117188,
20.18181610107422,
20.18181610107422,
20.18181610107422,
20.18181610107422,
20.18181610107422,
20.099105834960938
],
"content": [
"It is a bug in the Flying Saucer xhtmlrenderer .",
"I m using flying-saucer xhtmlrenderer to generate pdf from xhtml .",
"I m using xhtmlrenderer Also known as Flying Saucer with iText to convert HTML to PDF .",
"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 ve just downloaded xhtmlrenderer and iText jar files .",
"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 .",
"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 using xhtmlrenderer + iText in Java to generate PDFs for some pages in my application .",
"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 .",
"Now I am using xhtmlrenderer to covert html to PDF .",
"I am getting a bug with Flying Saucer xhtmlrenderer where a word at the end of a line gets split across two lines eg .",
"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",
"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 .",
"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 .",
"Is it possible with flying-saucer and iText",
"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 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 .",
"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 .",
"flying-saucer uses itext to generate the pdf .",
"I try to set dpi both on xhtmlrenderer source and printer target but nothing seem to make any impact .",
"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",
"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 .",
"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 ve read somewhere on internet maybe on their own site that xhtmlrenderer does not support bidi rtl .",
"Flying saucer parses only valid xhtml .",
"I tried to optimize my code but since xhtmlrenderer is external lib i can t do much to optimize it .",
"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 .",
"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 .",
"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 .",
"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 .",
"See http : today.java.net pub a today 2006 10 31 combine-facelets-and-flying-saucer-renderer.html xhtml-to-image-conversion",
"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 .",
"I ve just gone through the code and there is no solution here without a re-write of itext flying-saucer .",
"Flying saucer does not work correctly with any version of iText other than 2.0.8 .",
"I convert HTML files to PDF format using The Flying Saucer Project http : code.google.com p flying-saucer .",
"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 .",
"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 .",
"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 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 .",
"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",
"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 .",
"You are probably also right in your inference that flying-saucer is not totally scalable .",
"I m generating pdf using flying-saucer lib .",
"I ve been using Flying Saucer http : code.google.com p flying-saucer for a while now with awesome results .",
"Does Flying saucer have a way of specifying resource packages on the classpath to resolve items and images",
"I m using Flying Saucer to generate PDF from HTML so I m using ITextRenderer if that matters .",
"I m using flyingsaucer to render an xhtml document to pdf through a servlet which returns the generated pdf document .",
"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 .",
"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 am using iText+flying saucer for the first time with xhtml pages using JSF 2.0 for simple registration form with regular input fields like firstName lastName phone-number etc.Once user enters all the data and click on NEXT button I have to convert this XHTML page with User data into pdf.How can i exactly get the source HTML of this page with all the styles included in the page and convert it to pdf.Currently I am tying like this .",
"I am using iText 2.1.7 to generate a document from a database .",
"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 .",
"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 .",
"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",
"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 .",
"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 .",
"However I m now generating the xhtml and want to render it directly to a PDF without saving a file .",
"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 .",
"That is an ancient version of iText .",
"Please use com.itextpdf iText .",
"I m a committer on iText .",
"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",
"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",
"I m trying to print some text using my flying-saucer https : xhtmlrenderer.dev.java.net .",
"I tried using the flying-saucer fork used by docx4j but unfortunately the pdf files produced seemed to be corrupted",
"Post this as an enhancement request on the itext-questions mailing list .",
"1 If the iText document is not closed it ll be empty .",
"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 :",
"I get the error below when converting to PDF with flying-saucer .",
"Flying Saucer throws this exception because there s a -- somewhere in a comment block .",
"Flying-Saucer supports the data : protocol natively .",
"server convert url http : server convert url valid xhtml-1.0-strict document valid xhtml-1.0-strict document .pdf",
"You include the current iText 5.5.7 but your xhtmlrendered seems to require an ancient iText version 5",
"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 .",
"i was assuming that flying-saucer would use the same mechanism ie font.setStyle to apply the bold transform .",
"I m trying to use flying-saucer to create a very large PDF and it seems to be running out-of-memory .",
"below are a couple of stack traces which suggest to me that flying-saucer is not completely scalable.. . or am i doing something wrong",
"I listed my source in googlegroups : .. . .. . http : groups.google.com group flying-saucer-users msg 3cf648841eecfbf8",
"One of the fields I need to add is in XHTML format ."
]
}
|
{
"confidence": [
78.14351654052734,
77.08407592773438,
77.0108871459961,
76.9636459350586,
76.73008728027344,
72.17730712890625,
70.67084503173828,
68.92607879638672,
67.40725708007812,
66.50399017333984,
65.00078582763672,
64.41498565673828,
62.64378356933594,
61.341888427734375,
59.64338302612305,
58.86866760253906,
57.83900451660156,
56.258949279785156,
54.491455078125,
54.230716705322266
],
"content": [
"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 : 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 : 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 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 : You can also add the font style information in css .",
"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 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 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 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 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 ve just downloaded xhtmlrenderer and iText jar files . I can make pdf files by using these jars . What I exactly want is : I need to create pdf if I give one valid URL say https : xhtmlrenderer.dev.java.net news.html in the place of inputFile . Is it possible with flying-saucer and iText If yes please guide me to achieve this . Also when I m trying to run the below code I m getting error : stream closed Comment : Your code contains com.lowagie . That is an ancient version of iText . Please use com.itextpdf iText . .. . Answer : Yes.. . this probably won t work as the page being requested isn t xhtml but this should do the trick : .. . .. . The stream closed error occurs when the file you re requesting isn t found . The samples folder must exist in the project in your workspace or wherever it is that you re running your application from Comment : My HTML contains in between text . How to handle that Comment : I d suggest you create a new question",
"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 : 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 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 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 .",
"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"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
pdf
|
UNK_RELATION
|
jython-2.5@python@62
|
jython-2 .5 -- jython is an open-source implementation of the @placeholder programming language in java .
|
{
"confidence": [
45.24555206298828,
44.948707580566406,
44.404170989990234,
43.84375,
43.84375,
43.298336029052734,
42.9238395690918,
42.72388458251953,
42.628868103027344,
42.411285400390625,
42.411285400390625,
42.411285400390625,
42.411285400390625,
42.025264739990234,
42.025264739990234,
41.01917266845703,
40.48747253417969,
40.48747253417969,
40.48747253417969,
40.48747253417969,
39.91421890258789,
39.91421890258789,
38.79435348510742,
38.79435348510742,
38.79435348510742,
38.79435348510742,
38.70012664794922,
38.70012664794922,
38.37186050415039,
38.29294204711914,
38.10137176513672,
37.881561279296875,
37.881561279296875,
37.881561279296875,
37.881561279296875,
37.881561279296875,
37.881561279296875,
37.881561279296875,
37.881561279296875,
37.62882614135742,
37.62882614135742,
37.62882614135742,
37.62882614135742,
37.62882614135742,
36.80998229980469,
36.55794143676758,
36.55794143676758,
36.50312805175781,
36.385311126708984,
36.094215393066406,
36.094215393066406,
36.094215393066406,
36.094215393066406,
35.93107604980469,
35.926170349121094,
35.70832824707031,
35.44655227661133,
34.715782165527344,
34.44232940673828,
34.44232940673828,
34.44232940673828,
34.40651321411133,
34.37141418457031,
34.37141418457031,
34.37141418457031,
34.37141418457031,
34.37141418457031,
34.37141418457031,
34.37141418457031,
34.37141418457031,
34.37141418457031,
34.37141418457031,
33.952030181884766,
33.952030181884766,
33.952030181884766,
33.952030181884766,
33.952030181884766,
33.952030181884766,
33.300437927246094,
33.11544418334961,
32.725074768066406,
32.584068298339844,
32.584068298339844,
32.584068298339844,
32.584068298339844,
32.5735969543457,
32.223655700683594,
32.22312927246094,
32.22312927246094,
32.22312927246094,
32.22312927246094,
32.22312927246094,
31.996639251708984,
31.177875518798828,
31.158252716064453,
31.101268768310547,
30.956119537353516,
30.950843811035156,
30.441883087158203,
30.441883087158203
],
"content": [
"Python as in the language implemented by Jython among many others .",
"I m using jython in a program called jes Jython Environment for Students .",
"I am currently doing an assignment for an introductory programming course in a language called Jython .",
"Is pexpect installed within Jython",
"jython setup.py install",
"Jython 2.5.2 was installed using the Jython installer .",
"I was trying to mess around with a few Java classes in the shell as I am a bit new to using the Jython implementation .",
"The java application calls plugins written in Python via Jython .",
"To use Jython with Django you need to install django-jython http : pythonhosted.org django-jython index.html and set the db backend to ENGINE : doj.db.backends.mysql .. . .. . This is documented in the official doc Running Django on Jython https : docs.djangoproject.com en dev howto jython",
"And I m using jython 2.5.1 to implement it .",
"I am using unittest in Jython .",
"Does anyone know if this is supported in Jython",
"I am running the Jython shell .",
"I m building Java to Jython bridge class .",
"So in reality Jython and Python are not portable like java .",
"I want to upgrade Jython from jython2.5.4rc1 to Jython 2.7-beta3 .",
"I guess Jython only accepts for XX in XXs",
"But I am using Jython 2.5.3 now .",
"I want to use the same package in jython-2.5 .",
"Can you try to run the installation script with jython",
"@LuiggiMendoza its jython tagged",
"I m kinda newbie to Jython .",
"Its Jython I can import java libraries in python .",
"I have downloaded Jython 2.5.3 and java jre 1.8.0 25 .",
"Jython does not have a true executable because it is run through Java .",
"I m trying to execute a python script through a Java program using Jython .",
"would this work on Python Jython 2.5.x",
"Do python s pep 8 rules apply in jython .",
"I haven t done any jython but I would expect you to be able to get the output from an interpreter launching in java .",
"More detail : .. . .. . 1 - Trying to run sphinx apidoc : .. . .. . C : path to jython bin sphinx-apidoc is not recognised as an internal or external command .. . .. . 2 - Called using Jython works : jython C : path to jython bin sphinx-apidoc with sensible options produces the documentation .rst files conf.py etc files .",
"For anyone else with similar problems the following setup works for me : .. . .. . Locations : .. . .. . Java Runtime : C : Java jre7 .. . Jython : C : Jython jython2.5.2 .. . .. . User Environment Variables : .. . .. . JRE HOME : C : Java jre7 .. . JAVA HOME : JRE HOME .. . CLASSPATH : .",
"i.e the program works as intended if i choose python otherwise jython it breaks .",
"Well it sounds like Jython doesn t generate classfiles anymore .",
"@ThomasK please tell me how to install pexpect within Jython and verify",
"I am trying to do an assignment in JES a student jython program .",
"Like record the response auto generate the Jython test scripts and a lot .",
"how to parameter values in quotes in jython this is my calling method : .. . .. . BaseSTSSchedulerTask .",
"I added the same path after I launched jython",
"Rad Lexus you are right that moduleSize isn t a number and Jython can t .",
"At the command-prompt type ftype Python.File C : Jython jython2.5.2 jython.bat 1 to associate the Jython command with files of type Python.File .",
"If you want to run Jython with a single command there should be a jython.bat file located somewhere under the Jython installation directory .",
"But when I try to access the script with Jython As : jython script.py it gives me the following error .",
"Use the right jython executable run jython -c import codecs print codecs.lookup None .",
"My code : .. . .. . Exeption : .. . .. . The most interesting is that this is not constant and there is only jython-2.7 in Jython 2.5 works correctly",
"http : stackoverflow.com questions 6787015 how-can-i-install-various-python-libraries-in-jython .. . .. . Installed Jython 2.5.2 and added JYTHON HOME C : jyhon252 to environment-variables and JYTHON HOME bin to path jython is working fine .",
"same thing happening with Jython 2.5.3 also .",
"Have you noticed that C : Jython C : jython2.7.0",
"I read this question http : stackoverflow.com questions 3065573 jython-saying-no-visible-constructors-for-class and tried editing the python.security.respectJavaAccessibility line in my Jython registry to equal false but that was to no avail .",
"I believe I have succesfully run the jython.jar file using this command in cmd : .. . .. . I have beginner-intermediate closer to beginner knowledge of programming in jython but that is on a computer with jython already installed .",
"This way we aim to enable scientific Python code to run on Jython .",
".. . Our philosophy is to integrate JyNI with Jython and CPython extensions as seamless as possible .",
"I am calling jython from the web-services to execute a python script .",
"Created a Servlet that will make Jython call from init method .",
"setUpClass was introduced in Python 2.7 and Python 3.2 Based on your tag jython-2.5 I d recommend trying the beta release Jython 2.7beta 1 which brings us up to language level compatibility with the 2.7 version of CPython",
"I m newbie in jython please find my learing environment details .. . .. . JYTHON : Jython 2.5.4rc1 2.5 : 723492dbab02 Feb 8 2013 09 : 50 : 55 JAVA : Java HotSpot TM 64-Bit Server VM Oracle Corporation on java1.7.0 01 PYTHON : Python 3.3 IDE : PyDev on Juno Service Release 1 OS : Windows 7 64 bit .. . .. . While trying to run a program which I took from the internet .",
"I m still trying to figure out how to receive a response from python script to my Java file making use of Jython .",
"If you upgrade to Jython 2.7 Beta 2 I bet this problem will be solved",
"While browsing the web i decided to pay the jython project a visit and read this news .. . .. . JyNI is a compatibility layer with the goal to enable Jython to use native CPython extensions like NumPy or SciPy .",
"I also tried to call a Python code from Java code using Jython and it works for simple print code .",
"Running java -jar jython-standalone-2.7-b3.jar was successfull with version 1.7 .. .",
"My url is localhost : 8080 I need to find that server is running or not using Java Script or Jython .",
"Output for the above command is : codecs.CodecInfo object for encoding utf-8 at 0x2 C : Jython Lib site- packages jip-0.9.4-py2.7.egg C : Jython Lib site-packages requests-2.7.0- py2.7.egg C : Jython Lib classpath pyclasspath C : Jython Lib site-packages C : Jython bin jython.exe",
"But I m using Jython to implement that and I tried to switch to the regular for-loop expression and it didn t work .",
"Yes Jython 2.7.0 supports class level test fixtures like setUpClass and tearDownClass .",
"I am using it with Sikuli and Jython 2.7.0 in Eclipse IDE with PyDev plugin and it is working very nicely .",
"I m having quite a struggle trying to use Morfologik library in my project in jython .",
"I know that Jython before version 2.5 can achieve this by using the command jythonc .",
"I know the question is being asked many times but I would like to know if we can do this using Jython .",
"How can I include a while-loop to keep the user guessing until they get the right answer in the following Jython program",
"Ok I just fixed this by doing : SchServices api servicegroup + self.id id is a built-in function in jython .",
"Can Jython show you the numerical value of moduleSize that you are feeding into the next calculation",
"The fully specified import failed because the current working directory of python or jython was set to Project .",
"Perhaps you by mistake execute python MainScreen.py instead of jython MainScreen.py",
"I am having some trouble with Jython and the SQLite jar file .",
"I guess people need to stop thinking that Jython and Python are portable .",
"I am having some serious trouble installing and running Jython .",
"Does it fail if you run it using a standalone jython executable instead of embedding it",
"Yes sir it fails to run using a standalone jython executable too .",
"Jython v2.5 RobotFramework v2.7.5 Log4j v1.2.16 .. . .. . I have a Jython script as a listener http : robotframework.googlecode.com hg doc userguide RobotFrameworkUserGuide.html r 2.7.7 using-listener-interface that logs the variables dictionary but it is not pretty-printed by pprint http : docs.python.org 2 library pprint.html module as it does with attributes dictionary .",
"please i need help connecting database with jython on django and help me with the server when i put jython manage.py runserver the server don t run .. . .. . and django throw this : .. . .. . i research and found that is the connector of mysql but i don t know why this does t work if anyone has a project in jython on django i will be so much gratefull this is too hard",
"What I need is very simple : I want the Jython to compile my Python code and generate the .class files or Java bytecode for me as I would need these .class files to do some analysis works .",
"I tried to build Jython on my macbook pro but got an error after simpley ant command .",
"So JyNI aims to work without any recompilation of Jython or the desired CPython extensions .",
"I am getting a sun.misc.InvalidJarIndexException when invoking a python script from a web service using jython .",
"I am using JDK 7 Axis2 1.6 rampart 1.6 and jython 2.5.0 .",
"That command is exactly how you run Jython and without providing any additional arguments the Jython interpreter will start where you can type out functions and run them .",
"I need to copy a dictionary of dictionaries N times but am working in an environment with pared down Jython libraries that do not include copy https : docs.python.org 2 library copy.html .",
"Just have a look at superclass SikuliTest implementing it to maximize and minimize a running application before performing individual test using Jython 2.7 unit test framework .",
"But if run this as a jython the program breaks down and if I print the enterPlayer print enterPlayer.upper variable the varable which stores the input from the user the value is shown as PYCLASSPATH .",
"I need to use a PolishStemmer so I imported morfologik-polish morfologik-stemming and morfologik-fsa in jython console using sys.path.append .",
"Although MySQLdb is the most widely used MySql library among the Python Django community you can t use it because Jython does not work with C extensions .",
"you can : .. . .. . add the parent directory of Project to your python lib .. . .. . or just change the working directory of jython to the parent of Project in the debug settings .",
"I tried so far with absolutely no success : .. . .. . org.python.util.JLineConsole org.python.util.ReadlineConsole misses readline module .. . Readline-1.7 does nothing .. . java-readline libreadline-java-0.8.0 misses readline module .. . JLine won t load the jar .. . pyreadline won t integrate to jython .. . .. . So : .. . .. . is it possible with jython 2.5.3 under IBM AIX 64 with a thinClient jython-installer-2.5.3.jar to have a real interactive shell with bash like completion and command recall using arrow keys without having to build compile something",
"When called directly from Jython they work as expected see point 2 above however when called as part of another process e.g .",
"Then each of the following packages except setuptools was installed by extracting it locally and then running jython setup.py install in its extracted directory : .. . .. . 1 . setuptools : by calling jython ez setup.py with setuptools-1.4.2.tar.gz in the same directory so there is no attempt to download it .. . 2 .",
"input : raw input Python 3.x : Python 2.x .. . .. . If you want to run your program both in Python 3.x and Python 2.x Jython 2.x Put following lines at the beginning of your program .",
"I m using Netbeans 8.0 and Python 2.6.5 Jython 2.5.1 the default from adding Python and Jython Plugin to netbeans I m a mac os x 10.9.3 user .. . .. . I tried to open a new Jython Code where I add the path to python to get it work : Library Frameworks Python.framework Versions 2.7 bin python and it does .",
"Remove older versions of java and install jdk7 .. . Install JYTHON from jar : java -jar jython-installer-2.7-b2.jar .. . Set up environment-variables : .. . Add to existing PATH : C : jython2.7b2 C : Program Files x86 Java jdk1.7.0 67 bin .. . Create PYTHON and add : C : jython2.7b2 Lib site-packages .. . Install easy install .. . Download ez setup.py .. . Open file and copy-paste intall url into browser to download the setuptools-5.7.zip file .",
"I m using Jython 2.5.2 and run tests on Windows machine from IntelliJ IDEA environment .",
"Anyway this is already covered in the jython manual : jython.org jythonbook en 1.0 GUIApplications.html http : www.jython.org jythonbook en 1.0 GUIApplications.html"
]
}
|
{
"confidence": [
54.54376983642578,
52.96615219116211,
52.116455078125,
51.75636291503906,
50.51498794555664,
50.27778625488281,
49.739051818847656,
49.02458953857422,
48.81578063964844,
47.49778747558594,
47.207313537597656,
46.869606018066406,
46.705718994140625,
46.63201141357422,
45.73427963256836,
45.46295166015625,
44.686012268066406,
44.62576675415039,
44.62576675415039,
44.37860107421875
],
"content": [
"Question : I am using unittest in Jython . I am writing some Sikuli tests .. . .. . I am able to make setUp work but I am unable to get setUpClass running . Does anyone know if this is supported in Jython Has anyone gotten it to work print setUpClass never prints anything .. . .. . I am running Java 2.5.2 Release 2 5 2 : 7206 Mar 2 2011 23 : 12 : 06 .. . Answer : setUpClass was introduced in Python 2.7 and Python 3.2 Based on your tag jython-2.5 I d recommend trying the beta release Jython 2.7beta 1 which brings us up to language level compatibility with the 2.7 version of CPython",
"Question : While browsing the web i decided to pay the jython project a visit and read this news .. . .. . JyNI is a compatibility layer with the goal to enable Jython to use native CPython extensions like NumPy or SciPy . This way we aim to enable scientific Python code to run on Jython . .. . Our philosophy is to integrate JyNI with Jython and CPython extensions as seamless as possible . So JyNI aims to work without any recompilation of Jython or the desired CPython extensions . What it means is we can use NumPy or SciPy in jython.I have worked with python before but i lean more towards java . Do python s pep 8 rules apply in jython . Comment : PEP 8 is a style guide for Python code . Python as in the language implemented by Jython among many others . What does C API compatibility have to do with this Comment : Python heads give me a headache.So vain . .. . Answer : PEP8 is just a code style specification albeit a very good one . You can use it on any Python implementation . It is widely used but that doesn t mean your code won t work without it",
"Question : null .. . Answer : This is my python code here i am trying to import jframe . but i am facing the follwong problem : .. . .. . Can someone explain how to import java libraries in python . and please let me know what mistake i did here . Comment : The mistake is trying to import libraries from a programming language to another . You simply can t do it like that . Comment : @LuiggiMendoza its jython tagged Comment : @FooBarUser well didn t read that . Anyway this is already covered in the jython manual : jython.org jythonbook en 1.0 GUIApplications.html http : www.jython.org jythonbook en 1.0 GUIApplications.html Comment : Thanks for your reply . Its Jython I can import java libraries in python . Comment : Perhaps you by mistake execute python MainScreen.py instead of jython MainScreen.py",
"Question : I am running the Jython shell . I was trying to mess around with a few Java classes in the shell as I am a bit new to using the Jython implementation . However when I try to create an object for example I get the following Traceback . I read this question http : stackoverflow.com questions 3065573 jython-saying-no-visible-constructors-for-class and tried editing the python.security.respectJavaAccessibility line in my Jython registry to equal false but that was to no avail . What could be causing this to happen .. . Answer : Annotation is not a class its an interface Documentation http : docs.oracle.com javase 7 docs api java lang annotation Annotation.html . You cannot instantiate an interface you will have to create a class that implements the Annotation class and instantiate that class .",
"Question : I am getting a sun.misc.InvalidJarIndexException when invoking a python script from a web service using jython . I am using JDK 7 Axis2 1.6 rampart 1.6 and jython 2.5.0 . It works fine if same operations are performed from a Servlet or web-services with Axis2 1.5 and rampart 1.5 . I am calling jython from the web-services to execute a python script . refresh.py .. . .. . Excerpt from web service method to invoke python script .. . .. . once execfile called it gives below error .. . .. . File root Documents refresh.py line 2 in import os File root Documents tomcat webapps refresh WEB-INF lib jython.jar Lib os.py line 48 in sun.misc.InvalidJarIndexException : Invalid index .. . .. . line 48 in os.py is actually importing java classes from jython.jar . I have also tried importing threading it fails at line 5 where it again referrers to java classes from jython.jar . .. . Answer : I found a workaround for this problem . Created a Servlet that will make Jython call from init method . Configured this Servlet to load on startup . Once the web application is deployed and all the web-services are loaded Servlet would have loaded all the required jython class and it will be reused for subsequent web service calls .",
"Question : I am using unittest in Jython . I am writing some Sikuli tests .. . .. . I am able to make setUp work but I am unable to get setUpClass running . Does anyone know if this is supported in Jython Has anyone gotten it to work print setUpClass never prints anything .. . .. . I am running Java 2.5.2 Release 2 5 2 : 7206 Mar 2 2011 23 : 12 : 06 .. . Answer : Yes Jython 2.7.0 supports class level test fixtures like setUpClass and tearDownClass . I am using it with Sikuli and Jython 2.7.0 in Eclipse IDE with PyDev plugin and it is working very nicely . Just have a look at superclass SikuliTest implementing it to maximize and minimize a running application before performing individual test using Jython 2.7 unit test framework .",
"Question : I am having some serious trouble installing and running Jython . I am completely new to how jython runs so I am pretty lost . I have downloaded Jython 2.5.3 and java jre 1.8.0 25 . I believe I have succesfully run the jython.jar file using this command in cmd : .. . .. . I have beginner-intermediate closer to beginner knowledge of programming in jython but that is on a computer with jython already installed . My main problem is being able to run jython so I can see the actual function program area where you would type out your functions then run them . I appreciate any help someone can give . Comment : So what exactly is the problem you re encountering Is there an error being displayed Comment : I just don t know how to run the program . I thought there would be an executable so I just don t get how to start Jython . Basically my problem is I m being stupid . .. . Answer : That command is exactly how you run Jython and without providing any additional arguments the Jython interpreter will start where you can type out functions and run them . If you want to run Jython with a single command there should be a jython.bat file located somewhere under the Jython installation directory . Jython does not have a true executable because it is run through Java . The jython.bat file is the closest you ll get to an executable because it is a batch script which runs the jython.jar file using a command nearly identical to yours with Java . jython.bat should be located at one of the following locations : .. . .. . NOTE : The jython.bat file requires a standard Java installation . Comment : This worked it turned out Java was in the wrong place . Thanks for the help .",
"Question : Once sphinx-apidoc has been run the command C : path to doc make html produces an error beginning : .. . .. . The sphinx-build command was not found snip .. . .. . However the command does exist and the relevant environment-variables are set . More detail : .. . .. . 1 - Trying to run sphinx apidoc : .. . .. . C : path to jython bin sphinx-apidoc is not recognised as an internal or external command .. . .. . 2 - Called using Jython works : jython C : path to jython bin sphinx-apidoc with sensible options produces the documentation .rst files conf.py etc files . 3 - make html then produces the following error : .. . .. . The sphinx-build command was not found snip .. . .. . It then recommends setting the SPHINXBUILD environment variable and even the PATH . I already have these two environment-variables set proven to myself by calling echo PATH and echo SPHINXBUILD . This is where I get stuck . It appears that the files that Sphinx uses sphinx-apidoc and sphinx-build in this case which are in the C : path to jython bin directory do not have any file suffixes . When called directly from Jython they work as expected see point 2 above however when called as part of another process e.g . make html they are not recognised and the execution fails see points 1 and 3 above . Does anyone know the what why and most importantly how to fix of this problem My setup process is on an unnetworked Windows 7 computer . Jython 2.5.2 was installed using the Jython installer . Then each of the following packages except setuptools was installed by extracting it locally and then running jython setup.py install in its extracted directory : .. . .. . 1 . setuptools : by calling jython ez setup.py with setuptools-1.4.2.tar.gz in the same directory so there is no attempt to download it .. . 2 . Jinja2 2.5 .. . 3 . docutils 0.11 .. . 4 . Pygments 1.6 .. . 5 . Sphinx 1.2.1 .. . 6 . numpydoc 0.4 - Only mentioned because it is also isntalled on the machine . .. . Answer : I have managed to get it working . The problem was that the manual installation and the use of Jython meant that certain environment-variables that were expected were not in-place . Also the use of Windows 7 and I believe MS Windows in general means that Python scripts without an extension cannot be run without calling them explicitly through Jython Windows doesn t check for shebangs . Finally file associations had not been set up as happens automatically with CPython installation but has not happened with Jython . For anyone else with similar problems the following setup works for me : .. . .. . Locations : .. . .. . Java Runtime : C : Java jre7 .. . Jython : C : Jython jython2.5.2 .. . .. . User Environment Variables : .. . .. . JRE HOME : C : Java jre7 .. . JAVA HOME : JRE HOME .. . CLASSPATH : . JYTHON HOME : C : Jython jython2.5.2 .. . PATH : JRE HOME bin JYTHON HOME bin .. . .. . File Associations : .. . .. . At the command-prompt type assoc .py Python.File to associate Python.File with the .py extension . At the command-prompt type ftype Python.File C : Jython jython2.5.2 jython.bat 1 to associate the Jython command with files of type Python.File . Append .py .PY to the PATHEXT system environment variable . This will make it possible to execute Python files without having to provide their .py extension . N.B . This does not make it possible to run Python files that do not have a .py extension . File Extensions : .. . .. . Rename the four Sphinx commands to include .py extensions . This is remarkably difficult with vanilla Windows 7 as it does everything it can to distance the user from such low-level details as file extensions however the rename command at the command-prompt does the job : type ren sphinx sphinx .py when in the Jython bin directory . It should now be possible to call sphinx-apidoc or similar from anywhere . Once this is complete the command make html when called from the documentation directory should work as expected .",
"Question : I m newbie in jython please find my learing environment details .. . .. . JYTHON : Jython 2.5.4rc1 2.5 : 723492dbab02 Feb 8 2013 09 : 50 : 55 JAVA : Java HotSpot TM 64-Bit Server VM Oracle Corporation on java1.7.0 01 PYTHON : Python 3.3 IDE : PyDev on Juno Service Release 1 OS : Windows 7 64 bit .. . .. . While trying to run a program which I took from the internet . This program expects some inputs from the end user C M or X something like : .. . .. . enterPlayer input Would you like to create a team or manage an existing team n Enter C for create M for manage X to exit This workks fine if run this program with python using pydev . But if run this as a jython the program breaks down and if I print the enterPlayer print enterPlayer.upper variable the varable which stores the input from the user the value is shown as PYCLASSPATH . i.e the program works as intended if i choose python otherwise jython it breaks . Please help .. . Answer : input : raw input Python 3.x : Python 2.x .. . .. . If you want to run your program both in Python 3.x and Python 2.x Jython 2.x Put following lines at the beginning of your program . Comment : Thanks for the quick answer I tried the same way as you suggested . Its works fine now . Thanks . But my editor pydev gives me an error saying that raw input is an undefined variable . Is there a way to correct this issue Comment : replace raw input to eval raw input . This will make pydev happy but not good . Maybe there is some editor setting to suppress variable check.. . guess Comment : Thanks again it works with your warning . Aslo tried with the option Window - Preferences - PyDev - Editor - Code Analysis - Undefined - Undefined Variable From Import - Ignore but this does not help me to remove the error marker . Any ways will try to find it out .",
"Question : null .. . Answer : I know that Jython before version 2.5 can achieve this by using the command jythonc . But I am using Jython 2.5.3 now . What I need is very simple : I want the Jython to compile my Python code and generate the .class files or Java bytecode for me as I would need these .class files to do some analysis works . But unfortunately the interpreter just directly runs the program without leaving any intermediate representations behind . P.S . : I m using a Mac Comment : Is there a particular reason you need class files Comment : @Antimony Yes as I m doing analysis on the .class files generated from different languages . Comment : Well it sounds like Jython doesn t generate classfiles anymore . You might as well ask how to generate a classfile with Clang .",
"Question : I m still trying to figure out how to receive a response from python script to my Java file making use of Jython . I know we can use PythonInterpreter execfile to execute python scripts but does PythonInterpreter allows us to receive the respone from the script I know the question is being asked many times but I would like to know if we can do this using Jython . Thanks in advance Comment : I haven t done any jython but I would expect you to be able to get the output from an interpreter launching in java . Did you try reading from the system in Comment : I think you might be referring to stackoverflow.com questions 13861024 http : stackoverflow.com questions 13861024 calling-python-script-from-java-using-runtime-getruntime-exec this is without using jython that s not what i m trying to achieve .. . Answer : How about communicating through web service It keeps modules loosely coupled and gives you ability to split work between developers more easily . Comment : Using web service would do the trick I can t disagree on that but for a small task like sending parameters receiving response I think web service is a complicate way of achieving it .",
"Question : please i need help connecting database with jython on django and help me with the server when i put jython manage.py runserver the server don t run .. . .. . and django throw this : .. . .. . i research and found that is the connector of mysql but i don t know why this does t work if anyone has a project in jython on django i will be so much gratefull this is too hard .. . Answer : Although MySQLdb is the most widely used MySql library among the Python Django community you can t use it because Jython does not work with C extensions . To use Jython with Django you need to install django-jython http : pythonhosted.org django-jython index.html and set the db backend to ENGINE : doj.db.backends.mysql .. . .. . This is documented in the official doc Running Django on Jython https : docs.djangoproject.com en dev howto jython Comment : i have tried this but does t work ENGINE : doj.backends.zxjdbc.sqlite3 the error is django.core.exceptions.ImproperlyConfigured : Error loading SQLite3 JDBC driver : No module named sqlite maybe is the classpath i don t know why",
"Question : null .. . Answer : I ve read A LOT about this matter but nothing seems to work with me right I m using Netbeans 8.0 and Python 2.6.5 Jython 2.5.1 the default from adding Python and Jython Plugin to netbeans I m a mac os x 10.9.3 user .. . .. . I tried to open a new Jython Code where I add the path to python to get it work : Library Frameworks Python.framework Versions 2.7 bin python and it does . I also tried to call a Python code from Java code using Jython and it works for simple print code . But when I add an nltk POS code which work very fine in Python interpreter it throws an error : ImportError : No module named nltk .. . .. . I thried those Paths : Library Frameworks Python.framework Versions 2.7 bin python Library Python 2.7 site-package .. . .. . when I call python from terminal the nltk import work fine : .. . .. . Then I get another error : ImportError : No module named signal . and so on with those no module named.. . I also tried to add jython-standalone-2.7-b21.jar in the classpath in the Libraries but it doesn t solve this problem . How can I get it work Appendix : my Java Code : .. . .. . my Python Code : .. . .. . Thanks in advance",
"Question : My purpose to add some python libraries to jython i.e suds package .. . .. . To do this tried to follow the instruction from http : www.jython.org jythonbook en 1.0 appendixA.html setuptools .. . .. . and also checked .. . .. . How can I install various Python libraries in Jython http : stackoverflow.com questions 6787015 how-can-i-install-various-python-libraries-in-jython .. . .. . Installed Jython 2.5.2 and added JYTHON HOME C : jyhon252 to environment-variables and JYTHON HOME bin to path jython is working fine . As second step tried to install easy install on top of Jython 2.5.2 .. . .. . got ez setup.py from .. . .. . http : peak.telecommunity.com dist ez setup.py .. . .. . Tried to install ez setup.py and got following error that I couldnt find any clue how to solve it . same thing happening with Jython 2.5.3 also . C : tmp ez setup jython ez setup.py .. . .. . Downloading http : pypi.python.org packages 2.5 s setuptools setuptools-0.6c11-py2.5.egg .. . .. . Processing setuptools-0.6c11-py2.5.egg .. . .. . Removing c : jython252 lib site-packages setuptools-0.6c11-py2.5.egg .. . .. . Copying setuptools-0.6c11-py2.5.egg to c : jython252 lib site-packages .. . .. . error : c : jython252 lib site-packages setuptools-0.6c11-py2.5.egg : Unknown error : 20047 .. . .. . I had Windows 7 64bit OS and 32 Bit jre 1.6.0 38 available on my device . Does anyone have any idea how I can solve this May I missing some thing Thanks in advance. . Comment : Did you ever figure this out I was able to get easy install installed . The new problem now is when I use it I get socket timeouts all the time . Comment : @pitchblack408 it was because of Windows 7 . Comment : So in reality Jython and Python are not portable like java . I guess people need to stop thinking that Jython and Python are portable . Also the .org sites books should state that these languages aren t portable because they don t support the packaging tools necessary for Python and Java . Comment : The real problem is that there is no installer that makes exe files that link-to ez install scripts . so you can have it create some and then move them over . In Python some people made exe and msi installers . I don t understand why those people don t modify the installers to work with Jython . So I manage to get a hack to work . Using ez install will install pip but you then run into the issue that pip doesn t have an exe to call to run pip . Someone needs to create an exe and files that link-to the pip scripts in the bin and site-packages folder . .. . Answer : Remove older versions of java and install jdk7 .. . Install JYTHON from jar : java -jar jython-installer-2.7-b2.jar .. . Set up environment-variables : .. . Add to existing PATH : C : jython2.7b2 C : Program Files x86 Java jdk1.7.0 67 bin .. . Create PYTHON and add : C : jython2.7b2 Lib site-packages .. . Install easy install .. . Download ez setup.py .. . Open file and copy-paste intall url into browser to download the setuptools-5.7.zip file . Move the zip into the same folder as ez setup.py . Then run it : jython setup.py install .. . The easy install will have moved files to your C : Python27 .. . copy all the files from C : Python27 Lib site-packages to C : jython2.7b2 Lib site-packages .. . copy all the files from C : Python27 Scripts to C : jython2.7b2 bin .. . Delete C : Python27 .. . Finally you need to edit all the scripts so that they don t use Python.exe . Change it to : C : jython2.7b2 jython.bat",
"Question : I m kinda newbie to Jython . I m trying to execute a python script through a Java program using Jython . Inside the python script I m trying to call a method of some external library called petl . When I try to execute the script with python As : python script.py it executes without any problem . But when I try to access the script with Jython As : jython script.py it gives me the following error . P.S : I can run simple python scripts without any problem . But when I try to access an external library function through the script it gives me an error . Can anyone please give me an workaround or some advice Thanks in advance . Python Script : .. . .. . Error Stack : Comment : Does it fail if you run it using a standalone jython executable instead of embedding it Might be related : Unable to use the codecs module when embedding Jython http : bugs.jython.org issue1722 Comment : Yes sir it fails to run using a standalone jython executable too . But it runs when I run it as a standalone python . With python script.py command Comment : What is the output of jython -c import codecs sys print codecs.lookup utf8 sys.path sys.executable Comment : Output for the above command is : codecs.CodecInfo object for encoding utf-8 at 0x2 C : Jython Lib site- packages jip-0.9.4-py2.7.egg C : Jython Lib site-packages requests-2.7.0- py2.7.egg C : Jython Lib classpath pyclasspath C : Jython Lib site-packages C : Jython bin jython.exe Comment : you should put the output in your question to format it properly . Have you noticed that C : Jython C : jython2.7.0 Use the right jython executable run jython -c import codecs print codecs.lookup None . To workaround the issue try to pass the encoding to tocsv function explicitly a string not None . .. . Answer : You have to explicitly pass the value for encoding when calling both fromcsv and tocsv functions .",
"Question : I want to upgrade Jython from jython2.5.4rc1 to Jython 2.7-beta3 . I have downloaded following two files from http : www.jython.org downloads.html : .. . .. . When I doubleclick on jython-installer-2.7-b3.jar file I am getting Could n ot find the main class : org.python.util.install.Installation.program will exit error . Then I tried by using following command But I am getting same error : .. . .. . C : Users Downloads .. . .. . I tried both Installer and standalone jar files using the above command . Its throws same error . Could anyone please guide me on How to install this jython-installer-2.7-b3.jar file .. . .. . Thanks in advance . .. . Answer : Unsupported major.minor version 51.0 means your version of Java is too old . Running java -jar jython-standalone-2.7-b3.jar was successfull with version 1.7 .. . Comment : Thanks Now I am able to upgrade.. .",
"Question : null .. . Answer : I am currently doing an assignment for an introductory programming course in a language called Jython . The assignment task I am working on says that my program needs to run a function that expands a QR code image to a size specified by the user and to have a quiet zone around the image that is double what the size of the image-size in pixels is . Then return the new image with the QR code centered in the middle of the new image . Here is the code I have so far : .. . .. . When I run the above code it produces an image however I am given a error message that says : .. . .. . getPixel picture x y : x 49 is less than 0 or bigger than the width 48 .. . .. . I m not sure how to go about fixing it so any help would be greatly appreciated . Also I am a beginner coder so if you could explain how you would go about fixing my program that would be greatly appreciated . Comment : Can Jython show you the numerical value of moduleSize that you are feeding into the next calculation From its description I don t believe for a second it is a number : The getPixels function amasses a list of every single pixel in an image . That particular line looks random to me . Comment : Rad Lexus you are right that moduleSize isn t a number and Jython can t . I am a complete newbie when it comes to coding and I misinterpreted what moduleSize was used for . It was my error .",
"Question : I m using org.w3c.dom to process some xml documents . And I m using jython 2.5.1 to implement it . Part of my xml document EmployeeInfo.xml is like : .. . .. . And my jython code for reading in and parsing xml is like : .. . .. . When I ran this script there was an error : .. . .. . referring to the line : .. . .. . It seems like it automatically treat the employees as the jython s NodeList rather than org.w3c.dom.NodeList.. . I searched online regarding this issue but I ve got little regarding this issue...Could anyone here help me with this Thanks in advance .. . Answer : org.apache.xerces.dom.DeepNodeListImpl This should work : Comment : org.apache.xerces.dom.DeepNodeListImpl implements org.w3c.dom.NodeList but none of them is iterable . Comment : Hi thank you for your answer . But I m using Jython to implement that and I tried to switch to the regular for-loop expression and it didn t work . I guess Jython only accepts for XX in XXs",
"Question : null .. . Answer : I have installed sqlalchemy package for python 2.7.8 . I want to use the same package in jython-2.5 . I tried inserting the path to the sqlalchemy in the sys.path . however I still always get No module named sqlalchemy Comment : How did you install the package What s the installed location and what path you added to sys.path Comment : I installed using the following command python setup.py install . An .egg file was created in C : python27 lib site-packages . I added the same path after I launched jython Comment : Can you try to run the installation script with jython jython setup.py install Comment : Did that ...do I have to unzip the egg file",
"Question : After having spend 4 days on searching for a working solution i guess i need to ask . So far i m successfully working withj jython 2.5.2 or 2.5.3 with a modifier thinClient.sh that loads what i need . It connects successfully to a DeploymentManager with either IPC or SOAP connector . However it lacks the readline module : .. . .. . The goal is to make it interactive with colored prompt and sofort . I tried so far with absolutely no success : .. . .. . org.python.util.JLineConsole org.python.util.ReadlineConsole misses readline module .. . Readline-1.7 does nothing .. . java-readline libreadline-java-0.8.0 misses readline module .. . JLine won t load the jar .. . pyreadline won t integrate to jython .. . .. . So : .. . .. . is it possible with jython 2.5.3 under IBM AIX 64 with a thinClient jython-installer-2.5.3.jar to have a real interactive shell with bash like completion and command recall using arrow keys without having to build compile something if yes please somebody describe a working solution : .. . .. . 1 . what s the solution name 2 . what s in your wsadmin.properties 3 . which libraries to load in LIBPATH 4 . which class to load in CLASSPATH 5 . which command-line to invoque with java There are so many solutions or propositions to this frenquently asked question on the web but nowhere did i found a well described or working solution . Too much information scattered all around just becomes a mess : thanks for any help .. . Answer : ok i found a workaround that was so easy to answer myself : .. . .. . rlwrap -H THIN CLIENT HOME logs rlwrap.history.log -f THIN CLIENT HOME etc rlwrap.jython.words.txt -r -pBlue -z THIN CLIENT HOME etc rlwrap.prompt.pl CMDLINE .. . .. . org.python.util . and com.ibm.ws.scripting.WasxShell are mutually incompatible"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
python
|
UNK_RELATION
|
qtcore@qtcore@36
|
qtcore -- questions related to the @placeholder module that provides core non-graphical classes used by other modules .
|
{
"confidence": [
25.921897888183594,
24.255538940429688,
22.903268814086914,
22.80560302734375,
21.933616638183594,
21.57451820373535,
20.691333770751953,
20.691333770751953,
20.691333770751953,
20.690855026245117,
20.325084686279297,
20.325084686279297,
20.325084686279297,
19.65036392211914,
19.24139976501465,
19.172229766845703,
19.041358947753906,
18.558521270751953,
18.54524803161621,
18.27950668334961,
18.27950668334961,
18.27950668334961,
17.989459991455078,
17.989459991455078,
17.989459991455078,
17.65267562866211,
17.596628189086914,
17.495628356933594,
17.126651763916016,
17.126651763916016,
17.027568817138672,
17.027568817138672,
17.027568817138672,
16.90410041809082,
16.828697204589844,
16.82779312133789,
16.721010208129883,
16.677589416503906,
16.394407272338867,
16.290958404541016,
16.114471435546875,
15.940949440002441,
15.940949440002441,
15.874711990356445,
15.840353012084961,
15.79113483428955,
15.695064544677734,
15.625351905822754,
15.625351905822754,
15.625351905822754,
15.625351905822754,
15.625351905822754,
15.625351905822754,
15.625351905822754,
15.395110130310059,
15.38874340057373,
15.242846488952637,
15.088787078857422,
15.088787078857422,
15.070441246032715,
15.064863204956055,
15.064863204956055,
14.962625503540039,
14.801263809204102,
14.62543773651123,
14.620650291442871,
14.573996543884277,
14.478805541992188,
14.472496032714844,
14.412178993225098,
14.411540985107422,
14.37632942199707,
14.35405158996582,
14.297100067138672,
14.23588752746582,
14.156074523925781,
14.14239501953125,
14.133617401123047,
14.123653411865234,
14.108548164367676,
14.108548164367676,
14.102970123291016,
14.102970123291016,
14.102970123291016,
14.102970123291016,
14.102970123291016,
14.089990615844727,
14.038383483886719,
13.935931205749512,
13.925527572631836,
13.903329849243164,
13.903329849243164,
13.839370727539062,
13.839370727539062,
13.797688484191895,
13.761213302612305,
13.75113296508789,
13.75113296508789,
13.75113296508789,
13.738266944885254
],
"content": [
"QtXml for this as the stream reader and writer classes are relatively simple to use in QtCore .",
"I checked under usr .. . and QtCore is shown .",
"You will then get access to the qt json classes in QtCore http : doc.qt.io qt-5 json.html all of a sudden .",
"am getting this error when trying to import QtCore",
"I figure Raspbian doesn t like the .Qtcore so I ve tried to change it to another format from PyQt4 import QtCore Pycharm gives errors that Qt is not defined .",
"We designed this module based on QIODevice which already provides you non-blocking mechanism for your GUI application to use the QSerialPort class .",
"from PyQt4.QtCore import works in PyCharm but doesn t work with Python3 and PyQt4 on the Raspberry Pi .",
"The only thing in Pycharm that works is from PyQt4.QtCore import and I ve tried everything I can find .",
"Of course Qt isn t defined in PyCharm when you use from PyQt4 import QtCore you need to reference it as QtCore.Qt",
"Otherwise he would need to use QtCore .",
"Boost in this case is a build time dependency while QtCore is a runtime .",
"You should use the json support in QtCore with version 5.X .",
"It seems as though QtCore doesn t even exist in relation to PyQt4 or PyQt5 .",
".. . Because C++ forbids unions from including types that have non-default constructors or destructors most interesting Qt classes cannot be used in unions .",
"Here you can find all the types : .. . .. . http : qt-project.org doc qt-5.1 qtcore qmetatype.html Type-enum",
"I need them to be able include this : .. . .. . .. . Which I found in that QtCore folder .",
"The idea is that you append periodically into your graphical widget .",
"The easiest way to make your asynchronous code synchronous is to supply the connection type as Qt : : BlockingQueuedConnection http : qt-project.org doc qt-5.1 qtcore qt.html ConnectionType-enum on connect http : qt-project.org doc qt-5.1 qtcore qobject.html connect .",
"Basically you will have access to these classes : .. . .. . QJsonArray Encapsulates a JSON array .. . .. . QJsonDocument Way to read and write JSON documents .. . .. . QJsonObject Encapsulates a JSON object .. . .. . QJsonObject : : iterator QJsonObject : : iterator class provides an STL-style non-const iterator for QJsonObject .. . .. . QJsonObject : : const-iterator QJsonObject : : const-iterator class provides an STL-style const-iterator for QJsonObject .. . .. . QJsonParseError Used to report errors during JSON parsing .. . .. . QJsonValue Encapsulates a value in JSON .. . .. . Here you can find a very good example about the usage of these classes more or less : .. . .. . JSON Save Game Example http : doc.qt.io qt-5 qtcore-json-savegame-example.html .. . .. . If you have the Qt 4 series or older you could try to backport these classes if no one had not done so .",
"Are you trying to use the json support in QtCore 5.X or the third-party qjson library",
"You could look into the following example how the serialization deserialization works with json format in QtCore .",
"See the documentation note about in each corresponding section : .. . .. . This function was introduced in QtCore 5.1 .",
"You would need to use the following method http : qt-project.org doc qt-5.0 qtcore qmetatype.html qRegisterMetaType for register your custom type though .",
"main.cpp .. . .. . Output .. . .. . g++ -Wall -fPIC -lQt5Core -I usr include qt QtCore -I usr include qt main.cpp . a.out",
"That s fine though because implicit-sharing http : qt-project.org doc qt-5.1 qtcore implicit-sharing.html implicitly-shared means they are shallow copies .",
"My questions may seems like it is a real duplicate but however I checked many related questions my problem still remains .",
"That being said if you wish to go for singletons you could implement that on top of the Q GLOBAL STATIC http : qt-project.org doc qt-5.1 qtcore qglobalstatic.html Q GLOBAL STATIC or Q GLOBAL STATIC WITH ARGS http : qt-project.org doc qt-5.1 qtcore qglobalstatic.html Q GLOBAL STATIC WITH ARGS macros in Qt .",
"This is related .",
"Can I copy QtCore folder from QtCreator and use it in my Visual Studio 2013 C++ project",
"Just copy QtCore folder to my Visual Studio project folder and include headers I need will it work with that binaries",
"To be fair you could also look into the following boost variants below but then you end up using boost instead of QtCore after the porting .",
"Thanks to this method you can get relative-path from your path - link http : qt-project.org doc qt-5.1 qtcore qdir.html relativeFilePath",
"According to http : qt-project.org doc qt-5.0 qtcore qobject.html no-copy-constructor-or-assignment-operator qt doesn t play well with copy constructors .",
"If so are there any other classes that I can use for file integrity monitoring",
"As the docs for that function https : docs.python.org 3 library os.html os.system say : .. . .. . The subprocess module provides more powerful facilities for spawning new processes and retrieving their results using that module is preferable to using this function .",
"Json is also supported in python quite well by the json module so you would have no issue on the server-side to deserialize it : .. . .. . JSON Save Game Example http : qt-project.org doc qt-5 qtcore-savegame-example.html .. . .. . This is basically the important part that would give you some hint on the client-side .",
"The solution is as trivial as moving the assignment-operator of the shared class into the module : .. . .. . New interface : Model.h .. . .. . Private header : Model p.h .. . .. . Implementation : Model.cc : .. . .. . Use case : main.cc .. . .. . Project file : example.pro .. . .. . This in fact is what other classes in the Qt universe itself are implemented like .",
"I am not used to C++ container classes and assume I have done something illegal .",
"Is there a chance that some other part of your program is opening that file in a non-shared mode",
"That is similar to including modules in programming language to share the functionality essentially .",
"Furthermore optimization is also important in the core so degrading the performance in the core for corner cases sounds like counter-productive to me .",
"Here goes my solution that could be further extended to support other things too : .. . .. . QtCore .. . .. . testin.xml .. . .. . testout.xml .. . .. . main.cpp .. . .. . main.pro .. . .. . Build and Run .. . .. . QtXml .. . .. . If you still insist on using QtXml for this simple task you could do this : .. . .. . main.cpp .. . .. . main.pro .. . .. . Build and Run .. . .. . Output",
"Please refer to the documentation for details : .. . .. . http : qt-project.org doc qt-5.1 qtcore qsettings.html .. . .. . You could always use other formats as well like XML Json and so forth but generically speaking QSettings is the way or if you are writing a KDE application then probably KConfig .",
"See the QMetaObject documentation http : qt.apidoc.info 5.2.0 qtcore qmetaobject.html invokeMethod for details about it : .. . .. . Invokes the member a signal or a slot name on the object obj .",
"The example of assigning shared classes is included in the docs as well .",
"and opened in a non-gui thread .",
"The source code for these modules will still be available .",
"I would suggest to make notes to yourself what functionality exactly you need from a QVariant and make a judgement call whether it is actually worth dropping QtCore .",
"Qt would guarantee binary and source compatibility during the life cycle of the same major version while boost may not do the same for such a long period as QtCore does .",
"This has been discussed several times since Qt 3 at least and the QtCore maintainer expressed that a while ago no change would happen until Qt 7 if it ever does .",
"You can do that with the following code : .. . .. . json.txt .. . .. . main.cpp .. . .. . Output .. . .. . g++ -Wall -fPIC -I usr include qt -I usr include qt QtCore -I usr include -lQt5Core main.cpp . a.out",
"Therefore I would be writing something like this if I were you : .. . .. . Please check out the QtAlgorithms documentation http : qt.apidoc.info 5.2.0 qtcore qtalgorithms.html qDeleteAll-2 for details .",
"Here s Qt s website about QtMath : .. . .. . http : qt-project.org doc qt-5.1 qtcore qtmath.html details .. . .. . How do I QtMath or what have I done wrong",
"Straight from the Qt documentation http : qt-project.org doc qt-5.0 qtcore qsharedpointer.html we have something like this : .. . .. . You can basically pass your pointer in the same fashion :",
"The overall advantage of these classes is that they are extremely fast compared to other libraries like qjson 4-5 times or even the libjson library written in C",
"These are the two important methods you need to be aware of when dealing with QSettings for reading and writing : .. . .. . Reading http : qt-project.org doc qt-5.1 qtcore qsettings.html value .. . .. . Writing http : qt-project.org doc qt-5.1 qtcore qsettings.html setValue .. . .. . Then you can simply stick to the native format or even ini on your Linux if you prefer : .. . .. . QSettings : : NativeFormat 0 Store the settings using the most appropriate storage format for the platform .",
"I ve checked some system paths Scilab is related to .",
"In short it is a bad idea to use the QtSerialPort module like this .",
"But then I rename it to abstractinterface.h and create module testplugin .",
"I m wondering if Qt provides an alternative to typeid to recognize variable types and get their name in a human-readable format .",
"There is also some QMetaType that you can use for creation but this http : qt-project.org doc qt-5.1 qtcore qmetatype.html typ is a bit different so I am just mentioning here to be complete : .. . .. . int QMetaType : : type const char typeName static .. . .. . Returns a handle to the type called typeName or QMetaType : : UnknownType if there is no such type .",
"I m trying to get ghost to work with python and have followed instructions for installation on http : ghostpy.readthedocs.org en latest but as soon as I run .. . .. . it throws the error .. . .. . Process finished with exit code -1073740771 0xC000041D .. . .. . When I run .. . .. . it gives me .. . .. . suggesting both QTCore and PySide are installed according to instructions .",
".. . If base is 0 the C language convention is used : If the string begins with 0x base 16 is used if the string begins with 0 base 8 is used otherwise base 10 is used .",
"@JoachimPileborg I use QT for Core and Sql and I use a QTimer to refresh the clock .",
"The specific questions : .. . .. . -- Why does it appear a copy is made",
"AFAIK there is not as per my other post http : stackoverflow.com questions 20866996 how-to-compress-slot-calls-when-using-queued-connection-in-qt 20868085 20868085 .",
"But be aware in some other cases .",
"Not sure if it is related to my timezone which is London so no + - hours difference .",
"Try this decorator : .. . .. . See the following documentation http : srinikom.github.io pyside-docs PySide QtCore Slot.html for details as well as this one http : qt-project.org wiki Signals and Slots in PySide : .. . .. . Using QtCore.Slot .. . .. . Slots are assigned and overloaded using the decorator QtCore.Slot .",
"i have created main.pro as you suggested.I got errors like main.moc : 39 : error : Test has not been declared main.moc : 48 : error : Test has not been declared main.moc : 48 : error : non-member function const QMetaObject metaObject cannot have cv-qualifier usr include QtCore qobject.h : In function const QMetaObject metaObject :",
"The exact spelling of the output of typeid : : name is implementation defined and it seems to be giving you a name related to the C++ mangled name for the type .",
"QtWebKit .. . .. . If you already need any other functionality from that module this is not going to introduce any further dependencies and it will be the most convenient for you to use .",
"This may have the answer : stackoverflow.com questions 3730594 http : stackoverflow.com questions 3730594 how-to-convert-a-string-representing-decimal-number-in-exponential-form-to-float",
"Maybe different codecs are used for reading and writing",
"This is how you will get the 12345 value : .. . .. . https : doc.qt.io archives qt-5.5 qwebelement.html toPlainText .. . .. . XML parser in QtCore .. . .. . If you do not need webkit for your sotware and the html data comes in a different way rather than directly from the web for which you would need to use QWebKit then you are better off using the xml parser available in QtCore .",
"I have a base-class that is inherited by two sub classes .",
"To output the numeric value convert to a non-character integer type :",
"Your string may contain non Latin1 characters which leads to undefined data .",
"Recursion into sendPostedEvents is used just like in my other no-internals answer http : stackoverflow.com a 21006207 1329652 .",
"With aggressive optimization it provides binaries that use up less virtual-memory load faster and run faster .",
"If you switch the transport to serial you would lose the message boundaries that UDP provides .",
"I gave a +1 because I think the json support in QtCore is relatively new and it is always good to get more examples but really : I do not suggest using qjson if you are not planning to target Qt 4 and even if you did I would suggest to backport this json feature if it is not yet done .",
"The simplest way is to check every charachter s code QChar : : unicode http : qt-project.org doc qt-5.0 qtcore qchar.html unicode to be below 128 if you need pure 7-bit ASCII https : en.wikipedia.org wiki ASCII .",
"file.txt .. . .. . main.cpp .. . .. . Build .. . .. . g++ -Wall -fPIC -lQt5Core -lQt5Widgets -I usr include qt -I usr include qt QtCore -I usr include qt QtWidgets main.cpp . a.out .. . .. . or the main.pro qmake project file : .. . .. . It will show all the three labels for me but I am not sure if that is what you wanted .",
"You can find further details for that below : .. . .. . http : qt-project.org doc qt-5.1 qtcore implicit-sharing.html .. . .. . Which means I would refactor your code to look like this : .. . .. . Note you also had a typo for myList as you seem to have written myLis .",
"Here is the corresponding Gerrit change : .. . .. . Add qDegreesToRadians and qRadiansToDegrees math functions https : codereview.qt-project.org change 45851 .. . .. . But include QtMath or include QtCore QtMath should just work once you update for sure because there are these lines in the source that I added :",
"Not sure the connection problem is related to your application .",
"This is only used in some backends .",
"@mdurant yes that job is done via nxptest.py module",
"Other than that there is not much of a difference between the two .",
"look this up stackoverflow.com questions 7804955 http : stackoverflow.com questions 7804955 heterogeneous-containers-in-c",
"Taken from stackoverflow.com questions 7114990 http : stackoverflow.com questions 7114990 pseudo-terminal-will-not-be-allocated-because-stdin-is-not-a-terminal .",
"Also you should have QT core testlib so that you do not get the gui added by default .",
"This means you will get a QApplication rather than QCoreApplication since the QT variable contains core and gui by default .",
"The only function you need is toMSecSinceEpoch and you want to import the whole core",
"As I am using Qt any non-ASCII characters are properly saved in a QString but I can t figure out how to determine if any of the characters in that string are non-ASCII before converting the string to ASCII .",
"I wonder what syntax needs to be used to connect the widges to QtGui.QMainWindow",
"The queueing of this event is done by the signal whenever a QueuedConnection is used for the signal-slot connection .",
"There s practically no overhead to copying if both the original and the copy are only used for reading .",
"The Q DECL EXPORT modifier is used in the header-files ."
]
}
|
{
"confidence": [
34.756080627441406,
28.04299545288086,
27.40671157836914,
25.940458297729492,
25.25829315185547,
24.622692108154297,
24.317594528198242,
24.312397003173828,
23.957332611083984,
23.192066192626953,
22.53724479675293,
22.461469650268555,
21.61383819580078,
21.61383819580078,
21.451801300048828,
21.068164825439453,
20.322973251342773,
19.942169189453125,
19.66197967529297,
19.588167190551758
],
"content": [
"Question : Now i am using Qt v2.3 I have one problem i need to send the data to server by using json but Qjson class is not there . How to include JSON to Qt or Is there any external header file for that Comment : The latest version of Qt is version 5 . Are you sure you mean Qt2.3 Comment : Yes Now i am Using Qt creator 2.3 version Comment : @user3472783 : The Qt Creator version IDE is not the Qt version library . Check what Qt is configured inside Creator . .. . Answer : You are probably referring to the QtCreator version as opposed to the Qt . Qt 2.3 would be very old as a framework version used and probably most of the third-party libraries would not work with it anymore anyhow . Just use Qt 5 and that means switch to it if you had not done so yet . You will then get access to the qt json classes in QtCore http : doc.qt.io qt-5 json.html all of a sudden . Basically you will have access to these classes : .. . .. . QJsonArray Encapsulates a JSON array .. . .. . QJsonDocument Way to read and write JSON documents .. . .. . QJsonObject Encapsulates a JSON object .. . .. . QJsonObject : : iterator QJsonObject : : iterator class provides an STL-style non-const iterator for QJsonObject .. . .. . QJsonObject : : const-iterator QJsonObject : : const-iterator class provides an STL-style const-iterator for QJsonObject .. . .. . QJsonParseError Used to report errors during JSON parsing .. . .. . QJsonValue Encapsulates a value in JSON .. . .. . Here you can find a very good example about the usage of these classes more or less : .. . .. . JSON Save Game Example http : doc.qt.io qt-5 qtcore-json-savegame-example.html .. . .. . If you have the Qt 4 series or older you could try to backport these classes if no one had not done so . The overall advantage of these classes is that they are extremely fast compared to other libraries like qjson 4-5 times or even the libjson library written in C This is possible due to the binary format it uses internally to speed up the read and write operation .",
"Question : null .. . Answer : from PyQt4.QtCore import works in PyCharm but doesn t work with Python3 and PyQt4 on the Raspberry Pi . I checked under usr .. . and QtCore is shown . I figure Raspbian doesn t like the .Qtcore so I ve tried to change it to another format from PyQt4 import QtCore Pycharm gives errors that Qt is not defined . The only thing in Pycharm that works is from PyQt4.QtCore import and I ve tried everything I can find . Can anyone tell me why the second part won t work in PyCharm and what the correct format is so it will work under Raspbian Comment : Please edit your question and show the full tracebacks from the errors you are getting . Comment : Of course Qt isn t defined in PyCharm when you use from PyQt4 import QtCore you need to reference it as QtCore.Qt Comment : Thank you Tim that was the problem .",
"Question : I am trying to port a Qt application to C++ using STL . What is the equivalent of QVariant in C++ QVariant can store any data type - a container that holds heterogenous - different types of objects . However I have to port this application to C++ . What is the equivalent of QVariant in C++ Comment : boost : : variant boost : : any Comment : @Borgleader he asked for a STL solution . Comment : @JameyD There arent any that I know of . Comment : look this up stackoverflow.com questions 7804955 http : stackoverflow.com questions 7804955 heterogeneous-containers-in-c .. . Answer : What is the equivalent of QVariant in C++ The equivalent in C++ is called QVariant . Semi-joke aside it is probably the closest to union but QVariant is so much more than that meta types CoW etc . Actually sharing implicitly is forbidden these days in STL so that is another reason why you would not find anything like this off-hand . I would suggest to make notes to yourself what functionality exactly you need from a QVariant and make a judgement call whether it is actually worth dropping QtCore . This is just a friendly reminder from the documentation http : doc-snapshot.qt-project.org qt5-5.4 qvariant.html details : .. . .. . The QVariant class acts like a union for the most common Qt data types . .. . Because C++ forbids unions from including types that have non-default constructors or destructors most interesting Qt classes cannot be used in unions . Without QVariant this would be a problem for QObject : : property and for database work etc . However since C++11 types with constructors and destructors are allowed . You have another question in here to ask from yourself : .. . .. . Do I want to support everything that Qt does or am I happy to require at least C++11 To be fair you could also look into the following boost variants below but then you end up using boost instead of QtCore after the porting . This is another judgement call for yourself . They are not replacements for each other neither technically nor compatibility wise . Boost in this case is a build time dependency while QtCore is a runtime . Qt would guarantee binary and source compatibility during the life cycle of the same major version while boost may not do the same for such a long period as QtCore does . Either way none of these options are pure STL solutions in the end of the day the way I think you wanted it to . Boost.Any http : www.boost.org doc libs develop doc html any.html .. . .. . Boost.Variant http : www.boost.org doc libs 1 57 0 doc html variant.html Comment : Well I went back and forth at the first two lines for couple times until I notice it s a joke...can I down-vote it for wasting my precious time Joke aside nice answer for clarifying difference between Boost and Qt variant . Comment : @Tay2510 : it is not completely joke . If one wants to reinvent QVariant in C++ one needs to write QVariant from scratch . It is telling to tell that there is no such an alternative as it satisfies the use-case what it does . Therefore if one exactly needs one needs to use QVariant . All the rest is compromise not the same .",
"Question : null .. . Answer : Can I copy QtCore folder from QtCreator and use it in my Visual Studio 2013 C++ project I need them to be able include this : .. . .. . .. . Which I found in that QtCore folder . For be able to run this : .. . .. . That function is called like this : .. . .. . Conclusion : .. . Input : char stringDateTime 2000-02-29T12 : 05 : 00+02 : 00 .. . output : double time .. . Process : using function double QDateTime2RatTime const QDateTime qdt Dependencies : Qt I don t have it in my Visual Studio 2013 Question : Can I use QtCore from Qt Creator which I installed latest version . Just copy QtCore folder to my Visual Studio project folder and include headers I need will it work with that binaries Comment : The only function you need is toMSecSinceEpoch and you want to import the whole core Just look at the sources here https : qt.gitorious.org qt qt source 57756e72adf2081137b97f0e689dd16c770d10b1 : src corelib tools qdatetime.cpp if you really need the Qt function and copy the necessary code . However what do you exactly not like about the VS time function https : msdn.microsoft.com en-us library 1f4c8f33.aspx Comment : @BaCaRoZzo I also need QDateTime : : fromString stringDateTime Qt : : ISODate but in fact I just need to convert that damn time 2000-02-29T12 : 05 : 00+02 : 00 to double according this function . If would be able do similar action without the Qt I would be happiest man in da world . But thanks for that links it would be helpful . Comment : Come on pal don t be so negative . You can work things out . You just need to stick the pieces together . : Qt converts date which are in Iso 8601 format you can try to follow the answer here http : stackoverflow.com questions 11768099 parse-json-iso8601-date-in-c-cx or search for a way to convert such format in Visual c++ .",
"Question : I m wondering if Qt provides an alternative to typeid to recognize variable types and get their name in a human-readable format . My specific problem is the following : .. . .. . the idea would be that of generalizing a variable to use as a input to functions . As a side node tyeinfo seems not to be working correctly on my system I m using MinGW on Windows 7 if I try : .. . .. . I get .. . .. . Any suggestion Comment : I think the output for your program is the expected output . If I change the names of the variables i d and f it still gives me those strings . The exact spelling of the output of typeid : : name is implementation defined and it seems to be giving you a name related to the C++ mangled name for the type . That makes a certain amount of sense actually . Comment : Typeinfo is working as designed on your system . Why do you think there s a problem Comment : You may not need Qt for this . Most C++ implementations provide what you need although it is compiler-specific to an extent . Comment : @n.m . I was expecting an output similar to this http : www.cplusplus.com reference typeinfo type info name i.e . int QString double etc...but I understand this is totally compiler dependent . Comment : @LaszloPapp yes and I switched to QVariant thanks : .. . Answer : You could use this http : qt-project.org doc qt-4.8 qvariant.html typeName : .. . .. . const char QVariant : : typeName const .. . .. . Returns the name of the type stored in the variant . The returned strings describe the C++ datatype used to store the data : for example QFont QString or QVariantList . An Invalid variant returns 0 . This will work for POD and registered built-in Qt types . You would need to use the following method http : qt-project.org doc qt-5.0 qtcore qmetatype.html qRegisterMetaType for register your custom type though . int qRegisterMetaType const char typeName .. . .. . One another thing you could try although it is somewhat superfluous to QVariant is to work with Object s QMetaObject in the following way : .. . .. . const char QMetaObject : : className const .. . .. . Returns the class name . and .. . .. . const QMetaObject QObject : : metaObject const virtual .. . .. . Returns a pointer to the meta-object of this object . .. . A meta-object contains information about a class that inherits QObject e.g . class name superclass name properties signals and slots . Every QObject subclass that contains the Q OBJECT macro will have a meta-object . .. . The meta-object information is required by the signal slot connection mechanism and the property system . The inherits function also makes use of the meta-object . .. . If you have no pointer to an actual object instance but still want to access the meta-object of a class you can use staticMetaObject . Needless to say this will only work for QObjects so not for QString etc . You would need to create QObject subclasses . There is also some QMetaType that you can use for creation but this http : qt-project.org doc qt-5.1 qtcore qmetatype.html typ is a bit different so I am just mentioning here to be complete : .. . .. . int QMetaType : : type const char typeName static .. . .. . Returns a handle to the type called typeName or QMetaType : : UnknownType if there is no such type . Here you can find all the types : .. . .. . http : qt-project.org doc qt-5.1 qtcore qmetatype.html Type-enum",
"Question : I m a begginer in network-programming so sorry if my questions may appear a little obvious . I m trying to send some data from Qt application to a Python server which will process them and send back some answer . the methods that allows me to send data in the QTcpSocket class are : .. . .. . my application will manage : authentification sending and receiving some complexe data like struct and files . I ve many questions about this situation : .. . .. . 1 . Are the methods mentioned above sufficient to send complexe data and how 2 . how to deal with the data types in the server-side with Python 3 . do you think I should use an other protocole like HTTP with the QNetworkAccessManager class Comment : Whatever the network method you need to look at serialisation http : en.wikipedia.org wiki Serialisation . Here http : zeromq.github.io pyzmq serialization.html is a brief python use-case though it s not Qt . Comment : Yes a generic byte socket is able to transmit every kind of data but is maybe not the most simple solution . Are both client and server code written by you or is there an existing server and you have to adapt to how it works Comment : @deviantfan yes both client and server are written by me . .. . Answer : I do not think it is the language data structure type that should be differentiated but it is more about the data you send over . Note that different languages may have different language structures and so on . That is just really low-level details . What is more important is what you send . You could look into the following example how the serialization deserialization works with json format in QtCore . Json is also supported in python quite well by the json module so you would have no issue on the server-side to deserialize it : .. . .. . JSON Save Game Example http : qt-project.org doc qt-5 qtcore-savegame-example.html .. . .. . This is basically the important part that would give you some hint on the client-side . Do not get lost at saving into a file . It is basically writing the raw bytes to the file which you would replace by sending over the network : .. . .. . .. . and then you would do something like this on the server-side again instead of reading from file you would read from the network but that is not a biggie as both are IO . You could use raw protocol to design your own or just use an extending . I would suggest to go with something standard like http tcp udp . Then you would only need to define the json format for your own data and not deal with all the rest like one-way or two-way communication transaction identifier against reply attack timestamp data size and so on . This would allow you to truly concentrate on the important stuff for you . Once you have your own json format defined you could look into the QtNetwork module http : qt-project.org doc qt-5 qtnetwork-index.html to send post get put and delete requests as you wish . You would probably work closely with the QNetworkManager http : qt-project.org doc qt-5 qnetworkaccessmanager.html QNetworkReply http : qt-project.org doc qt-5 qnetworkreply.html classes and so on . Here you can find a simple client implementation in Qt with QtCore s json for a simple pastebin functionality : .. . .. . The JSON is defined in here : .. . .. . http : sayakb.github.io sticky-notes pages api .. . .. . For sure it is not the only way of doing it e.g . if you need efficiency you may well look into a binary format like capnproto http : kentonv.github.io capnproto .",
"Question : How can i parse the following HTML .. . .. . I would like to retrive the data 12345 from a span with style font-size : 11px from www.testtest.com but I only want the that very data and nothing else . How can I accomplish this .. . Answer : EDIT : From the Qt 5.6 release blog post https : blog.qt.io blog 2016 03 16 qt-5-6-released : .. . .. . With 5.6 Qt WebKit and Qt Quick 1 will no longer be supported and are dropped from the release . The source code for these modules will still be available . So as of Qt 5.6 unless you re willing to compile the sources QtWebKit is no longer available . If you re using a Qt release older than 5.6 ot are willing to compile QtWebKit this might be helpful otherwise this answer is no longer valid . .. . .. . It is hard to tell you exactly what needs to be done as your explanation is incomplete about the use-case . However there are two ways of proceeding . QtWebKit .. . .. . If you already need any other functionality from that module this is not going to introduce any further dependencies and it will be the most convenient for you to use . You need to get the https : doc.qt.io archives qt-5.5 qwebelement.html .. . .. . That will come once you find the first span element in your html : .. . .. . https : doc.qt.io archives qt-5.5 qwebframe.html findFirstElement .. . .. . Then you can simply get the text for that element with the corresponding QWebElement method s . For instances you can use this one for getting an attribute value : .. . .. . https : doc.qt.io archives qt-5.5 qwebelement.html attribute .. . .. . .. . but you can also request the attribute names as you can see in the documentation etc . This is how you will get the 12345 value : .. . .. . https : doc.qt.io archives qt-5.5 qwebelement.html toPlainText .. . .. . XML parser in QtCore .. . .. . If you do not need webkit for your sotware and the html data comes in a different way rather than directly from the web for which you would need to use QWebKit then you are better off using the xml parser available in QtCore . It still might be the case even if you do not have any other dependency from QtWebKit that this additional dependency will not cause any issues in your use-case . It is hard to tell based upon your description . For sure this would be less convenient albeit not that much compared to the webkit based solution as that is designed for html . What you need to avoid is QtXmlPatterns . It is an unmaintained software as of now and that would introduce an additional dependency for your code either way . Comment : QtWebKit was removed from Qt so this answer is outdated . Is there an alternative to it aside from QtXmlPatterns Comment : Maybe casual regular expression is more suitable than whole browser He just needs some values .",
"Question : In .Net you typically have an app.config file and built-in ways to access the configuration . Is there an equivalent standard approach to configuration using Qt For example lets say my application connects to an online server I want the ability to store the connection details user defined . Is this a case of roll your own or is there a way to store and read these configurations using XML or any other format with easy read-write methods provided by Qt Edit : To add some complication to the question . This is a Linux console app so looking specifically for file based and transparent config please . .. . Answer : You could use QSettings for this . Please refer to the documentation for details : .. . .. . http : qt-project.org doc qt-5.1 qtcore qsettings.html .. . .. . You could always use other formats as well like XML Json and so forth but generically speaking QSettings is the way or if you are writing a KDE application then probably KConfig . These are the two important methods you need to be aware of when dealing with QSettings for reading and writing : .. . .. . Reading http : qt-project.org doc qt-5.1 qtcore qsettings.html value .. . .. . Writing http : qt-project.org doc qt-5.1 qtcore qsettings.html setValue .. . .. . Then you can simply stick to the native format or even ini on your Linux if you prefer : .. . .. . QSettings : : NativeFormat 0 Store the settings using the most appropriate storage format for the platform . On Windows this means the system registry on Mac OS X this means the CFPreferences API on Unix this means textual configuration-files in INI format . Here you can find an example for your convenience : .. . .. . Note the groups are optional and it depends on your exact purpose . You can group settings that way to keep certain ones encapsulated . This may also be important for you to know as per documentation : .. . .. . On Unix systems if the file-format is NativeFormat the following files are used by default : .. . .. . HOME .config MySoft Star Runner.conf Qt for Embedded Linux : HOME Settings MySoft Star Runner.conf .. . .. . HOME .config MySoft.conf Qt for Embedded Linux : HOME Settings MySoft.conf .. . .. . etc xdg MySoft Star Runner.conf .. . .. . etc xdg MySoft.conf",
"Question : null .. . Answer : am getting this error when trying to import QtCore",
"Question : I need to remove a nested multilevel unknown depth tag from a XML file using QDomDocument . What is the proper way of doing this Here is a sample of XML file Comment : Submitted a QDomDocument solution too . Merry Christmas .. . Answer : I would not even use QDomDocument aka . QtXml for this as the stream reader and writer classes are relatively simple to use in QtCore . Here goes my solution that could be further extended to support other things too : .. . .. . QtCore .. . .. . testin.xml .. . .. . testout.xml .. . .. . main.cpp .. . .. . main.pro .. . .. . Build and Run .. . .. . QtXml .. . .. . If you still insist on using QtXml for this simple task you could do this : .. . .. . main.cpp .. . .. . main.pro .. . .. . Build and Run .. . .. . Output Comment : I think I should have included that i MUST do this in QDomDocument since this is only a part of another project which is already implemented using QDomDocument . Comment : You could ve given the answer in two lines without yelling at me so much . You have to remove the child using parent nodes removeChild member function I was trying to do it before using the root elements removeChild function . Thank you for pointing me at the right direction . And you didn t have to give build commands . I said I already implemented some part of the project right Comment : @Madushan : It s not all about you . An answer is also for future readers of your question .",
"Question : I have a json object how can I get object name I can t have object name it will be sent by server and that way I should get the object names . Comment : Are you trying to use the json support in QtCore 5.X or the third-party qjson library Also which qt are you using Comment : I am using qt5.x Comment : I gave a +1 because I think the json support in QtCore is relatively new and it is always good to get more examples but really : I do not suggest using qjson if you are not planning to target Qt 4 and even if you did I would suggest to backport this json feature if it is not yet done . The reason is that it is maintained by a third-party entity rather than the Qt Project so it will probably get less commit and work and also based on Thiago s benchmark it is lotta slower . Personally I do not like it is explicit parser API much either . : .. . Answer : You should use the json support in QtCore with version 5.X . You can do that with the following code : .. . .. . json.txt .. . .. . main.cpp .. . .. . Output .. . .. . g++ -Wall -fPIC -I usr include qt -I usr include qt QtCore -I usr include -lQt5Core main.cpp . a.out Comment : thank you this also work too like qvariantmap iterator . Comment : @BMacit : no worries welcome .",
"Question : I have been trying to add QtMath to my Qt so I can use qDegreesToRadians and such but when I add include QtMath it says no such file or directory . Here s Qt s website about QtMath : .. . .. . http : qt-project.org doc qt-5.1 qtcore qtmath.html details .. . .. . How do I QtMath or what have I done wrong Comment : That function was added in Qt 5.1 and is not available in Qt 5.0.2 . You ll want to upgrade your version of Qt . .. . Answer : I added these functions in 5.1 so you cannot use them in 5.0.2 . See the documentation note about in each corresponding section : .. . .. . This function was introduced in QtCore 5.1 . Here is the corresponding Gerrit change : .. . .. . Add qDegreesToRadians and qRadiansToDegrees math functions https : codereview.qt-project.org change 45851 .. . .. . But include QtMath or include QtCore QtMath should just work once you update for sure because there are these lines in the source that I added : Comment : Hey thanks for answering I am still having the same problems I have updated to Qt 5.2 . I am on KuBuntu and I do not understand why it didn t work . My friend has the same OS and his QtMath works though he has 5.1 Any other ideas Comment : @user3498383 : what do you mean it did not work Would it be possible to show the error and the corresponding code Comment : It still says it has no such file or directory",
"Question : I m trying to get ghost to work with python and have followed instructions for installation on http : ghostpy.readthedocs.org en latest but as soon as I run .. . .. . it throws the error .. . .. . Process finished with exit code -1073740771 0xC000041D .. . .. . When I run .. . .. . it gives me .. . .. . suggesting both QTCore and PySide are installed according to instructions . Does anyone know how to troubleshoot this I m using Python 3.4 and together with pycharm 4.0.5 . .. . Answer : You typed gh Ghost without parentheses . It should be as such : .. . .. . From the docs :",
"Question : Consider the following code : .. . .. . Is the assumption that the entries with the same keys are returned consecutively by the iterator Thank you in advance . .. . Answer : Is the assumption that the entries with the same keys are returned consecutively by the iterator Yes . See the code below demonstrating this . main.cpp .. . .. . Output .. . .. . g++ -Wall -fPIC -lQt5Core -I usr include qt QtCore -I usr include qt main.cpp . a.out",
"Question : I m trying to slog my way through building an application to talk to a linescan camera . Ultimately I want to pass a block i.e . array of 384x128 unsigned short values every 100ms from a QThread data-acquisition to a QRunnable data-processing . This means the QRunnable will have 100ms to process the data before the next block arrives . I m still not sure the right way to move the data around . Right now I m using a QVector . In Qt4 I understand implicit sharing to mean that a QVector would not be copied if emitted in a signal until the object is written upon . However in a small test application I made I am not sure I understand exactly what that means . Here is the output of the MWE provided below.. . I am using a dummy QVector with four values and tracking the address of the vector as the thread runs . The data is correct throughout but it seems a copy is made . I am not changing the data at any point in the application.. . just displaying . I ve tried using const QVector unsigned short throughout various iterations of using references etc . The address always changes . Since performance will be important here I m concerned about making copies of the QVector when 384 128 values . Also in another SO question I am struggling with figuring out how to have the QRunnable receive the data that is all left out of this example . But that is important to note here because my idea is to have the QRunnable operate on the reference to the image buffer that lives in the QThread . I just haven t figured out how to do that . The specific questions : .. . .. . -- Why does it appear a copy is made Is this because of multithreading -- Do I have to explicitly use references i.e . image buffer throughout thereby removing QVector entirely Or should I worry about the copies -- What is the right way to pass data from QThread to QRunnable for my situation MWE below to demonstrate the different addresses . Disclaimer : I m learning C++ as I go . No formal training just a few good books in front of me . main.cpp .. . .. . appwidget.h .. . .. . appwidget.cpp .. . .. . acquire.h .. . .. . acquire.cpp Comment : Your debug code is incorrect . display buffer returns the pointer to the object itself . It s not surprising that it will be different in your case . If you want a pointer to the QVariant s internal array use display buffer.constData . Comment : @PavelStrakhov That was exactly it . The addresses now match in my debug output.. . in the QThread the GUI Thread and in the QRunnable . Excellent . Acquire thread : block acquired : 0x105501010 GUI thread : received signal : 0x105501010 Algorithm thread : 0x105501010 .. . Answer : Copies will be made in this case both because you are passing by value and because signals across thread boundaries are queued . That s fine though because implicit-sharing http : qt-project.org doc qt-5.1 qtcore implicit-sharing.html implicitly-shared means they are shallow copies . There s practically no overhead to copying if both the original and the copy are only used for reading . Unfortunately that s not actually the case in your program . Your forever loop will modify the vector when it loops back around after signal emission . In this example it won t actually change anything in the vector since you re always just assigning 1 2 3 4 but calling the non-const operator is enough to trigger the deep-copy . My conclusion is this : you can be synchronous and share the same buffer between your readers and writers or you can be asynchronous and give a copy of your write buffer to your readers . You cannot be asynchronous and share the same buffer between your readers and your writers . The way you re handling this seems fine for asynchronous processing . Depending on the characteristics of your data generation and data-processing you may or may not find a synchronous solution to be better . The easiest way to make your asynchronous code synchronous is to supply the connection type as Qt : : BlockingQueuedConnection http : qt-project.org doc qt-5.1 qtcore qt.html ConnectionType-enum on connect http : qt-project.org doc qt-5.1 qtcore qobject.html connect . Comment : I d actually prefer to pass-by-reference . I just couldn t get it working . Also I m fine with synchronous processing if I understand synchronous as applied to my application since I ll necessarily need to find a way to finish processing the block of data acquired before the next is available 100ms which seems doable . However I am also not able to figure out how to access what I m calling image buffer even by reference in the QRunnable.. . it lives in QThread . I believe in that instance the signal would just indicate a block is available and pass reference Any advice Comment : Unless AppWidget : : processBlock is going to be modifying the vector there s basically no point in passing by reference rather than by value . But if you absolutely must you can emit a signal with a pointer . You ll need qRegisterMetaType QVector unsigned short QVector unsigned short and emit blockAcquired display buffer .",
"Question : I ve a multi-user supporting server which is based on qxmpp library written in Qt and exdended by inheriting QXmppServerExtension . So my question is : Considering multi-user support in my server whether it s safe or not to use a Singletone class for database-connection and holding a connection for QSqlQuery Since all the extensions that work via database use it respectively . Comment : Why would you prefer singleton over multiton Comment : Cause I would like to save memory in server-side . Comment : Do you have concrete benchmarks how much you would save with it Comment : Actually not : Comment : That is about 220 MB for 16 GB ram . Do you agree that it is negligible unless you have other operations heavily using the memory but in that case this might not be the best place to look for optimization .. . Answer : You can read more about singletons in general why they are considered bad in many cases : .. . .. . What is so bad about Singletons http : stackoverflow.com questions 137975 what-is-so-bad-about-singletons .. . .. . I would personally avoid them in your without the context more . The only reason you bought up so far for singletons rather than passing references or that kind around you would spare some memory for the server service . Based on the discussion it is always better to make sure you have some benchmark in-place when the complexity difference is not obvious . In your special case with additional 216K memory for about 1000 clients you would get about 250 MB additional memory usage . I am rounding this number up a bit just in case . This is in no way comparable to the capacity of your server which seems to be about 16 GB . If you have other memory hungry services those would probably be a more offending place to look into optimization . That being said if you wish to go for singletons you could implement that on top of the Q GLOBAL STATIC http : qt-project.org doc qt-5.1 qtcore qglobalstatic.html Q GLOBAL STATIC or Q GLOBAL STATIC WITH ARGS http : qt-project.org doc qt-5.1 qtcore qglobalstatic.html Q GLOBAL STATIC WITH ARGS macros in Qt . Note that this was also public in Qt 4 although undocumented . As far as I know it did not have proper thread-safety in Qt 4 though which was significantly improved in Qt 5 .",
"Question : I want to detect if the user has inputted a non-ASCII otherwise incorrectly known as Unicode character for example in a file save dialog box . As I am using Qt any non-ASCII characters are properly saved in a QString but I can t figure out how to determine if any of the characters in that string are non-ASCII before converting the string to ASCII . That character above ends up getting written to the filesystem as . Comment : Once I had an isAscii proposal but thiago did not like it . You could have written if myString.at x .isAcii then.. . I guess you will eventually need to use the low-level isascii etc yourself . Comment : Do you mean that creating a file with name makes it save-as If so what are you using to create the file Comment : Well ASCII characters are Unicode but that s being a bit pedantic . For your purposes any character with a value greater than 127 0x7F is Unicode . Comment : But note that you can choose to write files as UTF8 in which case if later read with the same attribute all characters will be preserved . .. . Answer : The simplest way is to check every charachter s code QChar : : unicode http : qt-project.org doc qt-5.0 qtcore qchar.html unicode to be below 128 if you need pure 7-bit ASCII https : en.wikipedia.org wiki ASCII .",
"Question : I currently have something like this : .. . .. . Now I have a raw pointer to foo as well called rawfoo . How can I make foo point own the raw pointer and start pointing to it . I know in boost with shared pointers we could use boost : : make shared how do we do it with QSharedPointer I want to do something like this : .. . Answer : Straight from the Qt documentation http : qt-project.org doc qt-5.0 qtcore qsharedpointer.html we have something like this : .. . .. . You can basically pass your pointer in the same fashion :",
"Question : How I can change this code Error : .. . .. . no match for operator operand types are QStringList and QString .. . .. . does not work too : myList is Empty after this . .. . Answer : There is little to no point in using a pointer for a QStringList because this is an implicitly shared class due to the copy-on-write . You can find further details for that below : .. . .. . http : qt-project.org doc qt-5.1 qtcore implicit-sharing.html .. . .. . Which means I would refactor your code to look like this : .. . .. . Note you also had a typo for myList as you seem to have written myLis . That is at least one syntax-error which would lead to compilation error . You could also use the C++11 syntax for this if you have support for that : .. . .. . This will come to handy when you will have more elements to insert without continuous append lines separately . However if you are still interested in doing this for some reason you should consider this : .. . .. . or as a last resort even your line should work if you had not done any other mistakes . This should be the whole code to see if you had done any other mistakes : .. . .. . main.cpp .. . .. . Building something similar .. . .. . Output",
"Question : I am new to Qt . I am trying to compile a small code snippet shown below : .. . .. . I am trying to run it through command-line using the following command : .. . .. . However I am getting the following error : .. . .. . I think I need to include the library for QObject but I am not really sure . Any ideas Comment : @Laszlo Papp I tried with your suggestion but its giving wierd errors that too in main.moc file..Is there any library for QObject . Comment : i have created main.pro as you suggested.I got errors like main.moc : 39 : error : Test has not been declared main.moc : 48 : error : Test has not been declared main.moc : 48 : error : non-member function const QMetaObject metaObject cannot have cv-qualifier usr include QtCore qobject.h : In function const QMetaObject metaObject : Comment : @Laszlo Papp : -- Thank you for help . I have tried with clean environment and it works . .. . Answer : You are not using the meta object compiler aka . moc properly . You have a QObject in the source as opposed to the header so instead of including the header into the HEADERS variable for qmake you will need to include the generated moc file in your source code as demonstrated below . Please note that you should add the Q OBJECT macro to your Q OBJECT in general due to the propeties signals and slots that it makes available . This is not strictly necessary to fix this issue but it is better if you are aware of this . main.cpp .. . .. . main.pro .. . .. . Build and Run Comment : HEADERS + main.cpp is missing which instruct qt to run moc tool on this file . Comment : @MarekR : uh you should not mix up headers and sources . Also note that the user was actually using command-line rather than qmake . My answer will work with that too just fine . In general HEADERS was not designed for being the primary interface moc . It just comes as an additional convenience . Do not abuse it . : - Comment : Yes I m aware that this is a hack but it is necessary if you do not have explicit header file for classes where moc tool is needed . Without it your example will not work . Comment : @MarekR : have you actually tried to run it It does work and should work fine . I am afraid you are misunderstanding something ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
qtcore
|
UNK_RELATION
|
scsi@scsi@41
|
scsi -- small computer system interface @placeholder pronounced skuz-ee is a set of standards for physically connecting and transferring data between computers and peripheral devices .
|
{
"confidence": [
35.80186080932617,
33.67669677734375,
32.94013595581055,
30.206682205200195,
30.140892028808594,
30.140892028808594,
29.859853744506836,
29.525890350341797,
29.371158599853516,
29.293556213378906,
29.246795654296875,
29.243288040161133,
28.751949310302734,
28.60500144958496,
28.379003524780273,
28.130653381347656,
28.130653381347656,
27.842350006103516,
27.734939575195312,
27.73186492919922,
27.411510467529297,
27.2606258392334,
26.972352981567383,
26.618770599365234,
26.618770599365234,
26.618770599365234,
26.56975555419922,
26.351539611816406,
26.079830169677734,
26.037010192871094,
26.037010192871094,
25.97399139404297,
25.952762603759766,
25.671653747558594,
25.523832321166992,
25.473175048828125,
25.272865295410156,
25.142913818359375,
25.00577163696289,
24.968475341796875,
24.882766723632812,
24.767948150634766,
24.648067474365234,
24.648067474365234,
24.648067474365234,
24.648067474365234,
24.602317810058594,
24.582275390625,
24.582275390625,
24.582275390625,
24.582275390625,
24.172996520996094,
24.16641616821289,
24.150352478027344,
24.074697494506836,
24.05168914794922,
24.026769638061523,
24.026769638061523,
24.026769638061523,
24.026769638061523,
24.026769638061523,
24.026769638061523,
23.893856048583984,
23.828290939331055,
23.828290939331055,
23.828290939331055,
23.627981185913086,
23.620830535888672,
23.360042572021484,
23.335899353027344,
23.323593139648438,
23.03302764892578,
22.935544967651367,
22.880775451660156,
22.548751831054688,
22.53675651550293,
22.53675651550293,
22.514888763427734,
22.514888763427734,
22.514888763427734,
22.514888763427734,
22.514888763427734,
22.514888763427734,
22.514888763427734,
22.514888763427734,
22.514888763427734,
22.23236846923828,
22.16610336303711,
22.123275756835938,
22.123275756835938,
22.123275756835938,
22.039764404296875,
21.9759464263916,
21.715160369873047,
21.715160369873047,
21.611408233642578,
21.480979919433594,
21.423664093017578,
21.423664093017578
],
"content": [
"The SCSI standards such as the SAM-5 SCSI Architecture document state that a single SCSI device can have multiple target ports and also multiple logical units .",
"no scsi is present at proc scsi in my system",
"In practice there are many KCQ values which are common between different SCSI device types and different SCSI device vendors .",
"link-to a github repository called python-scsi Python classes to access SG IO scsi devices",
"In very simple terms ASCQ codes are typically present in Response frames from SCSI target devices .",
"Do SCSI devices in the real world actually provide multiple target ports and multiple logical units",
"There is a need for me to access a SCSI device with logical unit number LUN more than 255.According to my knowledge we can t see SCSI devices with lun more than 255 .",
"the scsi interface reports errors back to the kernel .",
"I m developing a SCSI target software and I m new to SCSI and I need to return correct sense data to tell initiator that its request didn t go through because data were protected from writing .",
"So when the SCSI standards refer to a device having multiple target ports that means it will actually have multiple physical connections to the underlying bus network",
"I am reading the SCSI SPC4r22 .",
"The sg3 utils package contains utilities that send SCSI commands to devices .",
"When a SCSI target device returns a check condition in response to a command the initiator usually then issues a SCSI Request Sense command .",
"It will set the SCSI Controller type to required type.. . thanks.. .",
"Do you know an example implementation of scsi read or writes with the scsi generic interface",
"I m trying to understand the low-level details of SCSI .",
"I m working on implementation of the SCSI EXTENDED COPY command .",
"On my Ubuntu 14 system the following command prints the CD-ROM entry that s in proc scsi scsi : .. . .. . grep -B2 CD proc scsi scsi .. . .. . That is on my system it prints .. . .. . If what you want is the string scsi1 use awk cut grep sed perl or whatever to isolate it out .",
"It seems that either just a port-number or just a logical unit number would be enough to perform the needed multiplexing so a single SCSI interface can provide access to multiple data sources sinks .",
"This page also describes their purpose titled : SCSI Additional Sense Data http : www.t10.org lists 2asc.htm .",
"SCSI Additional Sense Data takes the form of two value encoded bytes in the sense data typically returned by the REQUEST SENSE command .",
"I use the Linux generic SCSI interface to send the commands .",
"Again from RFC 3720 : .. . .. . .. . c I T nexus - a relationship between a SCSI Initiator Port and a .. . SCSI Target Port according to SAM2 .",
"Key Code Qualifier is an error-code returned by a SCSI device .",
"This process is part of a SCSI protocol called Contingent Allegiance Condition .",
"I implemented some self-defined scsi commands in one usb device .",
"I have tried to set the description attributes of SCSI Controller by using .. . .. . but it is not working .",
"I d like to make a Win32 SCSI Passthrough Interface call from C and am struggling to set up the proper declarations to make the call .",
"See the clause describing the REQUEST SENSE command in the SCSI Primary Commands - 4 SPC-4 draft standard or later for more information about sense data .",
"Can some one help me out in finding the default SCSI timeouts for the connected devices disks",
"So I dug around in linux for a while and there is a sd read block limits function that seems to gets called when scsi devices are mounted .",
"1 open SCSI device .",
"In SCSI Interface errors are recognized by concatenation of 3 numbers : SenseKey + ASC + ASCQ .",
"However the SCSI Inquiry and other commnads fail .",
"Regarding extra headers over SCSI there is a negotiation process which is not SCSI .",
"If the SCSI target implements the ability to set this bit it must be able to return either of the sense formats .",
"The SCSI reference manual defines two types of sense data formats - fixed and variable descriptor-based ones chapter 2.4 .",
"CHS addressing isn t supported by SCSI .",
"This is my scsi read : .. . .. . And this is my scsi write : .. . .. . In the following example I do .. . .. . 1 . scsi read .. . 2 . scsi write .. . 3 . scsi read .. . .. . And I print the hexdumps of the data which is written scsi write and what is read scsi read .. . .. . fter running the three commands again I should read Abcdefg with the first read .",
"I do have Logic Audio Platinium that sends those SCSI commands but don t know how to read and interpret SCSI Command Description Blocks .",
"At that point the headers will be specific to SCSI .",
"I want to get the SCSI ID of the CD-R CD-ROM using the command.As well as I want to check that scsi board is installed properly or not on the system using command in korn shell script .",
"Also see linux rescan scsi bus http : thornelabs.net 2012 08 22 linux-rescan-scsi-bus.html",
"Keep in mind that the reason that SCSI has multiple sizes of commands like this is in many cases because SCSI is a very old protocol .",
"When you get a SCSI error you should get a SCSI check condition .",
"http : en.wikipedia.org wiki SCSI has some general information on SCSI commands in case you aren t familiar .",
"You will have to build up a data interface because your SCSI layer must ask your target layer to receive data transmit data handle TMF s and so on .",
"I want to use Write Buffer SCSI command to upload a firmware of a tape drive LTO-6 .",
"Can I access the volumes SCSI device using flat space addressing in Ubuntu",
"I am looking for a scsi command that I can use to get device max link capability .",
"Can I use scsi MODE SENSE page 19 to read the phy descriptors and get the link speed",
"For commands like Security Receive and Security Send we are using their support of SCSI-NVME Translation in which a SCSI command is sent from the host and is translated to NVME command by the SCSI kernel stack and then sent to the drive .",
"I am using DeviceIoControl in Windows to send IOCTL SCSI PASS THROUGH DIRECT commands in order to issue SCSI inqueries for reading specific pages on physical hard disk devices with vendor-specific data .",
"Just to rephrase the question again I want to know how a namespace Identifier is set via SCSI Command whenever we use SCSI-NVME Translation approach to send Commands to NVME Drive .",
"You can use libudev http : www.kernel.org pub linux utils kernel hotplug libudev to find SCSI devices and read the vendor attribute untested :",
"SCSI IDE are also implemented in modules .",
"I am trying to execute scsi inquiry command .",
"To read I implement the read 10 command in SCSI .",
"And using SCSI to read a mass storage device .",
"2 Send SCSI command inquiry by ioctl .",
"I m looking for references of vendor-specific SCSI commands .",
"I have one HDD SATA that is controlled by SCSI .",
"For ISCSI you need 48 byte for BHS And for SCSI its CDB contained in BHS and its data is in data seg .",
"The ops seem to be set here http : lxr.free-electrons.com source drivers scsi sr.c L701 at the probe .",
"In the SCSI command set the read command is called read 10 with 1 denoting the size of the command .",
"The SCSI-NVME Translation Spec that I am using does not talk about how NameSpace Identifier is set in CDB .",
"So here s the background : .. . .. . I ve got this SCSI device with media that has raw data on it for simplicity let s say it contains abc123 .",
"My question is about this bit interpretation on the SCSI target side - is the target server obligated to return sense data in the descriptor format if this bit is 1",
"I m asking this question cause I m working on some piece of software which is supposed to simulate a SCSI target so I need to digest multiple SCSI documents to make it right .",
"There s a list of these codes here on the T10.org website under the page titled : SCSI ASC ASCQ Assignments http : www.t10.org lists asc-num.htm .",
"Check the scsi sg.h header file in your distribution to be sure but I believe that 2.4.21 is late enough in the 2.4 series that the SCSI timeout is 60 seconds .",
"The first byte of the sense data can be used to determine its format so the SCSI initiator doesn t actually need the D SENSE bit value to decide how to decode the received sense data .",
"Clearly you know how to send SCSI commands .",
"For iSCSI this .. . relationship is a session defined as a relationship between .. . an iSCSI Initiator s end of the session SCSI Initiator Port .. . and the iSCSI Target s Portal Group .",
"stackoverflow.com questions 11867612 http : stackoverflow.com questions 11867612 scsi-read-10-and-write-10-with-the-scsi-generic-interface and pcguide.com ref hdd bios modesLBA-c.html http : www.pcguide.com ref hdd bios modesLBA-c.html Its seems these links are useful to you",
"Question : How much overhead is introduced by iSCSI and SCSI in the transfer of the data to read or write",
"I recognize that SCSI Protocol Data Units PDU are packed into TCP datagrams by some algorithm but I m unsure of that algorithm .",
"Yes with SCSI-2 SPC-2 reservations it would result in a conflict .",
"In common usage in SCSI a sector is the same as a Logical Block Address .",
"All of those integer fields in the typical SCSI commands are in big-endian format .",
"i am using SAT scsi ata translation with SCSI PASS THROUGH .",
"I don t have all relevant SCSI Specs in front of me .",
"This structure also has a .status member which contains the SCSI Status code .",
"The byte order for those SCSI length fields is AFAIK big endian .",
"How can I get the vendor name of SCSI device on linux c",
"To achieve that goal I use SCSI command ATA PASS THROUGH 16 .",
"I m attempting to send a scsi ReadCapacity16 0x9E to a volume on Windows using D . The CDBs are to spec and my ReadCapacity16 works on Linux and scsi Inquiries work on Windows .",
"The target will respond to the Request Sense command with a set of SCSI sense data which includes three fields giving increasing levels of detail about the error : .. . .. . K - sense key - 4 bits byte 2 of Fixed sense data format .. . C - additional sense code ASC - 8 bits byte 12 of Fixed sense data format .. . Q - additional sense code qualifier ASCQ - 8 bits byte 13 of Fixed sense data format .. . .. . The initiator can take action based on just the K field which indicates if the error is minor or major .",
"The SCSI target may choose to only provide this bit for reading and not writing and then it dictates what format it returns .",
"You can look at my libscsicmd library that has full parsing of scsi sense .",
"But now I would like to read from it s SCSI bus in a software solution .",
"You would then write interface routines for your system .",
"And the board I am working on is little endian I have taken care of the data transmission sequence for SCSI commands by which I mean the endianess .",
"2 afaik there is a universal standard for scsi packets check wikipedia : http : en.wikipedia.org wiki SCSI SCSI command protocol 3 the packets are firmware and can only be modified through painstaking disassembly",
"I used these articles as a reference : .. . .. . http : www.tldp.org HOWTO SCSI-Generic-HOWTO write.html http : www.tldp.org HOWTO SCSI-Generic-HOWTO read.html .. . .. . ...and wrote such code : .. . .. . But this code results in a trash in a status fields as well as in a sense buffer :",
"Many devices transfer chunks of data of predefined length .",
"This particular ARM system has a boot loader which can load a system over USB by emulating a Mass storage device and implementing some vendor SCSI opcodes which allow the host to write information to memory .",
"I am working on making this example work with different scsi commands .",
"I do not have any documentation for the SCSI commands that need to be sent ."
]
}
|
{
"confidence": [
45.69676971435547,
38.325992584228516,
37.14950180053711,
36.2679443359375,
36.000701904296875,
35.90647888183594,
35.505531311035156,
33.92549133300781,
33.45896911621094,
33.21543884277344,
33.09137725830078,
33.09137725830078,
32.93286895751953,
32.90676498413086,
32.53999710083008,
32.34553527832031,
32.21134948730469,
32.11939239501953,
31.775409698486328,
31.291339874267578
],
"content": [
"Question : I m trying to understand the low-level details of SCSI . The SCSI standards such as the SAM-5 SCSI Architecture document state that a single SCSI device can have multiple target ports and also multiple logical units . When an initiator sends a request to read-write data to a target it needs to specify both the desired target port and the logical unit number . It seems that either just a port-number or just a logical unit number would be enough to perform the needed multiplexing so a single SCSI interface can provide access to multiple data sources sinks . Do SCSI devices in the real world actually provide multiple target ports and multiple logical units If you can provide an example of a device which has multiple target ports and one which has multiple logical units giving an idea of what ports LUNs are used for in practice that would be very helpful . .. . Answer : Any SAN device provides multiple ports multiple FC ports and or multiple iSCSI ports and also provides multiple LUNs over each of these ports . The exposed LUNs may differ from port to port and the mapping of LUN ID to a volume may differ between the ports so LUN 1 may be volume 23 on port FC1 and LUN 3 on port iSCSI 2 . The port is the physical connection to the world . The LUN is a logical identifier for a volume on a port . The volume is the logical entity that is exposed to the world through the LUN and port mappings . Comment : Thanks So when the SCSI standards refer to a device having multiple target ports that means it will actually have multiple physical connections to the underlying bus network Comment : Yes multiple ports target or initiator mean multiple physical connections to the same fabric . Sometimes you can get multiple logical connections too and they may also be considered different ports . Consider VLANs and different IP Port for iSCSI . Comment : The same logical unit can be exposed to the world via multiple physical ports right It s called a multi-path I O . Please see en.wikipedia.org wiki Multipath I O http : en.wikipedia.org wiki Multipath I O . Do I understand that correctly Comment : Yes . A single LUN can be exposed through multiple ports for multipathing .",
"Question : I m developing a SCSI target software and I m new to SCSI and I need to return correct sense data to tell initiator that its request didn t go through because data were protected from writing . I m looking at the piece of table from T10.org describing these codes : .. . .. . What s the meaning of these various ASCQ codes I couldn t find any explanations anywhere . Three or four words like PERSISTENT WRITE PROTECT is a max what I can find . I d like to know something like if you have a situation like this then you need to use ASCQ that . .. . Answer : In very simple terms ASCQ codes are typically present in Response frames from SCSI target devices . ASCQ code describes additional sense data or typically known as reasons for certain condition occurred in the device .",
"Question : I m developing a SCSI target software and I m new to SCSI and I need to return correct sense data to tell initiator that its request didn t go through because data were protected from writing . I m looking at the piece of table from T10.org describing these codes : .. . .. . What s the meaning of these various ASCQ codes I couldn t find any explanations anywhere . Three or four words like PERSISTENT WRITE PROTECT is a max what I can find . I d like to know something like if you have a situation like this then you need to use ASCQ that . .. . Answer : There s a list of these codes here on the T10.org website under the page titled : SCSI ASC ASCQ Assignments http : www.t10.org lists asc-num.htm . This page also describes their purpose titled : SCSI Additional Sense Data http : www.t10.org lists 2asc.htm . SCSI Additional Sense Data takes the form of two value encoded bytes in the sense data typically returned by the REQUEST SENSE command . The additional sense code ASC byte indicates information about the error exception reported in the sense key field . The additional sense code qualifier ASCQ indicates detailed information related to the additional sense code . See the clause describing the REQUEST SENSE command in the SCSI Primary Commands - 4 SPC-4 draft standard or later for more information about sense data . .. . Descriptions of the assigned ASC and ASCQ values and their coded meanings are organized in tables that are sorted numerically based on the ASC ASCQ values or alphabetically based on the text describing the error or exception indicated by the ASC ASCQ pair . An explanation of the ASC ASCQ table format http : www.t10.org lists 8asc-xpl.htm is available if you are unfamiliar with these tables . Additionally I d take a look at the Wikipedia page topic titled : Key Code Qualifier https : en.wikipedia.org wiki Key Code Qualifier which had this to say about these codes . Key Code Qualifier is an error-code returned by a SCSI device . When a SCSI target device returns a check condition in response to a command the initiator usually then issues a SCSI Request Sense command . This process is part of a SCSI protocol called Contingent Allegiance Condition . The target will respond to the Request Sense command with a set of SCSI sense data which includes three fields giving increasing levels of detail about the error : .. . .. . K - sense key - 4 bits byte 2 of Fixed sense data format .. . C - additional sense code ASC - 8 bits byte 12 of Fixed sense data format .. . Q - additional sense code qualifier ASCQ - 8 bits byte 13 of Fixed sense data format .. . .. . The initiator can take action based on just the K field which indicates if the error is minor or major . However all three fields are usually logically combined into a 20 bit field called Key Code Qualifier or KCQ . The specification for the target device will define the list of possible KCQ values . In practice there are many KCQ values which are common between different SCSI device types and different SCSI device vendors . Common values are listed below you should consult your hardware specific documentation as well . Comment : Sorry to say these pages contain only three or four words per ASC ASCQ but I needed more detailed explanation actually I ve copied a part of a page from T10.org to my question . Comment : @AlekseyYakovlev - see update and let me know if the edit helps .",
"Question : Does iSCSI introduce any layers other than the TCP-headers themselves on top of the SCSI packet Are there any reference manuals for iSCSI other than the RFC itself I need this information for controlling a RF-receiver over a Paralan iSCSI-to-SCSI-converter . Comment : Related question : stackoverflow.com questions 11211794 http : stackoverflow.com questions 11211794 iscsi-data-transport-packet-overhead .. . Answer : Everything is TCP . iSCSI has its own headers in the PDUs . Authentication and authorization are not required by iSCSI . But the initiator and or target is allowed require authentication . Regarding extra headers over SCSI there is a negotiation process which is not SCSI . Once the negotiation is over iSCSI enters full feature phase . At that point the headers will be specific to SCSI . Since it is just TCP then it should pass directly through to your converter . But you converter will probably need to handle the negotiation process . Once it enters full feature phase you will have to deal with too much to describe here it is not a simple matter of just passing SCSI stuff . Basically a converter would be an iSCSI Target and then the CDB LUN TMF s etc are passed to the SCSI layer . You will have to build up a data interface because your SCSI layer must ask your target layer to receive data transmit data handle TMF s and so on . It is the most complex driver I have ever written . If you need a layer I could supply you one that is system independent . You would then write interface routines for your system .",
"Question : null .. . Answer : We are developing an application to manage NVME Devices in Windows 10 . We are not supposed to use our own driver to talk to drives so for sending most of the commands we have to rely on whatever is available from Windows 10 . For commands like Security Receive and Security Send we are using their support of SCSI-NVME Translation in which a SCSI command is sent from the host and is translated to NVME command by the SCSI kernel stack and then sent to the drive . We can see the commands are reaching the drive but the translation is not able to send the correct namespace identifier to the drive in case of the Security Receive command and therefore SCSI is returning a error in sense data as Access denied Invalid LU Identifier . SCSI-NVME translation does not allow setting a namespace identifier field in its CDB . Is there any other way for setting this namespace identifier in the SCSI command that we are sending from the host side Or is this a driver error that its sending incorrect data to the drive Other APIs of Microsoft like Storage Query Property set this namespace ID by themselves and we don t have to set this from user side . If anybody who has worked in similar kind of environment can help us out it will be very helpful . Comment : Just to rephrase the question again I want to know how a namespace Identifier is set via SCSI Command whenever we use SCSI-NVME Translation approach to send Commands to NVME Drive . The SCSI-NVME Translation Spec that I am using does not talk about how NameSpace Identifier is set in CDB . Namespace Identifier is an important field in NVME Command Structure . Comment : Improved formatting and wording . Comment : Ok I will take care next time . Comment : I m not sure why this is downvoted . At least the way it stands now it seems relatively clear - though I don t have an answer for you",
"Question : Which case would be considered correct 1 . Doing reads with a Read 16 command no matter if the LBA s are 32 or 64 bit . 2 . If the max LBA is 32-bit then do a Read 10 command and if the max LBA is 64 bit then do a Read 16 command . What are the pros and cons of each choice I know for a Read Capacity command it is correct to run a 10 and if it returns FFFFFFFFh then run a 16 . Why is this the case The Read Capacity 16 command works for both cases and avoids even needing the Read Capacity 10 at all . .. . Answer : Keep in mind that the reason that SCSI has multiple sizes of commands like this is in many cases because SCSI is a very old protocol . It was first standardized in 1986 and was in development for some time before that At the time a large SCSI device would range in the low hundreds of megabytes even a 32-bit LBA was considered excessive at the time . The 64-bit LBA commands simply didn t exist until much later . The question here is really just whether you want to support these old devices . If you do you will need to use Read 10 for reads on small devices as they may not recognize Read 16 . Similarly the use of Read Capacity 10 before Read Capacity 16 is because older devices won t recognize the larger version . Comment : So the older devices are where the issue lies.. . If it is a new device even if the LBA is 32-bit or less the Read 16 and Read Capacity 16 will be fine Comment : In most cases yes that should be correct . Comment : Thanks I will leave the Read 10 in the code . I will use the 16 and make changes as necessary . I am testing pretty new drives for throughput and latency . Is there any difference you would expect as far as that goes Comment : I would be very surprised if there was a difference in performance between the 10 and 16-byte READ CDBs . I think you d be fine just to use READ 16 exclusively . Comment : @gubblebozer Not all devices especially older devices support READ 16 . You ll get better compatibility results if you avoid it when not necessary .",
"Question : Is it possible for multiple computers to connect to the same target at the same time using the same initiator IQN Thank you . .. . Answer : It s not a good idea . From RFC 3720 http : www.ietf.org rfc rfc3720.txt : .. . .. . .. . a iSCSI names are globally unique . No two initiators or targets .. . can have the same name . .. . .. . You may find that duplicate IQN s may work on a given target . But even then you must ensure that the iSCSI session ID s can not overlap or the target may get very confused . The combination of IQN iSCSI session ID and target form the I T nexus that the target will use to keep track of things . Again from RFC 3720 : .. . .. . .. . c I T nexus - a relationship between a SCSI Initiator Port and a .. . SCSI Target Port according to SAM2 . For iSCSI this .. . relationship is a session defined as a relationship between .. . an iSCSI Initiator s end of the session SCSI Initiator Port .. . and the iSCSI Target s Portal Group . The I T nexus can be .. . identified by the conjunction of the SCSI port names or by the .. . iSCSI session identifier SSID . iSCSI defines the I T nexus .. . identifier to be the tuple iSCSI Initiator Name + i + ISID .. . iSCSI Target Name + t + Portal Group Tag . .. . .. . This nexus object must be unique .",
"Question : The SCSI reference manual defines two types of sense data formats - fixed and variable descriptor-based ones chapter 2.4 . The Control Mode Page 0Ah 4.3.8 which is supposed to be returned as a response to the MODE SENSE SCSI command contains a D SENSE bit which is defined as : .. . .. . D SENSE DESCRIPTOR FORMAT SENSE DATA bit .. . .. . 0 A descriptor format sense data D SENSE bit set to zero specifies that the device server shall return the fixed format sense data when returning sense data in the same I T L Q nexus transaction as a CHECK CONDITION status . 1 A D SENSE bit set to one specifies that the device server shall return descriptor format sense data when returning sense data in the same I T L Q nexus transaction as a CHECK CONDITION status except as defined in 2.4.1 . My question is about this bit interpretation on the SCSI target side - is the target server obligated to return sense data in the descriptor format if this bit is 1 Or it s just a possibility to return this data in any format it wants The first byte of the sense data can be used to determine its format so the SCSI initiator doesn t actually need the D SENSE bit value to decide how to decode the received sense data . I m asking this question cause I m working on some piece of software which is supposed to simulate a SCSI target so I need to digest multiple SCSI documents to make it right . .. . Answer : If the SCSI target implements the ability to set this bit it must be able to return either of the sense formats . The SCSI target may choose to only provide this bit for reading and not writing and then it dictates what format it returns . Please also notice that to be properly SCSI compliant you also need to provide the mode page in a mask mode that shows which bits of a mode page are settable . Comment : Mode page in a mask mode - you mean bits settable by MODE SELECT right I can see that the sense data should be returned by target as a response to the REQUEST SENSE as well . Fortunately this command has two variants - for fixed sense and descriptor sense . So if D SENSE is not set then the target should return the error in CDB right Comment : If the D SENSE is not set you should return sense buffers in fixed sense format . You can prevent setting this bit at all so you only need to implement the fixed sense format . Comment : I actually need to implement sense data in the descriptor format as well because this format is needed to report such info as formatting in progress as a response to the REQUEST SENSE . So I worry about how to do that without or with minimal disrupting all the other sense data messages which my target is supposed to generate . Comment : You can report format in progress and progress level in fixed sense too . You can look at my libscsicmd library that has full parsing of scsi sense . Comment : Thank you for the reference to your library So - I can report the progress level in bytes 15-17 of the fixed sense data right",
"Question : I try to issue a scsi read 10 http : en.wikipedia.org wiki SCSI Read Commands Read .2810.29 and write 10 http : en.wikipedia.org wiki SCSI Write Commands Write .2810.29 to a SSD . I use this example code http : tldp.org HOWTO SCSI-Generic-HOWTO pexample.html as a reference basic code . This is my scsi read : .. . .. . And this is my scsi write : .. . .. . In the following example I do .. . .. . 1 . scsi read .. . 2 . scsi write .. . 3 . scsi read .. . .. . And I print the hexdumps of the data which is written scsi write and what is read scsi read .. . .. . fter running the three commands again I should read Abcdefg with the first read . Right But running them again changes nothing . You could now assume that the memory I use has still the data from previous funcions but I get the same result even though I run memset Readbuff 0 sizeof Readbuff before the sys read happens . I assumed that the LBA I try to write is maybe forbidden to write and I read the cache . But interating over LBA Adresses from 0x00-0xFF changes nothing - That means I read the same data Abcdefg . Do you know an example implementation of scsi read or writes with the scsi generic interface .. . Answer : In SCSI the units of the LBA and the transfer length are in blocks sometimes called sectors . This is almost always 512 bytes . So you can t read or write just 32 bytes . At a minimum you ll have to do 512 bytes one block . This one point is most of what you need to fix . Your transfer length is zero in your scsi write implementation so it s not actually going to write any data . You should use different buffers for the CDB and the write read data . I suspect that confusion about these buffers is leading your implementation to write past the end of one of your statically-allocated arrays and over your ReadBuffer . Run it under valgrind http : valgrind.org docs manual quick-start.html and see what shows up . And lastly a lot could go wrong in whatever is in handle scsi cmd . It can be tricky to set up the data transfer.. . in particular make sure you re straight on which way the data is going in the I O header s dxfer direction : SG DXFER TO DEV for write SG DXFER FROM DEV for read . Check out this example of how to do a read 16 . This is more along the lines of what you re trying to accomplish . http : fossies.org linux misc sg3 utils-1.33.tgz : a sg3 utils-1.33 examples sg simple16.c Comment : thank you very much . The example of sg3 utils helped me a lot and it works now .",
"Question : I want to get the SCSI ID of the CD-R CD-ROM using the command.As well as I want to check that scsi board is installed properly or not on the system using command in korn shell script . .. . Answer : On my Ubuntu 14 system the following command prints the CD-ROM entry that s in proc scsi scsi : .. . .. . grep -B2 CD proc scsi scsi .. . .. . That is on my system it prints .. . .. . If what you want is the string scsi1 use awk cut grep sed perl or whatever to isolate it out . For example where bash prompt is : .. . .. . or .. . .. . You can find out CD drive model names and serial numbers from udisks output . Eg : Comment : no scsi is present at proc scsi in my system Comment : What Red Hat release are you running What kernel Eg what is output from uname -a and from cat etc issue.net Also see linux rescan scsi bus http : thornelabs.net 2012 08 22 linux-rescan-scsi-bus.html",
"Question : Can some one help me out in finding the default SCSI timeouts for the connected devices disks Red-hat version : 3 Kernel : 2.4.21 . Thanx in advance : .. . Answer : Check the scsi sg.h header file in your distribution to be sure but I believe that 2.4.21 is late enough in the 2.4 series that the SCSI timeout is 60 seconds . I have a 2.4.27 source tree lying around which is 60 seconds :",
"Question : How can I get the vendor name of SCSI device on linux c .. . Answer : The sg3 utils package contains utilities that send SCSI commands to devices . Once we have sg3 utils installed run sg inq command on the device you are interested in . For example : sg inq dev sda .. . .. . The above command will run standard SCSI inquiry on the device and provide the Vendor name and other details .",
"Question : null .. . Answer : I am in the process of making a hardware control interface for my vintage Yamaha CBX-D5 audio-recording processor . using MIDI SysEx commands . This is well under way and I managed to find out most of it s inner workings . I programmed SysEx in Arduino to send over the MIDI bus . But now I would like to read from it s SCSI bus in a software solution . I mean there are expensive hardware solutions out there but these are out of reach for me. . so there must be a way to intercept the startup Command structure being sent over the SCSI bus so I can program it in a ATMEGA328P chip or something . Anyone out there that knows how to achieve that one I do have Logic Audio Platinium that sends those SCSI commands but don t know how to read and interpret SCSI Command Description Blocks . Maybe there is a way to intercept it on the MacBook Bronze that runs it. .",
"Question : How can I get the vendor name of SCSI device on linux c .. . Answer : You can use libudev http : www.kernel.org pub linux utils kernel hotplug libudev to find SCSI devices and read the vendor attribute untested :",
"Question : Can some one help me out in finding the default SCSI timeouts for the connected devices disks Red-hat version : 3 Kernel : 2.4.21 . Thanx in advance : .. . Answer : That s an ancient version I m not even sure there is an easy way to find the timeouts and in most likelihood they are all set to defaults of 30 seconds .",
"Question : When the fopen function is invoked in C it issues a system call to the kernel . I would like to know which kernel modules are responsible in processing the system call and returning the file-descriptor to the calling program . Are these kernel modules also responsible in handling read and write operations If not which modules are responsible . I m fiddling around with issuing SCSI commands and the information would be appreciated . .. . Answer : When the fopen function is invoked in C it issues a system call to the kernel . Not exactly . fopen 3 is a library function that eventually calls open 2 a system call . I would like to know which kernel modules are responsible in processing the system call and returning the file-descriptor to the calling program . None . In Linux the system calls are all handled by the core kernel not a module . See fs open.c . Are these kernel modules also responsible in handling read and write operations If not which modules are responsible . Same deal . See fs read write.c . At the point the kernel is given a path to open it will first determine the mount point where the file you re requesting lives . A filesystem will be mounted at that mount point and that filesystem is implemented is implemented in a module . Filesystems work on top of block devices . And those block devices e.g . SCSI IDE are also implemented in modules . I m fiddling around with issuing SCSI commands and the information would be appreciated . Have a look here : http : sg.danny.cz sg sg3 utils.html Comment : Make sense that it would be part of the core kernel . Thanks for the information . Comment : @Daedalus modules will be involved during the processing of the open read-write syscalls though . The main entry-point for the syscalls are in the core kernel but different filesystem types are often implemented as modules and obviously for a normal file-access you ll need to access the filesystem at some point to handle these sytem calls .",
"Question : Is there any python library to access low-level disk details I need : .. . .. . SMART attributes .. . Serial number .. . Firmware version .. . SATA Phy counters .. . SMART Extended Self-test log records .. . Enclosure letter sg-device mapping .. . ATA Security command access .. . SCSI generic access sg inq sg format etc .. . .. . Any ideas outside of parsing output of smartctl hdparm and sg3-utils Thanks .. . Answer : I dont know if this https : github.com rosjat python-scsi is of any help but you might get some of the point you mentioned done with it thought Comment : Could you may provide some information about this Link instead of just a Link Comment : link-to a github repository called python-scsi Python classes to access SG IO scsi devices Comment : Thank you Both of them cover 75 of everything I need .",
"Question : I am reading the SCSI SPC4r22 . In regards to ADDITIONAL LENGTH all revisions prior to spc3 have stated the following shall not be adjusted : .. . .. . From spc2r20.pdf : .. . .. . The ADDITIONAL LENGTH field shall specify the length in bytes of the parameters . If the ALLOCATION LENGTH of the CDB is too small to transfer all of the parameters the ADDITIONAL LENGTH shall not be adjusted to reflect the truncation . But I don t see that statement in SPC3 or SPC4 . Has that been changed or am I missing the phrase If I m missing it can someone please quote it .. . Answer : It is just worded in a more general way : .. . .. . If the information being transferred to the Data-In Buffer includes fields containing counts of the number of bytes in some or all of the data then the contents of these fields shall not be altered to reflect the truncation",
"Question : null .. . Answer : I am a noob using Ubuntu server 12.04.5 LTS . There is a need for me to access a SCSI device with logical unit number LUN more than 255.According to my knowledge we can t see SCSI devices with lun more than 255 . I heard there is flat space addressing-mode for lun which supports lun more than 255 . Can I access the volumes SCSI device using flat space addressing in Ubuntu If it is how Please reply if you need further info and excuse me if I made any mistakes in my question . Comment : Which HBA are you using There are various methods to setting the max luns see pinoyunix.blogspot.com 2014 09 http : pinoyunix.blogspot.com 2014 09 how-check-for-maximum-supported-luns-in.html for some ideas . Comment : Thanks for your reply gubblebozer . Sorry I was not very clear . This is my configuration setup . I have an windows-xp service pack 3 host which is running VMWARE workstation 6.5 with VM Ubuntu server 12.04.5 LTS . My requirement is to connect to a remote storage array through iscsi using iscsiadm utility from ubuntu VM As a initiator and access the volumes present on the remote array whose lun is 256 . The windows-xp host has Intel R 82562V-2 10 100 NIC and the storage array has a controller with QLogic 4032 PCIX iSCSI Adapter . Is it possible with these requirements Comment : It s likely that you won t be able to see more than 256 LUNs at one time but Linux will support LUNs with numbers greater than 256 after a fashion anyway . There seems to be some disagreement about which part of the kernel is supposed to translate the flat space addressing method at least on my older 2.6.32 kernel . For LUNs in the 300 s I end up with untranslated LUNs numbered up around 16700 . But f you use sg luns -d dev it ll reveal the correctly translated one .",
"Question : Does anyone know of a way to issue commands to a hard drive within Java Does Java even support this kind of hardware interaction For example if I have a SCSI hard drive that I would like to inquiry is there a pre-existing Java method to do this or would I have to write my own http : en.wikipedia.org wiki SCSI has some general information on SCSI commands in case you aren t familiar . .. . Answer : you need to write the HDD interface code in C C++ and then call that from Java using JNI"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
scsi
|
UNK_RELATION
|
cups@open-source@37
|
cups -- cups is the standards-based @placeholder printing system for mac os x and other unix - like operating systems .
|
{
"confidence": [
55.008304595947266,
52.158668518066406,
51.707298278808594,
50.5769157409668,
47.04676818847656,
43.76814651489258,
42.78254318237305,
42.736331939697266,
42.58707809448242,
42.40290069580078,
41.37910842895508,
41.126068115234375,
41.12514877319336,
40.0256233215332,
39.985565185546875,
39.654781341552734,
39.5399169921875,
38.9343147277832,
38.901405334472656,
38.901405334472656,
38.70781326293945,
38.70781326293945,
38.56442642211914,
38.482357025146484,
38.482357025146484,
38.482357025146484,
38.36914825439453,
38.36914825439453,
38.36567687988281,
38.32351303100586,
38.21223068237305,
38.21223068237305,
37.535465240478516,
37.493656158447266,
37.27691650390625,
37.24401092529297,
37.24401092529297,
37.24401092529297,
37.24401092529297,
37.24401092529297,
37.24401092529297,
37.24401092529297,
37.24401092529297,
37.24401092529297,
37.24401092529297,
37.05133819580078,
36.55483627319336,
36.47103500366211,
36.14448547363281,
36.06502151489258,
35.96937561035156,
35.88797378540039,
35.88797378540039,
35.88797378540039,
35.88797378540039,
35.84246063232422,
35.50548553466797,
35.05158233642578,
34.97930145263672,
34.956260681152344,
34.756134033203125,
34.74293518066406,
34.52415466308594,
34.2305793762207,
34.2305793762207,
34.2305793762207,
34.2305793762207,
34.2305793762207,
34.2305793762207,
34.2305793762207,
34.2305793762207,
34.2305793762207,
34.2305793762207,
34.2305793762207,
34.2305793762207,
34.2305793762207,
34.13750076293945,
34.13750076293945,
33.68156433105469,
33.58539581298828,
33.58539581298828,
33.42512512207031,
33.13105392456055,
33.13105392456055,
33.13105392456055,
33.13105392456055,
33.13105392456055,
33.13105392456055,
32.76808547973633,
32.63658142089844,
32.63658142089844,
32.63658142089844,
32.59794616699219,
32.33879852294922,
31.828899383544922,
31.828899383544922,
31.828899383544922,
31.828899383544922,
31.828899383544922,
31.828899383544922
],
"content": [
"Download the source code from codepoet cups-pdf-for-mac-os-x https : bitbucket.org codepoet cups-pdf-for-mac-os-x overview .",
"On Mac OS X you ll have to use usr libex cups backend .",
"I know that CUPS handle the printing system in OSX .",
"CUPS is the printer system on Mac OSX and most linux systems .",
"CUPS emulates the traditional unix printing system you should have the normal lp commands family available .",
"Now save and exit editing before copying this file to etc cups with the following command .. . .. . sudo cp cups-pdfdownloaddir extra cups-pdf.conf etc cups .. . .. . Be careful of editing in a text-editor because newlines in UNIX and Mac environments are different and can potentially ruin scripts .",
"I installed cups .",
"Like the orientation postscript cups conflict you need to set the cups copies value to 1 to get the collation to work .",
"And if anyone is looking for a user-end PDF-printer this cups-pdf-for-mac-os-x https : bitbucket.org codepoet cups-pdf-for-mac-os-x overview is one that works through the installer however I have the same issue of no file appearing in the indicated directory when I download the source and follow the instructions in the readme .",
"Edit the file contained in cups-pdfdownloaddir extra cups-pdf.conf .",
"Can we use CUPS API for this purpose",
"CUPS quotas do work for me .",
"Using Eureka or using the cups",
"Are there alternatives to CUPS on Ubuntu",
"If your CUPS is installed properly then it will work and otherwise you have to check the CUPS .",
"So is there a Linux distribution that does not use CUPS and uses another printing system which does have a verbose flag",
"Web Interface of Cups showing the printing job added but with the error No pages found",
"The postscript file generated by XrtTblVaDrawPS was printed using cups but during testing the cups Collate option appeared not to work when we where printing more then 1 copy .",
"OSX uses cups and so I ve been tinkering with it .",
"The files in var log cups are practically empty .",
"Installing data files in cups.. .",
"Web Interface of Cups : .. . .. .",
"It is recognized by the OSX printing system as a printer I already figured out that I ll have to use CUPS to do this so that the user can pick it among the choices .",
"I ve got a CUPS job control file these can be found at var spool cups cnnnnn .",
"I am trying to use Net : : CUPS- getDestinations to get a list of printer names that are configured in CUPS .",
"Does anyone know how to get a list of printers configured in CUPS using the Net : : CUPS module",
"After that Im add printers to CUPS .",
"GROOVY SCRIPT : .. . .. . .. . .. . The CUPS server is running .",
"I wand add a second cups-filter at the end of the work flow of a printer .",
"You use whatever program or API you like to create a such a file and you then send it to CUPS with lpr or with the CUPS API and CUPS will transform it to the appropriate internal format and send it to the printer .",
"When i check the current state of printer via lpstat command cups returns is ready and printing .",
"Has anyone tried printing using CUPS from iOS Objective-C application",
"I have changed settings as described here http : thismightbehelpful.blogspot.be 2008 09 remote-access-to-cups-web-interface.html and here http : www.thegeekstuff.com 2016 02 cups-admin-ui-access and restarted the CUPS server .",
"This is for a custom CUPS backend part of virtual OS X printer but if you know anyway to get this information it might help thank you for the effort .",
"The link-to the KDE Printing Developer Tools Wiki specifies that 2dir should be saved in usr lib cups backend however I don t seem to have a cups directory in usr lib .",
"Has Apple Inc . removed this property from Cups",
"My question is are they preset by cups postscript ghostscript",
"I installed the printer with cups and the testprint works .",
"Import the pycups module named cups .. . 2 .",
"I am running the cups in Linux debian machine .",
"How do I interface with CUPS to generate the PDF",
": .. . .. . Initially use the educational CUPS backend named 2dir .",
"Add them please restart CUPS and try again .",
"For this the directory with the source code is called cups-pdfdownloaddir .",
"Copy the binary into usr libexec cups backend .",
"can be seen in the web-interface of Cups .",
"When i try to print document with CUPS and xhtml2pdf library - everything is good but i get very slow printing .",
".. . .. . Also I figured this might be helpful because it helped me : if something gets screwed up in following these directions and you need to start over get rid of it in order to remove the driver you need to 1 remove the cups-pdf backend from usr libexec cups backend 2 remove the cups-pdf.conf from etc cups 3 Go into System Preferences Print Fax and delete the CUPS-PDF printer .",
"2 The lpstat Linux command part of CUPS .",
"I have already referred the answer to a similar existing question on StackOverflow and looked up CUPS and CUPS-PDF .",
"So I need a server to manager the printer and ready for requests to print file with correct printer.Run sever in windows seems not a good ideas.and cups seems can only be installed on mac or unix-like-system .",
"Also I couldn t find any logs regarding to cups errors .",
"But which option would that be if I want to tell this cups directly",
"It turns out the the cups copies command was killing the Collating if it set to 2 .",
"If you don t want it to be collated then set cups copies to 2 number .",
"@Katie : Add a line saying LogLevel debug in your etc cups cupsd.conf file and re-start CUPS sudo launchctl .. . commands above .",
"I ve installed cups and started the service .",
"Now from iOS will it be AirPrint or some other way to send request to the CUPS printer .",
"We are trying to print to a networked Epson receipt printer TM-T88V from the iPad using CUPS or other method but we are running into a brickwall getting CUPS to run on iOS .",
"I would like to use cups to manager many local-network printer .",
"For example : .. . .. . sudo cp cups-pdfdownloaddir src cups-pdf usr libexec cups backend .. . .. . Also don t forget to change the permissions on this file--it needs root permissions 700 which can be changed with the following after moving cupd-pdf into the backend directory : .. . .. . sudo chmod 700 usr libexec cups backend cups-pdf .. . .. . 3 .",
"Heh this was their response : Development recommends the customer speak to the CUPS support team and see if there is a similar command that can be incorporated into CUPS for this is a way to incorporate the command already provided .",
"So i installed cups on my small Raspberry Pi Apache server and created a code with PHP that looks like.. . .. . .. . I replaced my PrinterName .. . .. . Now the job is send to cups but the Status is stopped .",
"I have a Cups-pdf printer that works great using ipp .",
"I want to modify my printers manually using cups .",
"Do cups-config --libs on your host machine and on your target machine .",
"Is there any way to hold the print job using CUPS API",
"I was wondering if the actual releasing of the job could be done with the CUPS API",
"Using the cups I am sending the print request to Windows XP machine .",
"The CUPS server will be on a separate machine docker-container to the actual print service .",
"Is it possible to easily control a CUPS server remotely using HTTP requests",
"I installed cups in Raspberry Pi 2 B v1.1 .",
"Does anyone know how to get CUPS running on iOS",
"tea4cups http : www.pykota.com software tea4cups it acts as wrapper for cups .",
"To solve this I edited usr lib cups backend tea4cups and changed the environment : .. . .. .",
"I need to print an image applying an ICC Profile within CUPS .",
"The problem with printing this way is that OSX or cups does not create PJL headers on the PCL drivers it does for Postscript drivers .",
"If I run this through CUPS xhtmltopdf filter to simulate printing then several flaws appear .",
"1 . tea4cups is based on python2 and I have python3 as standard-library this gave some unexpected errors like wrong key from cups log .",
"The default location of print spool files is var spool cups in ubuntu 14.04 .I try to edit the cups-files.conf file which is loacted in etc cups directory but unable to change the directory for the spool files.I want to know how can i change the location for spool files .",
"Compile cups-pdf.c contained in the src folder as the readme specifies : .. . .. . gcc -09 -s -lcups -o cups-pdf cups-pdf.c .. . .. . There may be a warning : ld : warning : option -s is obsolete and being ignored but this posed no issue for me .",
"OSX 10.10.5 Python 2.7 .. . .. . I have a Python script being called by CUPs as a printer backend as usr libexec cups qrnote .",
"As @smagnan pointed out CUPS does not support the -V flag .",
"Check the CUPS log files and the printer status messages on REMOTESERVER .",
"I am simply looking for a way to change the font type of a printer in CUPS .",
"However this changes the font type throughout CUPS and on all printers .",
"We are using cups4j which is a java library to interface with CUPS on a RHEL server .",
"CUPS doesn t have its own document description API .",
"For example under linux you can print on a cups printer like this : .. . .. . Important for me is the -o raw flag .",
"My real problem with custom paper sizes likely has something to do with the way applications talk to cups and the switch from .ps to .pdf as the preferred page input to cups in Ubuntu 9.04.. .",
"The method for compiling programs with gcc as shown in the API documentation is .. . .. . gcc -o simple cups-config --cflags simple.c cups-config --libs .. . .. . As far as I understand this needs to be done in the target machine .",
"But when using CUPS on a central server CUPS only spools the next job when the last one completed so that only the one who spooled first can see and pay for their job .",
"I installed the printer from the System Settings Printing Add network printer Set the printer type to Generic Raw .. . .. . If I switch to Generic text only then Cups spools the entire job .",
"I Cross compiled cups 1.7.0 for sitara arm linux 6 .. . .. . I followed .. . .. . All cups related files are automatically saved in sd-card but it shows error on typing cupsd command and not starting cups server .. . .. . On checking etc cups cupsd.conf several paths in the configuration-files are .. . .. . instead of .. . .. . 1 how to install this compiled cups to target board without --prefix",
"I need to distinguish between local and remote CUPS print jobs on the server-side .",
"I have setup EPSON T88v Printer on Linux Box and CUPS is working fine .",
"Otherwise you can open a TCP connection the CUPS service and send the data directly .",
"Can you provide some direction how can I open TCP connection from iOS to CUPS service",
"I can even make a quick curl to my localhost : 631 cups port inside my vagrant and there s everything .",
"Our C++ application is using cups to print out a postscript file generated by XRT XrtTblVaDrawPS command ."
]
}
|
{
"confidence": [
62.47177505493164,
59.831764221191406,
59.235252380371094,
57.96299362182617,
54.07799530029297,
53.947509765625,
52.95793914794922,
52.06113052368164,
51.40346145629883,
51.20515441894531,
50.83987045288086,
50.374916076660156,
50.09915542602539,
49.73659896850586,
49.661373138427734,
49.413108825683594,
49.10649871826172,
48.91923904418945,
48.674190521240234,
47.81882095336914
],
"content": [
"Question : null .. . Answer : what I want to do is call the printer in the network to print a pdf file in python . I have found the pycups lib . but the terrible doc make it really hard for me to get-started . And also the cups seems to be a big things to learn which make me really confuse now . so can anyone give me some pycups example or other things Comment : possible duplicate of Silent printing of a PDF in Python http : stackoverflow.com questions 4498099 silent-printing-of-a-pdf-in-python Comment : It seems not . I would like to use cups to manager many local-network printer . and call anyone as needed . So I need a server to manager the printer and ready for requests to print file with correct printer.Run sever in windows seems not a good ideas.and cups seems can only be installed on mac or unix-like-system . so the windows is not a choice .",
"Question : Okay so here is what I want to do . I want to add a print option that prints whatever the user s document is to a PDF and adds some headers before sending it off to a device . I guess my questions are : how do I add a virtual printer driver for the user that will launch the application I ve been developing that will make the PDF or make the PDF and launch my application with references to the newly generated PDF How do I interface with CUPS to generate the PDF I m not sure I m being clear so let me know if more information would be helpful . I ve worked through this printing with CUPS tutorial http : alien.slackbook.org dokuwiki doku.php id slackware 3acups pdf printer scripts and seem to get everything set up okay but the file never seems to appear in the appropriate temporary location . And if anyone is looking for a user-end PDF-printer this cups-pdf-for-mac-os-x https : bitbucket.org codepoet cups-pdf-for-mac-os-x overview is one that works through the installer however I have the same issue of no file appearing in the indicated directory when I download the source and follow the instructions in the readme . If anyone can get either of these to work on a mac through the terminal please let me know step-by-step how you did it . Comment : Maybe I m misunderstanding your need but Cocoa directly supports producing PDF from documents NSView s you don t need to install a print driver . Search the documentation for PDF . Comment : Here s a specific example : I have a document in Word that I want to send to my device . When I do File Print I want a printer option that will launch my application and give me references to the PDF of the current word doc . I don t much care exactly when the file becomes a PDF--I realize I can do that within my application . I don t need to display the PDF in a view and I have used the PDFKit functionality to manipulate files but never from the printer option . If you still think searching the documentation is all I need could you point me to more specific references Thanks . Comment : As I thought I might be I was misunderstanding your need . In looking at CUPS you ve picked a good place to look for what you re trying to do . .. . Answer : I really wish I could accept two answers because I don t think I could have done this without all of @Kurt Pfeifle s help for Mac specifics and just understanding printer drivers and locations of files . But here s what I did : .. . .. . .. . .. . 1 . Download the source code from codepoet cups-pdf-for-mac-os-x https : bitbucket.org codepoet cups-pdf-for-mac-os-x overview . For non-macs you can look at http : www.cups-pdf.de The readme is greatly detailed and if you read all of the instructions carefully it will work however I had a little trouble getting all the pieces so I will outline exactly what I did in the hopes of saving someone else some trouble . For this the directory with the source code is called cups-pdfdownloaddir . 2 . Compile cups-pdf.c contained in the src folder as the readme specifies : .. . .. . gcc -09 -s -lcups -o cups-pdf cups-pdf.c .. . .. . There may be a warning : ld : warning : option -s is obsolete and being ignored but this posed no issue for me . Copy the binary into usr libexec cups backend . You will likely have to the sudo command which will prompt you for your password . For example : .. . .. . sudo cp cups-pdfdownloaddir src cups-pdf usr libexec cups backend .. . .. . Also don t forget to change the permissions on this file--it needs root permissions 700 which can be changed with the following after moving cupd-pdf into the backend directory : .. . .. . sudo chmod 700 usr libexec cups backend cups-pdf .. . .. . 3 . Edit the file contained in cups-pdfdownloaddir extra cups-pdf.conf . Under the PDF Conversion Settings header find a line under the GhostScript that reads GhostScript usr bin gs . I did not uncomment it in case I needed it but simply added beneath it the line Ghostscript usr bin pstopdf . There should be no pre-cursor for any of these modifications .. . .. . Find the line under GSCall that reads GSCall s -q -dCompatibilityLevel s -dNOPAUSE -dBATCH -dSAFER -sDEVICE pdfwrite -sOutputFile s -dAutoRotatePage s PageByPage -dAutoFilterColorImages false -dColorImageFilter FlateEncode -dPDFSETTINGS prepress -c .setpdfwrite -f s Again without uncommenting this under this I added the line GSCall s s -o s s .. . .. . Find the line under PDFVer that reads PDFVer 1.4 and change it to PDFVer no spaces or following characters . Now save and exit editing before copying this file to etc cups with the following command .. . .. . sudo cp cups-pdfdownloaddir extra cups-pdf.conf etc cups .. . .. . Be careful of editing in a text-editor because newlines in UNIX and Mac environments are different and can potentially ruin scripts . You can always use a perl command to remove them but I m paranoid and prefer not to deal with it in the first place . .. . .. . 4 . You should now be able to open a program e.g . Word Excel .. . and select File Print and find an available printer called CUPS-PDF . Print to this printer and you should find your pdfs in var spool cups-pdf yourusername by default . .. . .. . Also I figured this might be helpful because it helped me : if something gets screwed up in following these directions and you need to start over get rid of it in order to remove the driver you need to 1 remove the cups-pdf backend from usr libexec cups backend 2 remove the cups-pdf.conf from etc cups 3 Go into System Preferences Print Fax and delete the CUPS-PDF printer . .. . .. . This is how I successfully set up a pdf backend filter for myself however there are more details and other information on customization contained in the readme file . Hope this helps someone else Comment : I thought your ultimate goal was to print whatever the user s document is to a PDF and add some headers before sending it off to a device .. . . So how did you solve the last part My answer only covered the first part -- I didn t know from your question what the detailed requirements for the second part were . Comment : I ended up separating out the header issue from generating a PDF . Once I had the PDF generated I could manipulate the data through Cocoa s PDFDocument within my application before sending it to the device . Comment : hi Katie im getting this error sampletopdf stopped with status 13",
"Question : null .. . Answer : Has anyone tried printing using CUPS from iOS Objective-C application I have an iOS application that is printing on 1 POS printer from multiple devices and when printer is busy I am having issues . I am thinking I can build a print server in Linux using CUPS and send print request from all iOS devices to a common print server . Any ideas suggestions on the approach I have setup EPSON T88v Printer on Linux Box and CUPS is working fine . Now from iOS will it be AirPrint or some other way to send request to the CUPS printer . Comment : If you want to use the in-built printing capabilities of iOS you need to use AirPrint to your queue . Otherwise you can open a TCP connection the CUPS service and send the data directly . If you have a Mac that you can use you can also look at PaperCut.com Comment : Thank you . Can you provide some direction how can I open TCP connection from iOS to CUPS service Will it be opening a TCP socket in Objective C",
"Question : Okay so here is what I want to do . I want to add a print option that prints whatever the user s document is to a PDF and adds some headers before sending it off to a device . I guess my questions are : how do I add a virtual printer driver for the user that will launch the application I ve been developing that will make the PDF or make the PDF and launch my application with references to the newly generated PDF How do I interface with CUPS to generate the PDF I m not sure I m being clear so let me know if more information would be helpful . I ve worked through this printing with CUPS tutorial http : alien.slackbook.org dokuwiki doku.php id slackware 3acups pdf printer scripts and seem to get everything set up okay but the file never seems to appear in the appropriate temporary location . And if anyone is looking for a user-end PDF-printer this cups-pdf-for-mac-os-x https : bitbucket.org codepoet cups-pdf-for-mac-os-x overview is one that works through the installer however I have the same issue of no file appearing in the indicated directory when I download the source and follow the instructions in the readme . If anyone can get either of these to work on a mac through the terminal please let me know step-by-step how you did it . Comment : Maybe I m misunderstanding your need but Cocoa directly supports producing PDF from documents NSView s you don t need to install a print driver . Search the documentation for PDF . Comment : Here s a specific example : I have a document in Word that I want to send to my device . When I do File Print I want a printer option that will launch my application and give me references to the PDF of the current word doc . I don t much care exactly when the file becomes a PDF--I realize I can do that within my application . I don t need to display the PDF in a view and I have used the PDFKit functionality to manipulate files but never from the printer option . If you still think searching the documentation is all I need could you point me to more specific references Thanks . Comment : As I thought I might be I was misunderstanding your need . In looking at CUPS you ve picked a good place to look for what you re trying to do . .. . Answer : The way to go is this : .. . .. . Set up a print queue with any driver you like . But I recommend to use a PostScript driver PPD . A PostScript PPD is one which does not contain any cupsFilter : .. . line . : .. . .. . Initially use the educational CUPS backend named 2dir . That one can be copied from this website : KDE Printing Developer Tools Wiki http : community.kde.org Printing Developer Tools .272dir.27 CUPS backend script .28Bash code.29 . Make sure when copying that you get the line endings right Unix-like . .. . .. . Commandline to set up the initial queue : .. . .. . lpadmin .. . -p pdfqueue .. . -v 2dir : tmp pdfqueue .. . -E .. . -P path to postscript-printer.ppd .. . .. . .. . The 2dir backend now will write all output to directory tmp pdfqueue and it will use a uniq name for each job . Each result should for now be a PostScript file . with none of the modifications you want yet . Locate the PPD used by this queue in etc cups ppd its name should be pdfqueue.ppd . Add the following line best near the top of the PPD : .. . .. . cupsFilter : application pdf 0 - .. . .. . Make sure the cupsFilter starts at the very beginning of the line . This line tells cupsd to auto-setup a filtering chain that produces PDF and then call the last filter named - before it sends the file via a backend to a printer . That - filter is a special one : it does nothing it is a passthrough filter . Re-start the CUPS scheduler : .. . .. . sudo launchctl unload System Library LaunchDaemons org.cups.cupsd.plist .. . sudo launchctl load System Library LaunchDaemons org.cups.cupsd.plist .. . .. . From now on your pdfqueue will cause each job printed to it to end up as PDF in tmp pdfqueue .pdf . Study the 2dir backend script . It s simple Bash and reasonably well commented . Modify the 2dir in a way that adds your desired modifications to your PDF before saving on the result in tmp pdfqueue .pdf .. . .. . .. . .. . .. . Update : Looks like I forgot 2 quotes in my originally prescribed cupsFilter : .. . line above . Sorry Comment : This sounds like exactly what I need Thanks for taking the time to write this all out . However please bear with me as my unfamiliarity with CUPS and printer terms makes me ask minute step-by-step questions that you might have already answered . The link-to the KDE Printing Developer Tools Wiki specifies that 2dir should be saved in usr lib cups backend however I don t seem to have a cups directory in usr lib . Have I missed something Also the last flag to set up the initial queue I assume I am supposed to replace the path but with what exactly Comment : @Katie : Sorry I had Linux in mind with that path . On Mac OS X you ll have to use usr libex cups backend . The last -P flagged path argument you can replace with User katie postscript-printer.ppd .. . but of course you should put a real PostScript printer PPD there with that name . Comment : Okay I got that sorted out--pdfqueue is a printer option . I believe I followed the other instructions however when I try to print I get a dialog that says This printer has been paused . Do you want it to resume printing With options to Cancel Add to Queue or Resume . Hitting either Add to Queue or Resume adds the print job so I can see it in the pdfqueue printer GUI that popped up but does not seem to respond to resume and just sits there . tmp pdfqueue doesn t seem to exist so I m not quite sure where this file is going . Any suggestions Comment : @Katie : Add a line saying LogLevel debug in your etc cups cupsd.conf file and re-start CUPS sudo launchctl .. . commands above . Comment : @Katie : Oh it s possibly my mistake -- the cupsFilter : .. . line I prescribed to you above is missing a pair of quotes . Add them please restart CUPS and try again . Sorry for that .",
"Question : null .. . Answer : i have a raspberry-pi 2 server and want to print a pdf file using php code . I installed the printer with cups and the testprint works . However how can i send files with php to the printer now Is there any command that sends a task to the printer Thank you Comment : CUPS emulates the traditional unix printing system you should have the normal lp commands family available . That means you can simply do something like system lp -P myprinter path to file.pdf Alternatively you can look for a native network client for CUPS the IPP protocol is not really complex that should not be difficult . When I last checked some years ago I fell back to the command-line utilities though . Comment : thanks arkascha . One more question.. . what means lp and should i replace myprinter with the ip Comment : linux.die.net man 1 lp http : linux.die.net man 1 lp",
"Question : I m trying to use html for printed documents . I have headers that I want to appear on every printed page and I m using the following code : .. . .. . If I preview this from within Chrome s own print dialog it looks pretty much the way I intend . It also looks correct if printed from Chrome s print dialog identical to the preview at least to my eyeball . If I run this through CUPS xhtmltopdf filter to simulate printing then several flaws appear . The header looks correct on the first page but does not appear on any subsequent pages like they would from Chrome s own print dialog . This proves that it s styling some things from the media print selector otherwise I d just see plain inputs . Is this even a problem with the media print selector at all or is something to do with position-fixed The second issue is that the other elements class problem are rendering much larger from xhtmltopdf than they do from Chrome s print dialog . From Chrome http : i.stack.imgur.com sdojA.png From xhtmltopdf http : i.stack.imgur.com 6XtYm.png .. . .. . Is this also a css issue or something peculiar from CUPS I m sort of clueless about this but I seem to remember from years ago that some browsers had default styles for elements at least when in quirks-mode . Is there a style that Chrome s applying to this that xhtmltopdf misses Is something else going on Not sure if this will help but I m including output from the cups filter : .. . Answer : I don t know what CUPS xhtmltopdf is quick search didn t find usefull information but I m pretty sure you would be better off using paged media https : www.w3.org TR css3-page for your PDF creation . The downside is that modern browsers wont let your preview there css rules you will need solutions like PrinceXML PDFReactor or wkhtmltopdf . This way you could use specific css rules to accomplish what you want . example : Comment : This doesn t answer my question . CUPS is the printer system on Mac OSX and most linux systems .",
"Question : I am getting this error when trying to run the lpr command : .. . .. . lpr : Error - unknown option V . My full command I am running is .. . .. . According to the documentation here http : manpages.ubuntu.com manpages saucy en man1 lpr.1.html there is a -V flag . If I run the command without the -V flag it prints fine however I need output so the application I am building knows if the print was successful or not . Running on Ubuntu 12.04 LTS . UPDATE 1 .. . .. . I tried this again on Ubuntu 14.04 and it still does not recognise the -V flag . As @smagnan pointed out CUPS does not support the -V flag . So is there a Linux distribution that does not use CUPS and uses another printing system which does have a verbose flag A success or fail output is imperative for the application . Comment : Have you just tried changing th flags ordre like : lpr -P printer-1 file.txtn -V Maybe ask on askubuntu.com anyway Comment : @smagnan I have tried a different order .. . Answer : Sadly it seems that : .. . .. . The c d f g i m n t v and w options are not supported by CUPS and will produce a warning message if used . Source : linux man page for lpr http : www.linuxmanpages.com man1 lpr.1.php .. . .. . Note : CUPS means Common Unix Printing System which is used in ubuntu it seems : http : doc.ubuntu-fr.org impression sous ubuntu Comment : Are there alternatives to CUPS on Ubuntu Comment : Or a different Linux distribution which does have output for printing Comment : I m sorry I don t know much about all of that printing commands on unix linux ubuntu .. . as said before you may have more chance asking on askubuntu.com http : askubuntu.com or even unix.stackexchange.com http : unix.stackexchange.com",
"Question : I need to print some vector data or to be more exact : some dots and polylines using Linux . When I ask Google for that it shows me many tutorials and documentations - but all for end users no programming examples . So does anybody know a good programmers HOWTO tutorial that shows printing under Linux Thanks .. . Answer : CUPS doesn t have its own document description API . It doesn t need one : formats like PostScript PDF and JPEG are first-class citizens of CUPS . You use whatever program or API you like to create a such a file and you then send it to CUPS with lpr or with the CUPS API and CUPS will transform it to the appropriate internal format and send it to the printer . So for your case you might use a vector-graphics library like Cairo http : www.cairographics.org manual to author PostScript and then you send that off to CUPS for printing . Here s a simple C example : .. . .. . Strictly you don t need that temporary file : the CUPS API allows you to construct a stream and you can emit the page data into that but a file is handy for debugging .",
"Question : Our C++ application is using cups to print out a postscript file generated by XRT XrtTblVaDrawPS command . But when I print 2 copies and set the cups collate option the file is not printed out as collated . .. . Answer : Our project is using XRT motif library to generate a postscript file from a table layout using motif . The postscript file generated by XrtTblVaDrawPS was printed using cups but during testing the cups Collate option appeared not to work when we where printing more then 1 copy . Web searches did not return any reason why the ps file was not collating but after a lot of experimentation we found out why cups was not working as expected . The XrtTblVaDrawPS call generating the ps file and one of the option used was XRTTBL PS NUM COPIES 2 to set how many copies the postscript file would print out . In our cups class we were doing a cupsAddOption copies 2 . . and cupsAddOption Collate True . . commands see examples below . It turns out the the cups copies command was killing the Collating if it set to 2 . Like the orientation postscript cups conflict you need to set the cups copies value to 1 to get the collation to work . The postscript file already knows its going to print out for example 2 copies . If you don t want it to be collated then set cups copies to 2 number . If you are generating a postscript file some other way this problem might not be happening to you but it is if you are using the XrtTblVaDrawPS call . pgs XrtTblVaDrawPS myTable fp XRTTBL PS NUM COPIES num set to 2 XRTTBL PS CELL RANGE rng XRTTBL PS COLOR clr XRTTBL PS ORIENTATION ornt XRTTBL PS SCALE FIT TO PAGE HEIGHT XRTTBL PS SHOW ROW LABELS XRTTBL PS ALL XRTTBL PS SHOW FROZEN ROWS XRTTBL PS ALL XRTTBL PS SHOW COL LABELS XRTTBL PS ALL XRTTBL PS SHOW FROZEN COLS XRTTBL PS ALL XRTTBL PS PAPERSIZE WIDTH media sz.width XRTTBL PS PAPERSIZE HEIGHT media sz.length XRTTBL PS MARGIN LEFT 1.00 XRTTBL PS MARGIN RIGHT 1.00 XRTTBL PS MARGIN TOP 0.75 XRTTBL PS MARGIN BOTTOM 0.75 XRTTBL PS HEADER FONT Adobe 10 XRTTBL PS HEADER hdr XRTTBL PS HEADER MARGIN 0.55 XRTTBL PS FOOTER FONT Adobe 10 XRTTBL PS FOOTER Page XRTTBL PS FOOTER MARGIN 0.25 NULL .. . .. . myNumOptions cupsAddOption Collate True myNumOptions myOptions myNumOptions cupsAddOption copies oss.str .c str myNumOptions myOptions .. . .. . oss.str .c str is 2 and collate fails and I get 1-1-2-2 oss.str .c str is 1 and collate works and I get 1-2-1-2 oss.str .c str is 2 and cups Collate set to False I get 1-1-2-2 as expected",
"Question : null .. . Answer : I am trying to send multiple print job to printer using CUPS driver after first job printer stops spooling remaining job . I installed the printer from the System Settings Printing Add network printer Set the printer type to Generic Raw .. . .. . If I switch to Generic text only then Cups spools the entire job . Can any one help me to understand what s problem with Queue type Raw- Generic Text",
"Question : So I m working with vagrant and I m trying to use it as a printing server . I installed cups . Internally everything works just fine . I can even make a quick curl to my localhost : 631 cups port inside my vagrant and there s everything . The thing is I cant access it in any way I try from the host machine . Obviously I forwarded the port and I ve tried with several ports . I ve also tried with Debian squeeze and Ubuntu 12.04 . Here is my current Vagrantfile .. . .. . Any ideas .. . Answer : I think what you will find is that the default cups config file is locked down to only work from localhost for security reasons . Inside your Vagrant VM open the etc cups cupsd.conf file and change the following line : .. . .. . to .. . .. . That should allow you to connect from any host . Comment : Thanks That was the problem . . When I did this it caused a Bad Request error which I solved by adding ServerAlias to etc cups cupsd.conf and everything worked like a charm . Thanks again .",
"Question : null .. . Answer : We are using the Xerox Linux drivers to print on our multifunction printer . Basically when you print the driver opens a pop-up window to let you choose different printing options then calls lp for printing . This works pretty well on single user computer but when many users are logged-in at the same time on the machine the driver doesn t know which DISPLAY to use : 0 : 1 : 2 etc . . Thus when printing the pop-up appears on : 0 even though a user can be on : 1 or : 2 . When it comes to printing the printing subsystem runs as an OS user lp on Debian . This OS user doesn t have an X session and thus no DISPLAY value . Since DISPLAY isn t set the driver assumes : 0 being the typical single-user client display . Therefore when using the User Switching mechanism CUPS does not forward the requesting user s DISPLAY so the driver assumes the : 0 display if not specified . This causes user2 s driver interface to be sent to user1 s display . Here is a snippet of the log when printing . You can see I called the process with tech but lp is the one printing : .. . .. . localhost - tech 06 May 2016 : 15 : 06 : 42 -0400 POST HTTP 1.1 200 362 Create-Printer-Subscriptions successful-ok .. . .. . localhost - lp 06 May 2016 : 15 : 06 : 55 -0400 POST printers xeroxtq1 HTTP 1.1 200 346 Create-Job successful-ok .. . .. . localhost - lp 06 May 2016 : 15 : 06 : 55 -0400 POST printer xeroxtq1 HTTP 1.1 200 33861 Send-Document successful-ok .. . .. . I am not looking for a full walkthrough solution here if you have one I won t spit on it though but for some hints on what I should try to do . I ve thought of : .. . .. . 1 - Disabling user switching in GNOME3 https : askubuntu.com questions 153930 how-to-permanently-disable-user-switching-in-gnome-3 but this is a last resort solution since it is quite useful for users .. . .. . 2 - Forcing CUPS to call lp with the -o DISPLAY option grepped from the user that called the process . If this were feasible it would be quite nice . 3 - Force GNOME3 to show currently used user on : 0 and move idle ones to other displays . I have no idea how 2 could be done and I m not sure if 3 is feasible . I ve already tweaked GNOME3 to log off users that are idle more than 30min but it s not enough to solve the problem . Any help Comment : File a support request with Xerox for their printer driver to not be crazy Comment : Heh this was their response : Development recommends the customer speak to the CUPS support team and see if there is a similar command that can be incorporated into CUPS for this is a way to incorporate the command already provided . Comment : It also seems 3 is not a solution here : unix.stackexchange.com questions 281606 https : unix.stackexchange.com questions 281606 xorg-switch-display-between-two-users Comment : Normally you find a PPD file and hook it up with CUPS so that the only print dialog you see is the OS-provided one . Did you look into that What s the printer model Comment : We used to do this but to have access to the more advanced options stapling hole-punching folding in 3 or 4 you need to go with the binary blobs they provide that opens a cute pop-up menu . These are quite huge printers Xerox ColorQube 9302",
"Question : I set the quotas both ways though lpadmin and by editing printers.conf and neither seem to work i did restart the daemon but print requests are still granted with no error . What is wrong i am running ubuntu linux 9.04 .. . Answer : There is no way to do anything else but speculation if you don t provide a detailed record of what exactly your lpadmin command was or what manipulation of the printers.conf file you made . Also note that direct editing of printers.conf is not recommended unless you do it while cupsd is stopped . CUPS quotas do work for me . However the last job crossing the quota threshold will always start printing since CUPS does know about its number of pages only after starting to process the jobfile not beforehand.. . Comment : so if someone tries to print 100 pages in one job and the quota allows 4 more pages cups will simply allow them to do it Comment : so if someone tries to print 100 pages in one job and the quota allows 4 more pages cups will simply allow them to do it -- Yes . Comment : If you need a really powerful accounting software which you can tweak into every imagineable direction working with CUPS then have a look at PyKota pykota.com http : www.pykota.com .",
"Question : null .. . Answer : I want to modify my printers manually using cups . so I want to do it by CUPS Web interface and by a command like the below one : .. . .. . on my browser or getting printer list so on . . but the error page is shown to me : .. . .. . enter image description here http : i.stack.imgur.com V3o44.png .. . .. . I modified the etc cups cupsd.conf file according to the following format based on the following link http : askubuntu.com questions 23936 how-do-you-administer-cups-remotely-using-the-web-interface : .. . .. . but hasn t any result . How can I do this Has Apple Inc . removed this property from Cups",
"Question : null .. . Answer : I have printers at my school on what I assume is a LAN I can print and access config site only while connected to the same network . The way it works now is that a students send a print job to an industrial plotter . Dedicated staff working the plotters then have to actually release the job from the printer s job-queue webpage after verifying the job is oriented correctly printer s width is 32 etc . I want to centralize printing onto one server instead of students sending prints from their os I want to have them upload the file to my server through a website and the server takes care of the rest from verifying dimensions of the PDF to releasing the print in the plotter . I plan to use a Raspberry Pi kept on 24 7 connected to the network to run my python script so that the printers are accessible to it . I have heard of the CUPS API which has a python wrapper that suits my Flask app needs . At the same time unix systems have the lp and lpr commands to interact with network and local printers . What I ve been doing is making subprocess.Popen calls to execute lp and it does indeed send to the chosen plotter but that leaves actually releasing the job from the queue for the printer to print . My solution is to automate selenium to open the plotter s job-queue page and find the elements I need to analyze and or click so that the job actually starts printing . I was wondering if the actual releasing of the job could be done with the CUPS API Or even with lp lpr",
"Question : I have been trying to use a thermal-printer Bixolon SRP-F310 and print some text using JAVA s PrintService . Printer is detected and there is no exception while calling the print function . I can see in the web interface of Cups that the print event is called . However the printer doesn t print and the error message No pages found can be seen in the web-interface of Cups . Any help will be appreciated . I have included the screenshot of the Cups web-interface and the error logs . Web Interface of Cups : .. . .. . Web Interface of Cups showing the printing job added but with the error No pages found http : i.stack.imgur.com tNVqh.png .. . .. . Error Logs : .. . .. . http : pastebin.com kYiKGsSn Comment : Have you configured your printer . Like reset it s ip-address because on that IP you have to pass the data through CUPs . Comment : Yes I had done that already no luck . .. . Answer : Do the following steps and Hopefully your problem will be solved . 1 . Check the IP of your printer if it s same which you are hitting through CUPs then fine otherwise you have to reset the IP . 2 . Reset IP : Press the feed button of your thermal-printer for 2-3 min a long print receipt will print with detail info about the printer . Now just attache your printer with LAN cable to your PC and open the printer settings . Here you can reset the printer IP according to the manual of that particulate printer . After setting the IP now try again from the server to hit on that thermal-printer with new IP . If your CUPS is installed properly then it will work and otherwise you have to check the CUPS . Check all these things and let me know is that works or any error message . Comment : Printer works fine when I try to print through CUPS Web Interface . That must explain that the IP is set properly . When I try to print through my JAVA Program I can see that the print command is issued but the printer is not printing . I have explained my issue in the question .",
"Question : I have a postscript file and want it to be printed on a IPP capable device or CUPS server . What is the minimal code and dependencies I could get away with to do that . Using LPR or libcups gives me lot of cross-plattform dependencies . So my first approach was to implement a minimal subset of IPP the protocol used by cups and many modern printers since it s only extended HTTP . But unfortuntely a IPP client is a lot more code than a few lines and so far I found no IPP client implementation meant for just printing and not managing a printserver . I would prefer a solution in Python but would also be happy with something in an oter dynamic language . .. . Answer : you need to add remote printer to CUPS : .. . .. . where driver.ppd is the driver to print with .. . .. . ps : this could also work for programatic access if printer is set before . Comment : This obviously needs a working local cups installation a requirement I like to avoid - especially on Windows . Comment : sorry I somehow missed that Comment : also check this old tutorial : owlfish.com thoughts winipp-cups-2003-07-20.html http : www.owlfish.com thoughts winipp-cups-2003-07-20.html",
"Question : null .. . Answer : So my goal is to write an OSX application that basically achieves the following : .. . .. . 1 . It is recognized by the OSX printing system as a printer I already figured out that I ll have to use CUPS to do this so that the user can pick it among the choices . 2 . Then my application among with its GUI get s started . The application provides an interface to modify the data in a PDF context . Here is what I figured out so far by research on the internet : .. . .. . I need to write a CUPS backend which acts as a print server . The backend then opens my application with the print data as input how would I open the GUI programmatically .. . .. . Please forgive if that s complete nonsense . So far I basically just learned programming stuff by myself with tutorials and books and its still hard to grasp all the connections and interactions made by programs .",
"Question : When i check the current state of printer via lpstat command cups returns is ready and printing . But printer doesn t print anything due to paper stuck . Are there any ways to to check remotely if printer works properly or if paper is stuck . Also I couldn t find any logs regarding to cups errors . I ve Canon Pixma ip100 Printer and I m using Ubuntu 12.04 . .. . Answer : Query CUPS for the state of a printer-queue : .. . .. . usr bin env ipptool -tv ipp : localhost printers my pixma OPERATION Get-Printer-Attributes GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 ATTR language attributes-natural-language en ATTR uri printer-uri uri .. . .. . This should output a lot of information . Look for printer-state attributes : .. . .. . printer-state enum idle printer-state-message textWithoutLanguage printer-state-reasons keyword none .. . .. . If the driver uses a fire and forget strategy CUPS is unable to detect malfuncions .",
"Question : Currently I have some problems using cups4j http : www.cups4j.org . For example under linux you can print on a cups printer like this : .. . .. . Important for me is the -o raw flag . My problem is while priniting with cups4j I don t know how to set this flag . The next proper working code snipped shows my method that prints a cups4j PrintJob on a CupsPrinter . The -o raw option is described here pretty well https : www.it.uu.se datordrift maskinpark skrivare cups : .. . .. . The -o raw option allows you to send files directly to a printer without filtering . This is sometimes required when printing from applications that provide their own printer drivers for your printer : .. . .. . Like I said printing itself works like a charm but I have no idea how to add this specific flag . Maybe someone can describe me how to do it . .. . Answer : After analysing the packages sent to CUPS via wireshark I just love it from both the terminal and java program I found the following that worked for me : Comment : Thanks for your answer . I m going to try that and give feedback ."
]
}
|
[] |
open-source
|
UNK_RELATION
|
mercurial-queue@changeset@92
|
mercurial-queue -- mercurial queues is a standard extension of mercurial dvcs that manages @placeholder patches .
|
{
"confidence": [
49.34580612182617,
47.88432312011719,
47.11416244506836,
44.02116394042969,
43.40796661376953,
43.40796661376953,
41.84336471557617,
41.39387512207031,
39.932395935058594,
36.71229934692383,
35.45318603515625,
35.25082015991211,
34.48958206176758,
34.33734130859375,
33.84707260131836,
33.84707260131836,
33.68796157836914,
33.05404281616211,
32.87586212158203,
31.948650360107422,
31.78498077392578,
31.592559814453125,
31.592559814453125,
31.078895568847656,
30.323501586914062,
29.82240867614746,
29.82240867614746,
29.7962646484375,
29.176437377929688,
29.176437377929688,
28.11394691467285,
28.094268798828125,
27.844581604003906,
27.844581604003906,
26.383098602294922,
26.383098602294922,
25.692264556884766,
25.255542755126953,
24.16786003112793,
24.16786003112793,
23.224262237548828,
23.224262237548828,
23.224262237548828,
21.027555465698242,
19.247291564941406,
19.247291564941406,
18.215259552001953,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168,
14.466242790222168
],
"content": [
"I m looking for a mercurial solution .",
"Recently Mercurial added phases .",
"questions 16111090 how-to-push-just-one-specific-patch-in-mercurial-queues 1 answer .. . .. . I have two patches : .. . .. . patch1 .. . patch2 .. . .. . When I apply patch1 that is the only thing that gets applied .",
"This question already has an answer here : .. . .. . How to push just one specific patch in Mercurial Queues",
"Mercurial will join the work once it s done .",
"No as of Mercurial 2.1 this hasn t been implemented yet .",
"See Steve Losh s elegant description here http : stevelosh.com blog 2010 08 a-git-users-guide-to-mercurial-queues multiple-patch-queues .",
"Also I believe git has support for selective pushing that mercurial lacks .",
"I m happy to hear that in future releases of Mercurial extensions will be aware of phases .",
"Normally this metadata is used and manipulated automatically by mercurial and its extensions without the user needing to be aware of it .",
"For example : .. . .. . This will apply only patch2 but not any patches on top of it .",
"You could use guards http : hgbook.red-bean.com read advanced-uses-of-mercurial-queues.html .",
"I just saw an answer stackoverflow.com questions 970669 http : stackoverflow.com questions 970669 how-to-swap-mercurial-queues-in-and-out-of-a-repository 970905 970905 covering 1 and 4 for a more elaborate example .",
"Every time I want to commit a regular changeset to the local repo I need to pop all patches commit the modifications and re-apply the patches .",
"Having just switched to mercurial from svn I would like to take advantage of its distributed nature to keep track of local modifications .",
"But since you aren t happy with that solution here is another one you can try : .. . .. . Mercurial 2.1 introduced the concept of Phases http : mercurial.selenic.com wiki Phases .",
"Use multiple MQ since 1.6 .. . .. . 1 and 2 are covered by an excellent blog http : stevelosh.com blog 2009 08 a-guide-to-branching-in-mercurial by @Steve Losh linked from a slightly related question http : stackoverflow.com questions 1405604 managing-release-branches-in-mercurial .",
"If you want commit without MQ-patches - don t do it by hand .",
"They allow you to maintain an ordering of patches without rearranging your series file and selectively apply only a subset of patches still in a stack-ordered fashion .",
"1 Mercurial have follow-up to comments selective string-based commit - see Record Extension .. . .. . 2 strike Local changes inside versioned public files can be easy received with MQ Extension I do it for site-configs all time strike .",
"Your headache with MQ .. . .. . Every time I want to commit a regular changeset to the local repo I need to pop all patches commit the modifications and re-apply the patches .",
"Execute hg qpop -a to remove all patches from the stack .. . 2 .",
"Use MQ with one patch or multiple consecutive patches per project .",
"If you re going to be creating multi-patch features fixes then qqueue would work But if your features fixes are just single patches and you want to be able to apply one with out applying the others it might be easier to just re-arrange .hg patches series which stores the order that patches will be applied .",
"I do this and hand-editing patches enough that I ve got a shell alias : .. . .. . Alternately if you don t mind applying multiple patches at the same time you could use qgoto :",
"When I m ready to push to the master repo I must again pop the patches push and re-apply them .",
"Thanks I ve got hg 2.0.2 now but this looks promising and it is simpler than using patches .",
"Pros : standard hg or any DVCS practice clean and clear .",
"I would always use named branches because that lets Mercurial do its job : to keep your project history and to remember why you made which changes in what order to your source code .",
"So the question is at the point when you are told to stop working on feature A and begin independent feature B what alternative options are there for : How to manage concurrent development with mercurial",
"A DVCS should be able to do more .",
"The mq extension does make a pretty strong assumption that patch queues are linear .",
"The best I could work out so far involves installing mq and turning the local modifications into a patch two patches actually with logically separate changesets .",
"The only other alternative I can see is to forget about push and only propagate changesets as patches which seems like an even worse solution .",
"I ve recently started working with MQ as I like the idea of working on isolated patches and committing without affecting the repo until the changeset is refined enough .",
"Execute hg qpush --move some-patch to apply some-patch without applying whatever other patches may be before it in the patch stack",
"If only we had multi-core brains : .. . .. . I would always use named branches because that lets Mercurial do its job : to keep your project history and to remember why you made which changes in what order to your source code .",
"1 - I use THG 2 - I have vanilla file in repo 3 - Two indepenent patches in MQ - one per site 4 - work all time with both patches popped 5 - on deploy by hand for now : push --move first copy patched file from WC pop push --move second copy file pop .",
"What I m still trying to figure out in MQ is how to keep patches separate from each other and apply them in no particular order and across different branches .",
"I default hg qinit with -c since I want to mark work-in-progress patches and push pull them but it does take a conceptual leap to realize that you can branch in MQ repo too .",
"This has the benefits that I can develop on a version-controlled configured setup that I don t need to mess with patches that previous configuration stages remain in the history if my webserver stops working after an update I can update back to a configured version and that I only rebase once when I m ready to publish changes .",
"I m quite conflicted on how to manage configuration-files across environment branches template don t feel right as one then has a number of unversioned configuration-files patches or the ExcludeExtension feel like a total cludge and rebasing feels like a lot of work .",
"Every time I want to commit a regular changeset to the local repo I need to pop all patches -- I m sorry but if you wanna commit something then your working dir is dirty -- pop on a dirty working dir is not allowed nasty use refresh warning appears .",
"In hg or any DVCS your commits are local until they are pushed pulled so it s perfect safe and recommended to commit before testing .",
"Before that I used to work with Mercurial s shelves extension but found it a bit unstable .",
"Also the rebase extension fails if you try to rebase a public changeset .",
"3 You can try LocalBranches extension where your local changes stored inside local branches and merge branches on changes - I found this way more troublesome compared to MQ",
"When I do hg qpop and then do hg qpush patch2 for some reason patch1 gets applied too .",
"How can I make them independent from each other",
"You need to use the --move option for that .",
"I am developing a web database that is already in use for about a dozen separate installations most of which I also manage .",
"Each installation has a fair bit of local configuration and customization .",
"I have set up each installed server as its own repo and configured apache not to serve the .hg directories .",
"My difficulty is that the development tree also contains local configuration and I want to avoid placing every bit of it in an unversioned config file .",
"So how do I set things up to avoid propagating local configuration to the master repo and to the installed copies",
"Example : I have a long config.ini file that should be versioned and distributed .",
"The clean version contains placeholders for the database-connection parameters and I don t want the development server s passwords to end up in the repositories for the installed copies .",
"But now and then I ll make changes e.g . new defaults that I do need to propagate .",
"There are several files in a similar situation .",
"This is all convoluted and error-prone .",
"Can someone suggest a better set-up",
"I can t imagine that this is such an unusual configuration but I haven t found anything about it .",
"Edit : After following up on the suggestions here I m coming to the conclusion that named branches plus rebase provide a simple and workable solution .",
"I ve added a description in the form of my own answer .",
"Please take a look .",
"I asked the same question on programmers .",
"programmers.stackexchange.com questions 117998 http : programmers.stackexchange.com questions 117998 how-to-manage-ide-project-files-on-a-forked-repository",
"@sylvanaar thanks for the pointer .",
"But it s not the same question since my local changes sit inside versioned files .",
"I know it sounds different but it really is the same use-case .",
"I wanted to version my IDE configuration-files without having them pushed upstream .",
"The answer was basically structure your directory layout to keep the files separate .",
"BTW i do what you are talking about with MQ and it is truly a hassle .",
"Here is another idea : mercurial.selenic.com wiki ExcludeExtension http : mercurial.selenic.com wiki ExcludeExtension",
"I can already keep some files out of version-control that s what I want to avoid .",
"What I was doing under svn was to maintain templates in a directory which are copied to unversioned files and modified .",
"This means that changes to the templates e.g . new defaults never make it to the installed copies .",
"From your comments it looks like you are already familiar with the best practice for dealing with this : version a configuration template and keep the actual configuration unversioned .",
"The phase is changeset metadata marking it as secret draft or public .",
"However if you made a changeset 1234 which you never want to push to other repositories you can enforce this by manually marking it as secret like this : .. . .. . If you then try to push to another repository it will be ignored with this warning : .. . .. . This solution allows you to .. . .. . 1 . version the local configuration changes .. . 2 . prevent those changes from being pushed accidentally .. . 3 . merge your local changes with other changes which you pull in .. . .. . The big downside is of course that you cannot push changes which you made on top of this secret changeset because that would push the secret changeset along .",
"You ll have to rebase any such changes before you can push them .",
"But I see that having a secret revision will force me to branch commit and rebase for every single commit from then on .",
"Could you suggest the right graft transplant rebase procedure",
"There seem to be so many options .",
"@alexis : I feel graft would be the best choice since that s a core command .",
"But to be honest I personally prefer the solution with versioned templates and unversioned config files so I have no experience with all the ugly details of the approach I describe here .",
"Thanks",
"If that s considered Best Practice I ll think about it more carefully .",
"I ve been using templates for years and they ve led me develop a layer of installation scripts which don t work OOTB on Windows they use make and unix tools .",
"Occam Razor is opposed to unnatural solutions",
"If the problem with a versioned template and an unversioned local copy is that changes to the template don t make it into the local copies how about modifying your app to use an unversioned localconfig.ini and fallback to a versioned config.ini for missing parameters .",
"This way new default-parameters can be added to config.ini and be propagated into your app .",
"Having followed up on the suggestions here I came to the conclusion that named branches plus rebase provide a simple and reliable solution .",
"I ve been using the following method for some time now and it works very well .",
"Basically the history around the local changes is separated into named branches which can be easily rearranged with rebase .",
"I use a branch local for configuration information .",
"When all my repos support Phases I ll mark the local branch secret but the method works without it .",
"local depends on default but default does not depend on local so it can be pushed independently with hg push -r default .",
"Here s how it works : .. . .. . 1 ."
]
}
|
{
"confidence": [
77.04727172851562,
61.60694122314453,
61.46929931640625,
58.218467712402344,
53.301944732666016,
48.830833435058594,
48.17258071899414,
47.78666687011719,
46.09050369262695,
44.58683395385742,
43.04142761230469,
39.122623443603516,
11.285746574401855
],
"content": [
"Question : This question already has an answer here : .. . .. . How to push just one specific patch in Mercurial Queues questions 16111090 how-to-push-just-one-specific-patch-in-mercurial-queues 1 answer .. . .. . I have two patches : .. . .. . patch1 .. . patch2 .. . .. . When I apply patch1 that is the only thing that gets applied . When I do hg qpop and then do hg qpush patch2 for some reason patch1 gets applied too . How can I make them independent from each other .. . Answer : You need to use the --move option for that . For example : .. . .. . This will apply only patch2 but not any patches on top of it .",
"Question : I am developing a web database that is already in use for about a dozen separate installations most of which I also manage . Each installation has a fair bit of local configuration and customization . Having just switched to mercurial from svn I would like to take advantage of its distributed nature to keep track of local modifications . I have set up each installed server as its own repo and configured apache not to serve the .hg directories . My difficulty is that the development tree also contains local configuration and I want to avoid placing every bit of it in an unversioned config file . So how do I set things up to avoid propagating local configuration to the master repo and to the installed copies Example : I have a long config.ini file that should be versioned and distributed . The clean version contains placeholders for the database-connection parameters and I don t want the development server s passwords to end up in the repositories for the installed copies . But now and then I ll make changes e.g . new defaults that I do need to propagate . There are several files in a similar situation . The best I could work out so far involves installing mq and turning the local modifications into a patch two patches actually with logically separate changesets . Every time I want to commit a regular changeset to the local repo I need to pop all patches commit the modifications and re-apply the patches . When I m ready to push to the master repo I must again pop the patches push and re-apply them . This is all convoluted and error-prone . The only other alternative I can see is to forget about push and only propagate changesets as patches which seems like an even worse solution . Can someone suggest a better set-up I can t imagine that this is such an unusual configuration but I haven t found anything about it . Edit : After following up on the suggestions here I m coming to the conclusion that named branches plus rebase provide a simple and workable solution . I ve added a description in the form of my own answer . Please take a look . Comment : I asked the same question on programmers . programmers.stackexchange.com questions 117998 http : programmers.stackexchange.com questions 117998 how-to-manage-ide-project-files-on-a-forked-repository Comment : @sylvanaar thanks for the pointer . But it s not the same question since my local changes sit inside versioned files . Also I believe git has support for selective pushing that mercurial lacks . I m looking for a mercurial solution . Comment : I know it sounds different but it really is the same use-case . I wanted to version my IDE configuration-files without having them pushed upstream . The answer was basically structure your directory layout to keep the files separate . BTW i do what you are talking about with MQ and it is truly a hassle . Comment : Here is another idea : mercurial.selenic.com wiki ExcludeExtension http : mercurial.selenic.com wiki ExcludeExtension Comment : I can already keep some files out of version-control that s what I want to avoid . What I was doing under svn was to maintain templates in a directory which are copied to unversioned files and modified . This means that changes to the templates e.g . new defaults never make it to the installed copies . A DVCS should be able to do more . .. . Answer : If the problem with a versioned template and an unversioned local copy is that changes to the template don t make it into the local copies how about modifying your app to use an unversioned localconfig.ini and fallback to a versioned config.ini for missing parameters . This way new default-parameters can be added to config.ini and be propagated into your app .",
"Question : I am developing a web database that is already in use for about a dozen separate installations most of which I also manage . Each installation has a fair bit of local configuration and customization . Having just switched to mercurial from svn I would like to take advantage of its distributed nature to keep track of local modifications . I have set up each installed server as its own repo and configured apache not to serve the .hg directories . My difficulty is that the development tree also contains local configuration and I want to avoid placing every bit of it in an unversioned config file . So how do I set things up to avoid propagating local configuration to the master repo and to the installed copies Example : I have a long config.ini file that should be versioned and distributed . The clean version contains placeholders for the database-connection parameters and I don t want the development server s passwords to end up in the repositories for the installed copies . But now and then I ll make changes e.g . new defaults that I do need to propagate . There are several files in a similar situation . The best I could work out so far involves installing mq and turning the local modifications into a patch two patches actually with logically separate changesets . Every time I want to commit a regular changeset to the local repo I need to pop all patches commit the modifications and re-apply the patches . When I m ready to push to the master repo I must again pop the patches push and re-apply them . This is all convoluted and error-prone . The only other alternative I can see is to forget about push and only propagate changesets as patches which seems like an even worse solution . Can someone suggest a better set-up I can t imagine that this is such an unusual configuration but I haven t found anything about it . Edit : After following up on the suggestions here I m coming to the conclusion that named branches plus rebase provide a simple and workable solution . I ve added a description in the form of my own answer . Please take a look . Comment : I asked the same question on programmers . programmers.stackexchange.com questions 117998 http : programmers.stackexchange.com questions 117998 how-to-manage-ide-project-files-on-a-forked-repository Comment : @sylvanaar thanks for the pointer . But it s not the same question since my local changes sit inside versioned files . Also I believe git has support for selective pushing that mercurial lacks . I m looking for a mercurial solution . Comment : I know it sounds different but it really is the same use-case . I wanted to version my IDE configuration-files without having them pushed upstream . The answer was basically structure your directory layout to keep the files separate . BTW i do what you are talking about with MQ and it is truly a hassle . Comment : Here is another idea : mercurial.selenic.com wiki ExcludeExtension http : mercurial.selenic.com wiki ExcludeExtension Comment : I can already keep some files out of version-control that s what I want to avoid . What I was doing under svn was to maintain templates in a directory which are copied to unversioned files and modified . This means that changes to the templates e.g . new defaults never make it to the installed copies . A DVCS should be able to do more . .. . Answer : From your comments it looks like you are already familiar with the best practice for dealing with this : version a configuration template and keep the actual configuration unversioned . But since you aren t happy with that solution here is another one you can try : .. . .. . Mercurial 2.1 introduced the concept of Phases http : mercurial.selenic.com wiki Phases . The phase is changeset metadata marking it as secret draft or public . Normally this metadata is used and manipulated automatically by mercurial and its extensions without the user needing to be aware of it . However if you made a changeset 1234 which you never want to push to other repositories you can enforce this by manually marking it as secret like this : .. . .. . If you then try to push to another repository it will be ignored with this warning : .. . .. . This solution allows you to .. . .. . 1 . version the local configuration changes .. . 2 . prevent those changes from being pushed accidentally .. . 3 . merge your local changes with other changes which you pull in .. . .. . The big downside is of course that you cannot push changes which you made on top of this secret changeset because that would push the secret changeset along . You ll have to rebase any such changes before you can push them . Comment : Thanks I ve got hg 2.0.2 now but this looks promising and it is simpler than using patches . But I see that having a secret revision will force me to branch commit and rebase for every single commit from then on . Could you suggest the right graft transplant rebase procedure There seem to be so many options . Comment : @alexis : I feel graft would be the best choice since that s a core command . But to be honest I personally prefer the solution with versioned templates and unversioned config files so I have no experience with all the ugly details of the approach I describe here . Comment : Thanks If that s considered Best Practice I ll think about it more carefully . I ve been using templates for years and they ve led me develop a layer of installation scripts which don t work OOTB on Windows they use make and unix tools . Comment : Occam Razor is opposed to unnatural solutions",
"Question : I am developing a web database that is already in use for about a dozen separate installations most of which I also manage . Each installation has a fair bit of local configuration and customization . Having just switched to mercurial from svn I would like to take advantage of its distributed nature to keep track of local modifications . I have set up each installed server as its own repo and configured apache not to serve the .hg directories . My difficulty is that the development tree also contains local configuration and I want to avoid placing every bit of it in an unversioned config file . So how do I set things up to avoid propagating local configuration to the master repo and to the installed copies Example : I have a long config.ini file that should be versioned and distributed . The clean version contains placeholders for the database-connection parameters and I don t want the development server s passwords to end up in the repositories for the installed copies . But now and then I ll make changes e.g . new defaults that I do need to propagate . There are several files in a similar situation . The best I could work out so far involves installing mq and turning the local modifications into a patch two patches actually with logically separate changesets . Every time I want to commit a regular changeset to the local repo I need to pop all patches commit the modifications and re-apply the patches . When I m ready to push to the master repo I must again pop the patches push and re-apply them . This is all convoluted and error-prone . The only other alternative I can see is to forget about push and only propagate changesets as patches which seems like an even worse solution . Can someone suggest a better set-up I can t imagine that this is such an unusual configuration but I haven t found anything about it . Edit : After following up on the suggestions here I m coming to the conclusion that named branches plus rebase provide a simple and workable solution . I ve added a description in the form of my own answer . Please take a look . Comment : I asked the same question on programmers . programmers.stackexchange.com questions 117998 http : programmers.stackexchange.com questions 117998 how-to-manage-ide-project-files-on-a-forked-repository Comment : @sylvanaar thanks for the pointer . But it s not the same question since my local changes sit inside versioned files . Also I believe git has support for selective pushing that mercurial lacks . I m looking for a mercurial solution . Comment : I know it sounds different but it really is the same use-case . I wanted to version my IDE configuration-files without having them pushed upstream . The answer was basically structure your directory layout to keep the files separate . BTW i do what you are talking about with MQ and it is truly a hassle . Comment : Here is another idea : mercurial.selenic.com wiki ExcludeExtension http : mercurial.selenic.com wiki ExcludeExtension Comment : I can already keep some files out of version-control that s what I want to avoid . What I was doing under svn was to maintain templates in a directory which are copied to unversioned files and modified . This means that changes to the templates e.g . new defaults never make it to the installed copies . A DVCS should be able to do more . .. . Answer : 1 Mercurial have follow-up to comments selective string-based commit - see Record Extension .. . .. . 2 strike Local changes inside versioned public files can be easy received with MQ Extension I do it for site-configs all time strike . Your headache with MQ .. . .. . Every time I want to commit a regular changeset to the local repo I need to pop all patches commit the modifications and re-apply the patches . When I m ready to push to the master repo I must again pop the patches push and re-apply them . is a result-of not polished workflow and some misinterpretation . If you want commit without MQ-patches - don t do it by hand . Add alias for commit which qop -all + commit and use this new command only . And when you push you may don t worry about MQ-state - you push changesets from repo not WC state . Local repo can also be protected without alias by pre-commit hook checking content . 3 You can try LocalBranches extension where your local changes stored inside local branches and merge branches on changes - I found this way more troublesome compared to MQ Comment : Right the RecordExtension enables smaller-than-file granularity for commits . But I was referring to flagging revsets as share or don t share which is what hg phases do as @Wim points out . Could you please elaborate on how you use mq to hold local changes I ve tried but the only way I found seems very clunky . Comment : @alexis - well I use almost like you . 1 - I use THG 2 - I have vanilla file in repo 3 - Two indepenent patches in MQ - one per site 4 - work all time with both patches popped 5 - on deploy by hand for now : push --move first copy patched file from WC pop push --move second copy file pop . It s good for 2 sites on increased amount I ll think maybe about parametrized alias for qpush --move + copy Comment : Every time I want to commit a regular changeset to the local repo I need to pop all patches -- I m sorry but if you wanna commit something then your working dir is dirty -- pop on a dirty working dir is not allowed nasty use refresh warning appears . What did I miss Comment : @springy76 - Why you asked me I quoted OP and clearly I hope show it in my answer",
"Question : I ve recently started working with MQ as I like the idea of working on isolated patches and committing without affecting the repo until the changeset is refined enough . Before that I used to work with Mercurial s shelves extension but found it a bit unstable . What I m still trying to figure out in MQ is how to keep patches separate from each other and apply them in no particular order and across different branches . Here s my normal flow - .. . .. . 1 . Start working on a new patch : .. . .. . 2 . Get a new feature bug to work on : .. . .. . 3 . At this point I d like to get back to working on bugfix and put aside the feature work . I thought it s as simple as : .. . .. . However MQ seems to always use the latest patch created in the series and apply it regardless of the qpop qpush command I m using . I should note that the files I work on are completely separate as well though they can sometimes be the same . Am I missing something here Should I be using hg qqueue for this Thanks . .. . Answer : You could use guards http : hgbook.red-bean.com read advanced-uses-of-mercurial-queues.html . They allow you to maintain an ordering of patches without rearranging your series file and selectively apply only a subset of patches still in a stack-ordered fashion . An example in your case would be : .. . .. . At this point you re in a situation where patch feature comes before bugfix in your stack . Now you can use guards to select one or the other and switch between the two : .. . .. . If you want to work on feature : .. . .. . If you want to work on bugfix : .. . .. . Note that since you selected the positive guard bugfixguard MQ leap-frogged over feature because it s positive guard was different than the one selected and applied the patch bugfix instead which did match the selected guard . Some useful tools when working with guards are hg qseries -v which will display a G instead of the usual U for a guarded unapplied patch and hg qselect -l which will display the guards associated with each patch .",
"Question : I am developing a web database that is already in use for about a dozen separate installations most of which I also manage . Each installation has a fair bit of local configuration and customization . Having just switched to mercurial from svn I would like to take advantage of its distributed nature to keep track of local modifications . I have set up each installed server as its own repo and configured apache not to serve the .hg directories . My difficulty is that the development tree also contains local configuration and I want to avoid placing every bit of it in an unversioned config file . So how do I set things up to avoid propagating local configuration to the master repo and to the installed copies Example : I have a long config.ini file that should be versioned and distributed . The clean version contains placeholders for the database-connection parameters and I don t want the development server s passwords to end up in the repositories for the installed copies . But now and then I ll make changes e.g . new defaults that I do need to propagate . There are several files in a similar situation . The best I could work out so far involves installing mq and turning the local modifications into a patch two patches actually with logically separate changesets . Every time I want to commit a regular changeset to the local repo I need to pop all patches commit the modifications and re-apply the patches . When I m ready to push to the master repo I must again pop the patches push and re-apply them . This is all convoluted and error-prone . The only other alternative I can see is to forget about push and only propagate changesets as patches which seems like an even worse solution . Can someone suggest a better set-up I can t imagine that this is such an unusual configuration but I haven t found anything about it . Edit : After following up on the suggestions here I m coming to the conclusion that named branches plus rebase provide a simple and workable solution . I ve added a description in the form of my own answer . Please take a look . Comment : I asked the same question on programmers . programmers.stackexchange.com questions 117998 http : programmers.stackexchange.com questions 117998 how-to-manage-ide-project-files-on-a-forked-repository Comment : @sylvanaar thanks for the pointer . But it s not the same question since my local changes sit inside versioned files . Also I believe git has support for selective pushing that mercurial lacks . I m looking for a mercurial solution . Comment : I know it sounds different but it really is the same use-case . I wanted to version my IDE configuration-files without having them pushed upstream . The answer was basically structure your directory layout to keep the files separate . BTW i do what you are talking about with MQ and it is truly a hassle . Comment : Here is another idea : mercurial.selenic.com wiki ExcludeExtension http : mercurial.selenic.com wiki ExcludeExtension Comment : I can already keep some files out of version-control that s what I want to avoid . What I was doing under svn was to maintain templates in a directory which are copied to unversioned files and modified . This means that changes to the templates e.g . new defaults never make it to the installed copies . A DVCS should be able to do more . .. . Answer : Having followed up on the suggestions here I came to the conclusion that named branches plus rebase provide a simple and reliable solution . I ve been using the following method for some time now and it works very well . Basically the history around the local changes is separated into named branches which can be easily rearranged with rebase . I use a branch local for configuration information . When all my repos support Phases I ll mark the local branch secret but the method works without it . local depends on default but default does not depend on local so it can be pushed independently with hg push -r default . Here s how it works : .. . .. . 1 . Suppose the main line of development is in the default branch . You could have more branches this is for concreteness . There is a master stable repo that does not contain passwords etc . : .. . .. . ---o--o--o default .. . .. . .. . 2 . In each deployed non-development clone I create a branch local and commit all local state to it . ...o--o--o default .. . .. . L--L local .. . .. . .. . 3 . Updates from upstream will always be in default . Whenever I pull updates I merge them into local n is a sequence of new updates : .. . .. . ...o--o--o--n--n default .. . .. . L--L--N local .. . .. . .. . The local branch tracks the evolution of default and I can still return to old configurations if something goes wrong . 4 . On the development server I start with the same set-up : a local branch with config settings as above . This will never be pushed . But at the tip of local I create a third branch dev . This is where new development happens . ...o--o default .. . .. . L--L local .. . .. . d--d--d dev .. . .. . .. . 5 . When I am ready to publish some features to the main repository I first rebase the entire dev branch onto the tip of default : .. . .. . hg rebase --source min branch dev --dest default --detach .. . .. . .. . The previous tree becomes : .. . .. . ...o--o--d--d--d default .. . .. . L--L local .. . .. . .. . The rebased changesets now belong to branch default . With feature branches add --keepbranches to the rebase command to retain the branch name . The new features no longer have any ancestors in local and I can publish them with push -r default without dragging along the local revisions . Never merge from local into default only the other way around . If you forget to say -r default when pushing no problem : Your push gets rejected since it would add a new head . 6 . On the development server I merge the rebased revs into local as-if I d just pulled them : .. . .. . ...o--o--d--d--d default .. . .. . L--L-----N local .. . .. . .. . 7 . I can now create a new dev branch on top of local and continue development . This has the benefits that I can develop on a version-controlled configured setup that I don t need to mess with patches that previous configuration stages remain in the history if my webserver stops working after an update I can update back to a configured version and that I only rebase once when I m ready to publish changes . The rebasing and subsequent merge might lead to conflicts if a revision conflicts with local configuration changes but if that s going to happen it s better if they occur when merge facilities can help resolve them . Comment : Are you still following this procedure I m quite conflicted on how to manage configuration-files across environment branches template don t feel right as one then has a number of unversioned configuration-files patches or the ExcludeExtension feel like a total cludge and rebasing feels like a lot of work . A good answer is tougher than I expected . Comment : Yes I am . I m managing almost a dozen clones of my project each with local customizations as well as its connection settings and I m very happy with this set-up . Instead of step 3 and 6 I used to rebase the local branch so it s always branching off the tip of default . That gives cleaner-looking history but it made it impossible to simply revert to an older configured state when something goes wrong . So the clones repos contain the history of the configured versions as well as that of the distributed software .",
"Question : Recently Mercurial added phases . Is this possible to restrict mq to work only on phase draft It should show a warning when I try to strip public changeset . .. . Answer : No as of Mercurial 2.1 this hasn t been implemented yet . That release provided the basis for the phase concept but as you ve seen not all commands have been updated to take phases into account . We ll work on that for the next releases . Comment : Well.. . I m happy to hear that in future releases of Mercurial extensions will be aware of phases . : Comment : Some mq commands are aware of phases . If you try use hg qimport on a revision with a public phase it will fail with the message abort : revision X is not mutable . Also the rebase extension fails if you try to rebase a public changeset . Both direct you to hg help phases for more info . Comment : @SteveKaye : good points we did manage to make some commands phase-aware . The support will increase gradually in the next releases just like we now have support for revsets almost everywhere .",
"Question : This is a best practice question and I expect the answer to be it depends . I just hope to learn more real world scenarios and workflows . First of all I m talking about different changes for the same project so no subrepo please . Let s say you have your code base in an hg repository . You start to work on a complicated new feature A then a complicated bug B is reported by your trusted tester you have testers right . It s trivial if the fix for B depends on A . You simlply ci A then ci B . My question is what to do when they are independent or at least it seems now . I can think of the following ways : .. . .. . 1 . Use a separate clone for B . 2 . Use anonymous or named branches or bookmarks in the same repository . 3 . Use MQ with B patch on top of A . 4 . Use branched MQ I ll explain later . 5 . Use multiple MQ since 1.6 .. . .. . 1 and 2 are covered by an excellent blog http : stevelosh.com blog 2009 08 a-guide-to-branching-in-mercurial by @Steve Losh linked from a slightly related question http : stackoverflow.com questions 1405604 managing-release-branches-in-mercurial . The one huge advantage of 1 over the other choices is that it doesn t require any rebuild when you switch from working on one thing to the other because the files are physically separated and independent . So it s really the only choice if for example A and or B touches a header file that defines a tri-state boolean and is included by thousands of C files don t tell me you haven t seen such a legacy code base . 3 is probably the easiest in terms of setup and overhead and you can flip the order of A and B if B is a small and or urgent fix . However it can get tricky if A and B touches the same file s . It s easy to fix patch hunks that failed to apply if A and B changes are orthogonal within the same file s but conceptually it s still a bit risky . 4 can make you dizzy but it s the most powerful and flexible and scalable way . I default hg qinit with -c since I want to mark work-in-progress patches and push pull them but it does take a conceptual leap to realize that you can branch in MQ repo too . Here are the steps mq hg --mq : .. . .. . 1 . hg qnew bugA make changes for A hg qref .. . 2 . mq branch branchA hg qci .. . 3 . hg qpop mq up -rtip .. . 4 . hg qnew bugB make changes for B hg qref .. . 5 . mq branch branchB hg qci .. . 6 . To work on A again : hg qpop mq up branchA hg qpush .. . .. . It seems crazy to take so many steps and whenever you need to switch work you must hg qci hg qpop mq up branch hg qpush . But consider this : you have several named release branches in the same repository and you need to work on several projects and bug fixes at the same time for all of them you d better get guaranteed bonus for this kind of work . You d get lost very soon with the other approaches . Now my fellow hg lovers are there other better alternatives .. . .. . UPDATE qqueue almost makes 4 obsolete . See Steve Losh s elegant description here http : stevelosh.com blog 2010 08 a-git-users-guide-to-mercurial-queues multiple-patch-queues . Comment : As if it s not obvious I m asking for an hg-based approach . But if you can give me a single command from another SCM that works in all cases I m ditching hg . Consider it a challenge git aficionados . Comment : I think you need to specify your problem a little better . Why doesn t this work for all cases : fix bug A commit its patch fix bug B commit its patch Comment : Sorry that I rambled a bit Spolsky-ishly . I mentioned one simple case : if B is a small and or urgent fix . A more realistic situation is that A and B are both long projects that takes a lot of commits and iterations . Also if you have a code-review process like my company does you may have finished A and sent it out for review and you can t sit there twiddling your thumbs waiting for the reviewers so you have to go pick up B in the meanwhile . But then the reviewer may blast your code and you have to make changes to please him her . So there can be countless project switches along the way . Comment : I just saw an answer stackoverflow.com questions 970669 http : stackoverflow.com questions 970669 how-to-swap-mercurial-queues-in-and-out-of-a-repository 970905 970905 covering 1 and 4 for a more elaborate example . Comment : Well it seems like you are just working alone on this project . If you were working in a team you would probably never even ask this question because parallel development would be something you simply do and take the relative cost of it in stride with it . While doing parallel development the best practice is clearly a named branch for every feature and subsequent merge down to trunk when the feature or bug is done with as many merge ups from the trunk to your branch as necessary to stay current on other changes during the development of this feature . Not merging down before you run tests . .. . Answer : It seems like there s no more or better choices than the ones I listed in the question . So here they are again . 1 . Use one clone per project . Pros : total separation thus no rebuild when switching projects . Cons : toolchain needs to switch between two clones . 2 . Use anonymous or named branches or bookmarks in the same repository . Pros : standard hg or any DVCS practice clean and clear . Cons : must commit before switching and rebuild after . 3 . Use MQ with one patch or multiple consecutive patches per project . Pros : simple and easy . Cons : must qrefresh before switching and rebuild after tricky and risky if projects are not orthogonal . 4 . Use one MQ branch or qqueue in 1.6+ per project . Pros : ultra flexible and scalable for the number of concurrent projects .. . Cons : must qrefresh and qcommit before switching and rebuild after feels complicated . Like always there s no silver bullet so pick and choose the one right for the job . .. . .. . UPDATE For anyone who s in love with MQ using MQ on top of regular branches 2 + 3 is probably the most common and preferable practice . If you have two concurrent projects with baseline on two branches for example next release and current release it s trivial to hop between them like this : .. . .. . For the last step qimport should add a -a option to import a line of changesets at once . I hope Meister Geisler http : stackoverflow.com users 110204 martin-geisler notices this :",
"Question : I ve recently started working with MQ as I like the idea of working on isolated patches and committing without affecting the repo until the changeset is refined enough . Before that I used to work with Mercurial s shelves extension but found it a bit unstable . What I m still trying to figure out in MQ is how to keep patches separate from each other and apply them in no particular order and across different branches . Here s my normal flow - .. . .. . 1 . Start working on a new patch : .. . .. . 2 . Get a new feature bug to work on : .. . .. . 3 . At this point I d like to get back to working on bugfix and put aside the feature work . I thought it s as simple as : .. . .. . However MQ seems to always use the latest patch created in the series and apply it regardless of the qpop qpush command I m using . I should note that the files I work on are completely separate as well though they can sometimes be the same . Am I missing something here Should I be using hg qqueue for this Thanks . .. . Answer : No you aren t missing anything . The mq extension does make a pretty strong assumption that patch queues are linear . If you re going to be creating multi-patch features fixes then qqueue would work But if your features fixes are just single patches and you want to be able to apply one with out applying the others it might be easier to just re-arrange .hg patches series which stores the order that patches will be applied . I do this and hand-editing patches enough that I ve got a shell alias : .. . .. . Alternately if you don t mind applying multiple patches at the same time you could use qgoto :",
"Question : This is a best practice question and I expect the answer to be it depends . I just hope to learn more real world scenarios and workflows . First of all I m talking about different changes for the same project so no subrepo please . Let s say you have your code base in an hg repository . You start to work on a complicated new feature A then a complicated bug B is reported by your trusted tester you have testers right . It s trivial if the fix for B depends on A . You simlply ci A then ci B . My question is what to do when they are independent or at least it seems now . I can think of the following ways : .. . .. . 1 . Use a separate clone for B . 2 . Use anonymous or named branches or bookmarks in the same repository . 3 . Use MQ with B patch on top of A . 4 . Use branched MQ I ll explain later . 5 . Use multiple MQ since 1.6 .. . .. . 1 and 2 are covered by an excellent blog http : stevelosh.com blog 2009 08 a-guide-to-branching-in-mercurial by @Steve Losh linked from a slightly related question http : stackoverflow.com questions 1405604 managing-release-branches-in-mercurial . The one huge advantage of 1 over the other choices is that it doesn t require any rebuild when you switch from working on one thing to the other because the files are physically separated and independent . So it s really the only choice if for example A and or B touches a header file that defines a tri-state boolean and is included by thousands of C files don t tell me you haven t seen such a legacy code base . 3 is probably the easiest in terms of setup and overhead and you can flip the order of A and B if B is a small and or urgent fix . However it can get tricky if A and B touches the same file s . It s easy to fix patch hunks that failed to apply if A and B changes are orthogonal within the same file s but conceptually it s still a bit risky . 4 can make you dizzy but it s the most powerful and flexible and scalable way . I default hg qinit with -c since I want to mark work-in-progress patches and push pull them but it does take a conceptual leap to realize that you can branch in MQ repo too . Here are the steps mq hg --mq : .. . .. . 1 . hg qnew bugA make changes for A hg qref .. . 2 . mq branch branchA hg qci .. . 3 . hg qpop mq up -rtip .. . 4 . hg qnew bugB make changes for B hg qref .. . 5 . mq branch branchB hg qci .. . 6 . To work on A again : hg qpop mq up branchA hg qpush .. . .. . It seems crazy to take so many steps and whenever you need to switch work you must hg qci hg qpop mq up branch hg qpush . But consider this : you have several named release branches in the same repository and you need to work on several projects and bug fixes at the same time for all of them you d better get guaranteed bonus for this kind of work . You d get lost very soon with the other approaches . Now my fellow hg lovers are there other better alternatives .. . .. . UPDATE qqueue almost makes 4 obsolete . See Steve Losh s elegant description here http : stevelosh.com blog 2010 08 a-git-users-guide-to-mercurial-queues multiple-patch-queues . Comment : As if it s not obvious I m asking for an hg-based approach . But if you can give me a single command from another SCM that works in all cases I m ditching hg . Consider it a challenge git aficionados . Comment : I think you need to specify your problem a little better . Why doesn t this work for all cases : fix bug A commit its patch fix bug B commit its patch Comment : Sorry that I rambled a bit Spolsky-ishly . I mentioned one simple case : if B is a small and or urgent fix . A more realistic situation is that A and B are both long projects that takes a lot of commits and iterations . Also if you have a code-review process like my company does you may have finished A and sent it out for review and you can t sit there twiddling your thumbs waiting for the reviewers so you have to go pick up B in the meanwhile . But then the reviewer may blast your code and you have to make changes to please him her . So there can be countless project switches along the way . Comment : I just saw an answer stackoverflow.com questions 970669 http : stackoverflow.com questions 970669 how-to-swap-mercurial-queues-in-and-out-of-a-repository 970905 970905 covering 1 and 4 for a more elaborate example . Comment : Well it seems like you are just working alone on this project . If you were working in a team you would probably never even ask this question because parallel development would be something you simply do and take the relative cost of it in stride with it . While doing parallel development the best practice is clearly a named branch for every feature and subsequent merge down to trunk when the feature or bug is done with as many merge ups from the trunk to your branch as necessary to stay current on other changes during the development of this feature . Not merging down before you run tests . .. . Answer : So the question is at the point when you are told to stop working on feature A and begin independent feature B what alternative options are there for : How to manage concurrent development with mercurial Let s look at the problem with concurrency removed the same way you write threaded code- define a simple work flow for solving any problem given to you and apply it to each problem . Mercurial will join the work once it s done . So programmer A will work on feature A . Programmer B will work on feature B . Both just happen to be you . If only we had multi-core brains : .. . .. . I would always use named branches because that lets Mercurial do its job : to keep your project history and to remember why you made which changes in what order to your source code . I agree with Brandon s sentiment but I wonder if he overlooked that feature A has not been tested In the worst case the code compiles and passes unit tests but some methods implement the previous requirements and some methods implement the new ones . A diff against the previous check-in is the tool I would use to help me get back on track with feature A . Is your code for feature A at a point when you would normally check it in Switching from feature A to working on feature B is not a reason to commit code to the head or to a branch . Only check in code that compiles and passes your tests . My reason is if programmer C needs to begin feature C a fresh checkout of this branch is no longer the best place to start . Keeping your branch heads healthy means you can respond quickly with more reliable bug fixes . The goal is to have your tested and verified code running so you want all your code to end up merged into the head of your development and legacy branches . My point seems to be I ve seen branching used inefficiently : code becomes stale and then not used the merge becomes harder than the original problem . Only your option 1 makes sense to me . In general : .. . .. . 1 . You should think your code works before someone else sees it . 2 . Favor the head over a branch . 3 . Branch and check-in if someone else is picking up the problem . 4 . Branch if your automated system or testers need your code only . 5 . Branch if you are part of a team working on a problem . Consider it the head see 1-4 . With the exception of config files the build processes should be a checkout and a single build command . It should not be any more difficult to switch between clones than for a new programmer to join the project . I ll admit my project needs some work here . Comment : thanks for the answer but it seems like you re addressing it within the context of a traditional centralized VCS like svn . In hg or any DVCS your commits are local until they are pushed pulled so it s perfect safe and recommended to commit before testing . Comment : I mostly use svn so I m sure it affects my perspective . In hg after a push does the log show a difference between the push commit and local commits Do you use github It s great but it can be difficult to figure out which repository to clone- which fork contains the bug fixes you need or which is active vs abandoned . Coming back to branching I can see how many commit points helps the author . I think you re saying hg protects other developers from seeing the interim commits because they are not pushed . I think integration tests are where this might not be true . Comment : sorry I didn t notice your comment . Once commits more accurately changesets are pushed they re no longer local . The log doesn t show whether a changeset has been pushed . The outgoing command tells you if it hasn t . There s no protection on the local commits . Anyone can pull them if they want to .",
"Question : This is a best practice question and I expect the answer to be it depends . I just hope to learn more real world scenarios and workflows . First of all I m talking about different changes for the same project so no subrepo please . Let s say you have your code base in an hg repository . You start to work on a complicated new feature A then a complicated bug B is reported by your trusted tester you have testers right . It s trivial if the fix for B depends on A . You simlply ci A then ci B . My question is what to do when they are independent or at least it seems now . I can think of the following ways : .. . .. . 1 . Use a separate clone for B . 2 . Use anonymous or named branches or bookmarks in the same repository . 3 . Use MQ with B patch on top of A . 4 . Use branched MQ I ll explain later . 5 . Use multiple MQ since 1.6 .. . .. . 1 and 2 are covered by an excellent blog http : stevelosh.com blog 2009 08 a-guide-to-branching-in-mercurial by @Steve Losh linked from a slightly related question http : stackoverflow.com questions 1405604 managing-release-branches-in-mercurial . The one huge advantage of 1 over the other choices is that it doesn t require any rebuild when you switch from working on one thing to the other because the files are physically separated and independent . So it s really the only choice if for example A and or B touches a header file that defines a tri-state boolean and is included by thousands of C files don t tell me you haven t seen such a legacy code base . 3 is probably the easiest in terms of setup and overhead and you can flip the order of A and B if B is a small and or urgent fix . However it can get tricky if A and B touches the same file s . It s easy to fix patch hunks that failed to apply if A and B changes are orthogonal within the same file s but conceptually it s still a bit risky . 4 can make you dizzy but it s the most powerful and flexible and scalable way . I default hg qinit with -c since I want to mark work-in-progress patches and push pull them but it does take a conceptual leap to realize that you can branch in MQ repo too . Here are the steps mq hg --mq : .. . .. . 1 . hg qnew bugA make changes for A hg qref .. . 2 . mq branch branchA hg qci .. . 3 . hg qpop mq up -rtip .. . 4 . hg qnew bugB make changes for B hg qref .. . 5 . mq branch branchB hg qci .. . 6 . To work on A again : hg qpop mq up branchA hg qpush .. . .. . It seems crazy to take so many steps and whenever you need to switch work you must hg qci hg qpop mq up branch hg qpush . But consider this : you have several named release branches in the same repository and you need to work on several projects and bug fixes at the same time for all of them you d better get guaranteed bonus for this kind of work . You d get lost very soon with the other approaches . Now my fellow hg lovers are there other better alternatives .. . .. . UPDATE qqueue almost makes 4 obsolete . See Steve Losh s elegant description here http : stevelosh.com blog 2010 08 a-git-users-guide-to-mercurial-queues multiple-patch-queues . Comment : As if it s not obvious I m asking for an hg-based approach . But if you can give me a single command from another SCM that works in all cases I m ditching hg . Consider it a challenge git aficionados . Comment : I think you need to specify your problem a little better . Why doesn t this work for all cases : fix bug A commit its patch fix bug B commit its patch Comment : Sorry that I rambled a bit Spolsky-ishly . I mentioned one simple case : if B is a small and or urgent fix . A more realistic situation is that A and B are both long projects that takes a lot of commits and iterations . Also if you have a code-review process like my company does you may have finished A and sent it out for review and you can t sit there twiddling your thumbs waiting for the reviewers so you have to go pick up B in the meanwhile . But then the reviewer may blast your code and you have to make changes to please him her . So there can be countless project switches along the way . Comment : I just saw an answer stackoverflow.com questions 970669 http : stackoverflow.com questions 970669 how-to-swap-mercurial-queues-in-and-out-of-a-repository 970905 970905 covering 1 and 4 for a more elaborate example . Comment : Well it seems like you are just working alone on this project . If you were working in a team you would probably never even ask this question because parallel development would be something you simply do and take the relative cost of it in stride with it . While doing parallel development the best practice is clearly a named branch for every feature and subsequent merge down to trunk when the feature or bug is done with as many merge ups from the trunk to your branch as necessary to stay current on other changes during the development of this feature . Not merging down before you run tests . .. . Answer : I would always use named branches because that lets Mercurial do its job : to keep your project history and to remember why you made which changes in what order to your source code . Whether to have one clone or two sitting on your disk is generally an easy one given my working style at least : .. . .. . 1 . Does your project lack a build-process so that you can test and run things right from the source code Then I will be tempted to have just one clone and hg up back and forth when I need to work on another branch . 2 . But if you have a buildout virtualenv or other structure that gets built and that might diverge between the two branches then doing an hg up then waiting for the build-process to re-run can be a big pain especially if things like setting up a sample database are involved . In that case I would definitely use two clones one sitting at the tip of trunk and one sitting at the tip of the emergency feature branch . Comment : I voted up but didn t accept this because I mentioned named branch myself and I was asking for alternatives : We do have a build-process not very modern like the code base itself so 2 is indeed the argument for using two clones . However it can be a pain to switch your debug workflow between the two clones for example you d need two launch configurations in Eclipse . Comment : As an alternative to named branches you could number them : In other words there is no good alternative wheel already invented .",
"Question : I ve recently started working with MQ as I like the idea of working on isolated patches and committing without affecting the repo until the changeset is refined enough . Before that I used to work with Mercurial s shelves extension but found it a bit unstable . What I m still trying to figure out in MQ is how to keep patches separate from each other and apply them in no particular order and across different branches . Here s my normal flow - .. . .. . 1 . Start working on a new patch : .. . .. . 2 . Get a new feature bug to work on : .. . .. . 3 . At this point I d like to get back to working on bugfix and put aside the feature work . I thought it s as simple as : .. . .. . However MQ seems to always use the latest patch created in the series and apply it regardless of the qpop qpush command I m using . I should note that the files I work on are completely separate as well though they can sometimes be the same . Am I missing something here Should I be using hg qqueue for this Thanks . .. . Answer : 1 . Execute hg qpop -a to remove all patches from the stack .. . 2 . Execute hg qpush --move some-patch to apply some-patch without applying whatever other patches may be before it in the patch stack",
"Question : I have a dependancy as a subrepository without write access to in my project . I d like to add a few personal customizations to that subrepository - possibly using mq . I also would love to be able to just clone the main repo to build it . Currently I have to : .. . .. . 1 . clone the repo - with subrepositories getting cloned automagically .. . 2 . manually clone all the patchqueues for subrepositories .. . .. . How do I get rid of step 2 Is it even possible without an outside script I m using bitbucket if it makes any difference . .. . Answer : One notion is to make the subrepo not the repo to which you have no write access but a clone of your own based on their repo . cd myclones hg clone http : notmydomain.com their-repo my-clone-of-their-repo .. . .. . and in your project s .hg hgrc you use a subpaths section to map their URL to your local clone : .. . .. . Then you end up with your repo using your local read-write clone of their repo to which you otherwise have read-only access . This has a few benefits : .. . .. . faster -- you re only checking local repositories for all actions .. . writeable -- you can edit directoy in myproject their-repo and commit and push to your local clone .. . .. . And when you want to merge in their upstream changes you just go into . . my-clone-of-their-repo and hg pull and hg-merge their updates into your customizations . Comment : maintaining my own clone is something I don t want to do . having an alien repository as a subrepo is too big of a big win for me to ignore . Comment : Having an alien repository + a mq atop it is nearly identical to having a clone of an alien repository . Indeed their nearly functionally identical . Comment : it is not you have to create manage your clone Comment : A mq is also a repo that requires the same level of management . Really they re near analogous schemes w different window dressing . Comment : sorry dude your answer did not solve my question I am sorry I can t accept it deal with it please ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
changeset
|
UNK_RELATION
|
quirks-mode@web@110
|
quirks-mode -- a technique used by some web browsers for the sake of maintaining backward compatibility with @placeholder pages designed for older browsers .
|
{
"confidence": [
87.37806701660156,
49.56671905517578,
46.43701171875,
42.73286819458008,
41.41643142700195,
41.086814880371094,
40.6844596862793,
40.263031005859375,
38.74110412597656,
38.60014724731445,
38.022743225097656,
37.76641845703125,
37.67460632324219,
37.56406021118164,
37.56190490722656,
37.56190490722656,
37.34515380859375,
37.26950454711914,
37.23902130126953,
36.670352935791016,
36.62892150878906,
36.57810974121094,
36.53971862792969,
36.29048156738281,
36.2722053527832,
36.10896682739258,
35.551918029785156,
35.551918029785156,
35.53150939941406,
35.48411560058594,
35.444091796875,
35.189964294433594,
34.87871551513672,
34.640830993652344,
34.59684753417969,
34.42687225341797,
34.42687225341797,
34.42687225341797,
34.397701263427734,
34.346954345703125,
34.116085052490234,
33.95348358154297,
33.756988525390625,
33.731849670410156,
33.65113067626953,
33.64472961425781,
33.388736724853516,
33.09972381591797,
32.998573303222656,
32.91592788696289,
32.91592788696289,
32.91592788696289,
32.91592788696289,
32.824493408203125,
32.71180725097656,
32.55636978149414,
32.531925201416016,
32.522865295410156,
32.506771087646484,
32.40483856201172,
32.40483856201172,
32.26400375366211,
32.26400375366211,
32.26400375366211,
32.26400375366211,
32.196189880371094,
32.03237533569336,
32.02522277832031,
32.02522277832031,
31.964027404785156,
31.919178009033203,
31.915971755981445,
31.734952926635742,
31.727458953857422,
31.712575912475586,
31.660184860229492,
31.637344360351562,
31.62413787841797,
31.49856948852539,
31.420774459838867,
31.36989402770996,
31.157939910888672,
31.05614471435547,
30.901880264282227,
30.893892288208008,
30.893892288208008,
30.893892288208008,
30.893892288208008,
30.893892288208008,
30.893892288208008,
30.893892288208008,
30.893892288208008,
30.86927032470703,
30.86927032470703,
30.86927032470703,
30.86927032470703,
30.86927032470703,
30.86927032470703
],
"content": [
"Here s how Wikipedia https : en.wikipedia.org wiki Quirks mode defines quirks-mode : .. . .. . In computing quirks-mode refers to a technique used by some web browsers for the sake of maintaining backward compatibility with web pages designed for older browsers instead of strictly complying with W3C and IETF standards in standards mode .",
"Quirks mode is designed to allow much older websites to work in comparatively newer browsers .",
"In particular older versions of IE will render quirks-mode pages differently from other browsers .",
"In quirks-mode browsers tend to assume pixels if provided with an integer instead of a length .",
"It wasn t standard it isn t the way things are done in more modern browsers except for some backward compatibility .",
"Quirks mode is not recommended for 21st century webpages because different browsers have different quirks",
"And unfortunately it s not compatibility-mode it really is Document Mode IE5 Quirks .",
"Rendering modern web pages in quirks-mode however can be unpredictable and unreliable .",
"in Quirks mode .",
"In IE10 compatibility view if there is no doctype declaration it forces it to IE5 Quirks mode .",
"According to http : www.quirksmode.org css quirksmode.html : The problem was that some pages written in quirks-mode did have doctypes .",
"The HTML5 doctype was designed to put all browsers into standards mode .",
"The HTML5 doctype was designed to be the shortest code that didn t trigger quirks-mode no doctype quirks .",
"Based on the documentation on that site : .. . .. . Internet Explorer 7 and 6 don t have a real non-quirks mode it is similar to the limited quirks-mode of the other browsers .",
"With all the latest browsers like IE9 FF4 ever updating chrome etc . do we still need quirks-mode",
"If it s a public-facing website then using quirks-mode now should not even be contemplated as it will look hideous in a lot of modern browsers .",
"Major browsers use this technique Including Chrome for Android .",
"Other browsers do not do this for them quirks-mode is simply a case of changing some styling defaults box-sizing being the main one they don t disable any features for quirks-mode so they will render quirks-mode pages quite differently to IE .",
"css1compat quirks-mode",
"The JavaScript implementation remains identical whether in quirks-mode strict-mode or being used in some non-browser context .",
"DOCTYPE html in order to maximize your compatibility with many browsers .",
"IE9 defaults to quirks-mode and the compatibility view button goes away .",
"Using document.compatMode will tell you the mode you are in with most browsers .",
"In addition IE considers quirks-mode to be a compatibility-mode for IE5.5 .",
"Now to answer your question : All the major browsers have implemented quirks-mode and it will be used in cases where the site doesn t provide a DOCTYPE or uses one that triggers quirks-mode .",
"This means that if the parent page is in standards mode then any iframes will also be in standards mode even if they would normally be in quirks-mode or compatibility-mode .",
"Quirks mode is really dad .",
"IE5 quirks-mode",
"If you are maintaining code that uses quirks-mode then you should take the time to convert to use standards mode .",
"IE11 has two separate quirks modes : One is the IE5-compatible mode described above the other is intended to be compatible with the quirks modes in other browsers .",
"If I understand quirks-mode correctly a page that does not validate against its declared doctype is not enough to trigger quirks-mode .",
"The application does not set any doctype and therefore sends both browsers into quirks-mode .",
"The legacy quirks-mode is called IE5 Quirks mode and behaves as quirks-mode in IE9 .",
"In quirks-mode https : en.wikipedia.org wiki Quirks mode also known as compatibility-mode https : en.wikipedia.org wiki Compatibility mode the browser simulates an old browser so it can parse old web pages pages authored before the advent of web-standards .",
"A bit weird.. . ...if running in IE8 quirks-mode or in compatibility view mode the table added by the following code doesn t render .",
"Using IE8 really with quirks-mode .",
"works in quirks-mode broken 2 .",
"There is no relationship between charset and Quirks Mode .",
"new quirks-mode http : i.stack.imgur.com Oa48v.png and IE5 quirks-mode :",
"They are not sent to browsers so they do not affect a browser s choice of mode except indirectly if the directive generates some content into the document .",
"And the IE9 compatibility-mode also played that web page .",
"Given this HTML : .. . .. . Why does this JQuery selector match it on some browsers and some pages but not on others",
"I cannot switch to quirks-mode because the application is not-usable the entire page is not viewable controls inaccessible in Quirks or standards mode .",
"You can check for quirks-mode in any modern browser by checking that document.compatMode BackCompat .. . .. . However one of the major problems with quirks-mode is that it is not consistent between all browsers .",
"According to this article http : css-tricks.com ie-iframe-quirksmode a page in an iframe who s parent page is in quirks-mode will also render in quirks-mode .",
"This method is case-insensitive on quirks-mode pages and case-sensitive on non-quirksmode aka standards-compliant pages .",
"IE5 quirks-mode http : i.stack.imgur.com DJSas.png .. . .. . If your application works also in Chrome and Firefox you ll probably want to use Quirks mode if only IE s quirks-mode is supported turn on IE5 quirks-mode .",
"I realize that adding the doctype changes the mode the browser displays the document in the doctype enables standards mode instead of quirks-mode .",
"Other browsers will overlook it .",
"The only thing that happens is it goes into Document Mode : Quirks : .. . .. .",
"It does not have a tag to force quirks-mode .",
"Surely no application still needs to run in quirks-mode",
"How did you check if it was running quirks-mode",
"Those were the last browsers which did not support standards mode so any sites which needed to include support for them would have needed to be able to work in quirks-mode .",
"I am using the DOCTYPE below for my pages and it keeps the page in Quirks mode and my table looks like the one in the link below .",
"I can tell from my layout that it s certainly quirks-mode .",
"When showing the printing preview in IE11 with enabled compatibility view and quirks-mode some input elements won t be filled although there are values set in the page .",
"Yes to make pages open in IE5 quirks you add IE 5 but what about the new quirks-mode",
".. . The legacy quirks-mode is called IE5 Quirks mode and behaves as quirks-mode in IE9 .",
"But my app is not compatible with quirks-mode .",
"What is the reason for using Quirks mode",
"If the page is rendered from within a folder in an asp.net web site it does not render in quirks-mode and therefore renders incorectly .",
"We assume we ve changed something in the web site configuration that prevents the page rendering in quirks-mode by default .",
"The issue is that the same page is rendered in quirks-mode if it is in a virtual directly outside the asp.net web site .",
"When I open the page in the web site in one tab in ie10 it is not in quirks-mode .",
"From the IE blog http : blogs.msdn.com b ie archive 2011 12 14 interoperable-html5-quirks-mode-in-ie10.aspx : .. . .. . IE10 s HTML5 quirks-mode is used for pages without a DOCTYPE or with a legacy DOCTYPE as defined in HTML5 .",
"http : talkingsoccer.net inquirks.jpg .. . .. . When I change the doctype to either of the ones below the pages are taken out of quirks-mode and use IE8 Standards mode I m using IE8 as shown in the link below .",
"The other browsers also display in quirks but unlike IE this does not put them into pseudo-IE5.5 mode so they still render fine .",
"In most browser except IE there are three different modes : .. . .. . Quirks mode .. . .. . This is where browsers wilfully do not follow certain standards in order to be compatible with broken content .",
"this solved my quirks-mode problem : stackoverflow.com questions 6294301 http : stackoverflow.com questions 6294301 dreamweaver-causing-quirks-mode-in-internet-explorer",
"That doesn t help you write javascript that executes down one path for quirks-mode and a different path for standards mode .",
"It looks Standard mode not quirks-mode .",
"If the main page is in quirks-mode then all frames or iframes within that page will also be in quirks-mode even if they are written to be standards compliant .",
"It s possible that the HTML5 Doctype is causing you problems with those older browsers .",
"Here is the error I get when I test on IE8+ it works fine on IE7 and other browsers : .. . .. . sce : iequirks http : errors.angularjs.org 1.2.12 sce iequirks IE8 in quirks-mode is unsupported error in component sce Strict Contextual Escaping does not support Internet Explorer version 9 in quirks-mode .",
"Unfortunately in IE10 this doesn t work if the outer page renders in IE8 mode using .. . .. . Which I m still searching for a solution to.. . .. . .. . See also iframe not rendering in ie9 mode when containing page is in quirks-mode http : stackoverflow.com questions 12467151 iframe-not-rendering-in-ie9-mode-when-containing-page-is-in-quirks-mode",
"Quirks Mode http : www.cs.tut.fi jkorpela quirks-mode.html is quirky and you should not rely on anything particular regarding it .",
"When you remove the doctype the browser goes into quirks-mode which does things differently to help older code that is not validated to render correctly .",
"Situation : We have a legacy web application that does not set any doctype and therefore sends browsers to quirks-mode which we need to get working in IE 11 .",
"Is it possible Using IE 7 or 8 to have one frame still in quirks-mode and another in standards mode or must the whole browser be in one mode or another",
"I have two demo pages JSFiddle isn t really viable with IE in Quirks mode so these are hosted elsewhere .",
"And of course - quirks-mode .",
"EDIT 2 : We re now targetting .net-4.5 and I ve read some stuff online that says that disables quirks-mode .",
"I m not sure what the rendering difference between almost quirks and quirks-mode is guessing probably closer to quirks since it s rendering like that for you but it does pretty definitively say that you won t get fulls standards mode with a frameset doctype .",
"If I change the page to quirks-mode the flicker vanishes .",
"The problem is that the layout is off in IE8 quirks-mode .",
"Don t all IEs revert to quirks-mode without it",
"Because IE is an outlier when it comes to quirks-mode .",
"fix the html that s triggering quirks-mode .",
"quirks-mode : .. . .. . So..with that being a restriction. . any ideas",
"You should never use quirks-mode .",
"Hmm.. . How are you telling if IE is in quirks-mode",
"That means that the only thing causing Quirks mode is the page itself .",
"If you don t want to change it you can t force Quirks mode .",
"I find that hard to believe since the server doesn t affect quirks-mode .",
"Even retro versions of jQuery and jQuery UI don t support Quirks mode .",
"Is there a way from html to force it to IE Default Quirks mode",
"The problem for your case is IE10 s interoperable HTML5 quirks-mode ."
]
}
|
{
"confidence": [
76.77609252929688,
63.9812126159668,
58.95782470703125,
52.61048889160156,
50.5394401550293,
49.61658477783203,
48.93873596191406,
48.17201232910156,
47.87290954589844,
47.21388244628906,
46.6491584777832,
45.6025390625,
45.46333694458008,
45.461788177490234,
45.184871673583984,
44.814178466796875,
44.814178466796875,
44.71221160888672,
44.34367370605469
],
"content": [
"Question : This is the entire code : .. . .. . Nothing appears . But if I remove the first line the doctype all of the page is green as expected . I have two questions : .. . .. . 1 . How do I make the div fill the page without removing that tag 2 . Why does removing the doctype make it work Comment : to have element height same as view height you need to use view horizontal unit vh full height is 100vh . .. . Answer : CSS height property percentage values DOCTYPE .. . .. . The first part of your question asking how to apply a 100 height to your div has been answered several times by others . Essentially declare a height on the root element : .. . .. . The second part of your question has received much less attention . I ll try to answer that . Why does removing the doctype make the green background work .. . .. . When you remove the DOCTYPE document type declaration https : en.wikipedia.org wiki Document type declaration the browser switches from standards mode to quirks-mode . In quirks-mode https : en.wikipedia.org wiki Quirks mode also known as compatibility-mode https : en.wikipedia.org wiki Compatibility mode the browser simulates an old browser so it can parse old web pages pages authored before the advent of web-standards . A browser in quirks-mode pretends to be IE4 https : www.cs.tut.fi jkorpela quirks-mode.html IE5 and Navigator 4 https : developer.mozilla.org en-US docs Quirks Mode and Standards Mode so it can render old code as the author intended . Here s how Wikipedia https : en.wikipedia.org wiki Quirks mode defines quirks-mode : .. . .. . In computing quirks-mode refers to a technique used by some web browsers for the sake of maintaining backward compatibility with web pages designed for older browsers instead of strictly complying with W3C and IETF standards in standards mode . Here s MDN https : developer.mozilla.org en-US docs Quirks Mode and Standards Mode s take : .. . .. . In the old days of the web pages were typically written in two versions : One for Netscape Navigator and one for Microsoft Internet Explorer . When the web-standards were made at W3C browsers could not just start using them as doing so would break most existing sites on the web . Browsers therefore introduced two modes to treat new standards compliant sites differently from old legacy sites . Now here s the specific reason why the height : 100 in your code works in quirks-mode but not in standards mode : .. . .. . In standards mode https : developer.mozilla.org en-US docs Quirks Mode and Standards Mode if the parent element has a height : auto no height defined then the percentage heights of child elements will also be treated as height : auto as per the spec http : www.w3.org TR CSS21 visudet.html propdef-height . This is why the answer to your first question is html height : 100 . For height : 100 to work in your div you must set a height on parent elements more details http : stackoverflow.com a 31728799 3597276 . In quirks-mode however if the parent element has a height : auto then the percentage heights of child elements are measured relative to the viewport . Here are three references covering this behavior : .. . .. . https : www.cs.tut.fi jkorpela quirks-mode.html .. . http : stackoverflow.com a 1966377 3597276 .. . https : developer.mozilla.org en-US docs Mozilla Quirks Mode Behavior .. . .. . .. . .. . TL DR .. . .. . Here s what developers need to know in a nutshell : .. . .. . A browser in quirks-mode will render web pages in a way that is unpredictable unreliable and often undesirable . So always include a DOCTYPE for the document to render in standards mode https : developer.mozilla.org en-US docs Quirks Mode and Standards Mode . .. . Selecting the right DOCTYPE used to be an ambiguous and somewhat confusing process with many DOCTYPE versions to choose from https : en.wikipedia.org wiki Quirks mode Comparison of document-types . But today the process is as simple as ever . Just use : Comment : I marked this old question I answered http : stackoverflow.com questions 12125961 body-background-color-property-doesnt-work-correctly-with-html5-doctype as a duplicate of this one . Another one off your bucket list",
"Question : If I understand IE document modes correctly : .. . .. . quirks-mode : .. . .. . uses HTML + css rendering engine of IE version 5 .. . .. . then we have some XU-compatible-modes : .. . .. . like ie6 7 8 etc .. . .. . and then standard mode : .. . .. . which uses the current implementation .. . .. . For the sake of simplicity I m not mentioning semi-standard mode .. . .. . But What about Chrome I mean what version quirks-mode refers to it must be those versions when Html + css standards were not yet implemented properly I guess.. . .. . .. . Also what about javascript does quirks-mode has an impact on javascript implementation Any help is appreciated . Comment : IE 10 and non ie browser use do the quirks mod according to the description of whatwg : Quirks Mode https : quirks.spec.whatwg.org Comment : Quirks is an IE specific thing Chrome uses a different engine which - unless deployed behind a strict enterprise managed network - is generally automatically updated . The idea of targeting specific browser versions is an outdated concept you should instead check for supported features https : modernizr.com . .. . Answer : Firstly no there is no IE6-compatibility mode . The XU-compatible modes start at IE7 mode . Now to answer your question : All the major browsers have implemented quirks-mode and it will be used in cases where the site doesn t provide a DOCTYPE or uses one that triggers quirks-mode . You can check for quirks-mode in any modern browser by checking that document.compatMode BackCompat .. . .. . However one of the major problems with quirks-mode is that it is not consistent between all browsers . In particular older versions of IE will render quirks-mode pages differently from other browsers . In addition IE considers quirks-mode to be a compatibility-mode for IE5.5 . Because of this it disables most of the browser features that have been implemented in later versions in order for the page to render as closely as possible to how it would have done in IE5.5 . Other browsers do not do this for them quirks-mode is simply a case of changing some styling defaults box-sizing being the main one they don t disable any features for quirks-mode so they will render quirks-mode pages quite differently to IE . In addition to the above IE11 is different again from earlier IE versions . IE11 has two separate quirks modes : One is the IE5-compatible mode described above the other is intended to be compatible with the quirks modes in other browsers . These two modes can be triggered in different ways but it can be confusing and not always obvious which one you ll get . For all of these reasons you should avoid quirks-mode . Stick with standards mode and you will get reasonably consistent rendering across all browsers .",
"Question : With all the latest browsers like IE9 FF4 ever updating chrome etc . do we still need quirks-mode If yes where is it useful In which scenario Comment : avoid the trouble with IE memory-leaks when in quirks-mode .. . Answer : Quirks mode is designed to allow much older websites to work in comparatively newer browsers . New development should never be done in Quirks Mode but Quirks Mode will stick around as long as there are still old un-updated websites that require it ie forever .",
"Question : With all the latest browsers like IE9 FF4 ever updating chrome etc . do we still need quirks-mode If yes where is it useful In which scenario Comment : avoid the trouble with IE memory-leaks when in quirks-mode .. . Answer : No . You should never use quirks-mode . It ceased to be of any relevance once IE 5.0 and 5.5 stopped being used . Those were the last browsers which did not support standards mode so any sites which needed to include support for them would have needed to be able to work in quirks-mode . However IE6 along with all versions of all browsers released since then supports standards mode . Some of them still carry legacy support for quirks-mode but you shouldn t allow them to use it . it s triggered if you neglect to include a DOCTYPE at the top of your HTML code which is why you shold always declare a doctype .. . .. . In the unlikely event that you need to support IE5 then use quirks-mode . Otherwise avoid at all costs . If you are maintaining code that uses quirks-mode then you should take the time to convert to use standards mode . If it s a public-facing website then using quirks-mode now should not even be contemplated as it will look hideous in a lot of modern browsers . Even if it s in a corporate environment then you I would strongly reccommend converting it to standards mode as even IE6 users will benefit from that if nothing else it ll make their eventual upgrade to a newer browser less painful . The only time you won t be able to use standards mode that is if you have a client who is still stuck with IE5 . But if you ve got that then you should have run away screaming already .",
"Question : Let s suppose you have a page with a relatively strict doctype and HTML markup that s pretty close to compliant but perhaps misses in a few silly ways perhaps because of user content that s out of your control.. . say you re working on a content-management-system or a theme for a content-management-system where you control some basic structure and need some javascript but you re not responsible for everything else that goes into pages . How can you tell or : what will determine when the browser decides to go into quirks-mode rather than use it s more standards compliant engine I m looking for answers for each of the major browsers since IE Chrome Safari and Firefox will of course all handle that differently . Is one single error enough to force it or do you have some leeway .. . Answer : If I understand quirks-mode correctly a page that does not validate against its declared doctype is not enough to trigger quirks-mode . It just won t display correctly . The best resource I ve found for determining how different browsers handle each doctype is here http : hsivonen.iki.fi doctype .",
"Question : Let s suppose you have a page with a relatively strict doctype and HTML markup that s pretty close to compliant but perhaps misses in a few silly ways perhaps because of user content that s out of your control.. . say you re working on a content-management-system or a theme for a content-management-system where you control some basic structure and need some javascript but you re not responsible for everything else that goes into pages . How can you tell or : what will determine when the browser decides to go into quirks-mode rather than use it s more standards compliant engine I m looking for answers for each of the major browsers since IE Chrome Safari and Firefox will of course all handle that differently . Is one single error enough to force it or do you have some leeway .. . Answer : In Firefox and Opera you can determine if your browser is in quirks-mode by checking page info . Using document.compatMode will tell you the mode you are in with most browsers . In Chrome Safari and IE run this javascript in the address-bar : .. . .. . note that you ll need to re-type the javascript : portion after pasting into your address-bar due to recent security changes Comment : There is another potential value in IE which I came across when forcing an old page into EDGE mode . The value was BackCompat",
"Question : Let s suppose you have a page with a relatively strict doctype and HTML markup that s pretty close to compliant but perhaps misses in a few silly ways perhaps because of user content that s out of your control.. . say you re working on a content-management-system or a theme for a content-management-system where you control some basic structure and need some javascript but you re not responsible for everything else that goes into pages . How can you tell or : what will determine when the browser decides to go into quirks-mode rather than use it s more standards compliant engine I m looking for answers for each of the major browsers since IE Chrome Safari and Firefox will of course all handle that differently . Is one single error enough to force it or do you have some leeway .. . Answer : According to http : www.quirksmode.org css quirksmode.html : The problem was that some pages written in quirks-mode did have doctypes . Therefore each browser has its own list with doctypes that trigger quirks-mode . See this browser comparison chart for an overview of these lists : http : hsivonen.iki.fi doctype .. . .. . Hope this helps",
"Question : I am working on converting a web page from HTML 4 to HTML 5 . I have noted that two major differences which caused me lots of problems is that class names are case-sensitive in HTML 5 and that statements like width : 10 are not allowed in CSS files used by HTML 5 pages the statements have to be width : 10px . One possible reason for my experience is that my HTML 4 documents is in Quirks mode also known as HTLM 4 Transitional . .. . Answer : There are numerous differences that make a brief answer nearly impossible . Here are a few key points and pointers for further research : .. . .. . You ll want to switch to a standards based doctype e.g . DOCTYPE html in order to maximize your compatibility with many browsers . The W3C summary of differences http : www.w3.org TR html5-diff may be helpful . Online scanners such as the W3C validator http : validator.w3.org or the IE compatibility check https : www.modern.ie en-us compat-scan may help flag some issues . Many problems and solutions are known . If you re unsure sites like Can I use http : caniuse.com MDN https : developer.mozilla.org en-US HTML5 rocks http : www.html5rocks.com en and others are immensely useful . In general you may find it easier to create a new design from scratch rather than trying to retrofit an older design to fit new capabilities and design-patterns . Hope this helps.. . .. . .. . -- Lance",
"Question : We use IIS8 as our web server . We have an old html page that renders in quirks-mode which is what we want in ie10 when in a virtual-directory . It does not have a tag to force quirks-mode . If the page is rendered from within a folder in an asp.net web site it does not render in quirks-mode and therefore renders incorectly . We assume we ve changed something in the web site configuration that prevents the page rendering in quirks-mode by default . Can anyone suggest what this might be To avoid writing an essay on why we re doing what we re doing let me just say that we d prefer not to have the change the html page to force quirks-mode or change it in any way in fact . It would be much mode convenient to establish what change has caused the page to not render in quirks-mode by default and make a change in the application installer to change our customers web sites automatically . EDIT : I forgot to mention that in both cases I m using compatibilty mode . EDIT 2 : We re now targetting .net-4.5 and I ve read some stuff online that says that disables quirks-mode . Edit 3 : It seems that we switched to 4.5 before this problem became apparent . Edit 4 : The answer is twofold . Prompted by Andrew Morton s comment I did a global search for X-UA-Compatible and found Response.AddHeader X-UA-Compatible IE edge in an Application BeginRequest handler . However this predates the problem by several years . It must be that some other change more recentlly combined with this has caused the effect . Anyway we ve spent enough time on this and have decided to add a tag to the html to force quirks-mode . Comment : How about you fix the page Never heard of a page that renders incorrectly if NOT in quirk mode . Comment : As I said there are good reasons to avoid changing the page if that is possible . Comment : stackoverflow.com questions 14611264 http : stackoverflow.com questions 14611264 x-ua-compatible-content-ie-9-ie-8-ie-7-ie-edge has some info on how to force compatibility-mode Comment : I m aware of that and it does work . It s just that the pages will need to be updated manually on clients web sites so we d like to avoid it . Comment : Have you checked the HTTP headers to see if an X-UA-Compatible has got in there . It could be set in a web.config file under system.webServer httpProtocol customHeaders . .. . Answer : From the IE blog http : blogs.msdn.com b ie archive 2011 12 14 interoperable-html5-quirks-mode-in-ie10.aspx : .. . .. . IE10 s HTML5 quirks-mode is used for pages without a DOCTYPE or with a legacy DOCTYPE as defined in HTML5 . That means that the only thing causing Quirks mode is the page itself . If you don t want to change it you can t force Quirks mode . There is no server-side fix for this . It is all client-side . Comment : As you guessed there is no DOCTYPE . The issue is that the same page is rendered in quirks-mode if it is in a virtual directly outside the asp.net web site . Comment : I find that hard to believe since the server doesn t affect quirks-mode . Sure ASP.NET doesn t change the file or that your browser remembered setting Quirks mode on a specific page Comment : I don t know why asp.net would change an html file but perhaps it does . When I open the page in the web site in one tab in ie10 it is not in quirks-mode . When I open the copy of the page in a separate virtual-directory in the next tab it is in quirks-mode . Comment : Some browser setting maybe",
"Question : I am working on converting a web page that was creating using old web-standards to support modern web browsers . The web page currently renders in Quirks Mode within Internet Explorer 9 Firefox and Chrome . In IE9 I am able to select the Document Mode in which I would like the web page I am viewing to render in . This makes things easier as I can jump between Quirks Mode and IE9 Standards Mode . I do not have to add modify the DOCTYPE tag within the code of the web page . Can I do the same in Firefox and Chrome .. . Answer : No . In most browser except IE there are three different modes : .. . .. . Quirks mode .. . .. . This is where browsers wilfully do not follow certain standards in order to be compatible with broken content . IE 10 is frozen in IE5.5 era quirks-mode . Other browser s quirks-mode including IE10 have evolved to be interoperable with each other so they break in more predictable ways . The usual method of setting quirks-mode is not not include a doctype or include content before the doctype . It is highly recommended not to rely on quirks-mode rendering . Almost standards mode .. . .. . This renders like standards mode except the behaviour of vertical sizing of table cells . Triggered with a doctype of : .. . .. . Standards mode .. . .. . This is the mode developers should be using with browsers behaving to the defined standards . Triggered by using a valid doctype such as DOCTYPE html .. . .. . There is no way to set any other modes in Non-IE browsers . You can find out more at http : hsivonen.iki.fi doctype .. . .. . I d advise just to try to update the site to standards mode if you can as it will only cause more issues the longer it is left in legacy rendering modes . It will also not take advantage of enhancements in modern versions of IE such as performance improvements . Comment : Thanks very informative",
"Question : I am coding a Frontend which works well in IE7 Standards Mode and IE8 Standards Mode . When I start up Internet Explorer and load the page both IE7 and IE8 go to Quirks Mode directly . How can I force both IE7 and IE8 to always load the page in Standards Mode I have no special meta-tags added so far . Thanks for helping me out .. . .. . Edit : My doctype and head looks as follows at the moment : Comment : Do you have a doctype Comment : I know I m late to the party but here s a quick note : if you set the render mode in the IE developer tools that mode will stick next time you load the page . So if you choose Quirks Mode it ll stick with that mode until you change it manually or close the tab . So enjoy . Comment : Matchu your comment was invaluable to me . By manually setting the render mode I was completely messing up my testing Thank you : Comment : Unless you use a http header it won t always work stackoverflow.com a 17258683 200442 http : stackoverflow.com a 17258683 200442 Comment : It s really simple : Determining IE 9 s Document Mode http : ie.microsoft.com testdrive ieblog 2010 Jun 16 IEsCompatibilityFeaturesforSiteDevelopers 1.svg .. . Answer : It s possible that the HTML5 Doctype is causing you problems with those older browsers . It could also be down to something funky related to the HTML5 shiv . You could try switching to one of the XHTML doctypes and changing your markup accordingly at least temporarily . This might allow you to narrow the problem down . Is your design breaking when those IEs switch to quirks-mode If it s your CSS causing things to display strangely it might be worth working on the CSS so the site looks the same even when the browsers switch modes . Comment : The HTML5 doctype was designed to put all browsers into standards mode .",
"Question : Let s suppose you have a page with a relatively strict doctype and HTML markup that s pretty close to compliant but perhaps misses in a few silly ways perhaps because of user content that s out of your control.. . say you re working on a content-management-system or a theme for a content-management-system where you control some basic structure and need some javascript but you re not responsible for everything else that goes into pages . How can you tell or : what will determine when the browser decides to go into quirks-mode rather than use it s more standards compliant engine I m looking for answers for each of the major browsers since IE Chrome Safari and Firefox will of course all handle that differently . Is one single error enough to force it or do you have some leeway .. . Answer : The full answer to your actual specific question of Is one single error enough to force it or do you have some leeway is that it totally depends on the error . For example .. . .. . will force quirks-mode in IE 6 7 despite not really ebing an error they just throw a total wobbly when the very first line of the file is not a declaration . A quick list of types quirks can be found here http : alastairc.ac testing IE 5FDoctypes .. . .. . Try sticking the following line in your HTML for testing very bad javascript behavious I m passing on here - sorry...make sure this never goes live : Comment : Thanks for the javascript tester because my first two tries to escape quirks-mode didn t work . Comment : css1compat quirks-mode",
"Question : For nearly a decade i ve been using : .. . .. . to return the ideal height of the browser window . This worked fine when i was forcing Internet Explorer into quirks-mode by using a quirks-mode doctype : .. . .. . Now i want to opt into standards mode except the meaning of scrollHeight has changed http : www.ozzu.com website-design-forum using-doctype-invalidates-client-height-t100424.html : .. . .. . Quirks Mode : document.body.scrollHeight the height of the document .. . Standards Mode : document.body.scrollHeight the height of the body element .. . .. . What is the standards mode equivalent of document.body.scrollHeight See also .. . .. . quirksmode.org : W3C DOM Compatibility - CSS Object Model View - ElementView properties http : www.quirksmode.org dom w3c cssom.html t36 .. . Using DOCTYPE invalidates client height http : www.ozzu.com website-design-forum using-doctype-invalidates-client-height-t100424.html .. . Answer : document.documentElement.scrollHeight I believe . For viewport it s window.innerHeight for modern browsers . If the above aren t what you want here s a list of a bunch of them : .. . .. . document.documentElement . scrollHeight clientHeight offsetHeight .. . document.body . scrollHeight clientHeight offsetHeight .. . window . inner outer Height Width modern browsers only Comment : That did it changing code document.body.getAttribute scrollHeight 0 to document.documentElement.getAttribute scrollHeight 0 when IE is hosted inside a Win32 application .",
"Question : Let s suppose you have a page with a relatively strict doctype and HTML markup that s pretty close to compliant but perhaps misses in a few silly ways perhaps because of user content that s out of your control.. . say you re working on a content-management-system or a theme for a content-management-system where you control some basic structure and need some javascript but you re not responsible for everything else that goes into pages . How can you tell or : what will determine when the browser decides to go into quirks-mode rather than use it s more standards compliant engine I m looking for answers for each of the major browsers since IE Chrome Safari and Firefox will of course all handle that differently . Is one single error enough to force it or do you have some leeway .. . Answer : For Firefox with Web Developer Toolbar add-on you can look at the trio of icons on the right of the bar . The leftmost one tells you what mode you are in .",
"Question : null .. . Answer : Our systems guys have helpfully just updated all our browsers to IE11 before we could test all of our applications . One of our applications doesn t run correctly under IE11 the only way to make it render correctly is to make it run under quirks-mode which i believe now emulates IE5 in IE11 however the site uses JQuery and if it renders via this mode although it renders ok the functionality doesn t work and we recieve jquery errors upon loading pages such as a member not found error on the following jquery function specifically on the return line : .. . .. . Does anyone have any advice other than re-write the application Thanks Comment : fix the html that s triggering quirks-mode . Comment : @MarcB I think OP s problem is the code is written for quirks-mode and causes errors with the new version not that he doesn t know what triggers the quirks-mode . Comment : What version of jQuery are you using And what specifically is this section of code used for",
"Question : Let s suppose you have a page with a relatively strict doctype and HTML markup that s pretty close to compliant but perhaps misses in a few silly ways perhaps because of user content that s out of your control.. . say you re working on a content-management-system or a theme for a content-management-system where you control some basic structure and need some javascript but you re not responsible for everything else that goes into pages . How can you tell or : what will determine when the browser decides to go into quirks-mode rather than use it s more standards compliant engine I m looking for answers for each of the major browsers since IE Chrome Safari and Firefox will of course all handle that differently . Is one single error enough to force it or do you have some leeway .. . Answer : If you tell IE that it should be strict via doctype it will not change its mind halfway through the page .",
"Question : Let s suppose you have a page with a relatively strict doctype and HTML markup that s pretty close to compliant but perhaps misses in a few silly ways perhaps because of user content that s out of your control.. . say you re working on a content-management-system or a theme for a content-management-system where you control some basic structure and need some javascript but you re not responsible for everything else that goes into pages . How can you tell or : what will determine when the browser decides to go into quirks-mode rather than use it s more standards compliant engine I m looking for answers for each of the major browsers since IE Chrome Safari and Firefox will of course all handle that differently . Is one single error enough to force it or do you have some leeway .. . Answer : in html5 page write DOCTYPE html start with page can change to document.compatMode CSS1Compat",
"Question : I m working on a page that when I load into IE8 and view the developers tools it tells me that page default is quirks-mode . I ve got a strict DTD : .. . .. . I even went ahead and put in the explicit standards switch though I didn t think I d need to : .. . .. . I can t understand why page default isn t IE8 standards Only thing I can think of is that to get to this page I first have to log in to an application and the first pages I must traverse are old quirks-mode pages . Does IE decide on which mode to use at a server level or is it supposed to decide page by page Thanks Comment : you try closing out all your IE8 windows and loading again Comment : this solved my quirks-mode problem : stackoverflow.com questions 6294301 http : stackoverflow.com questions 6294301 dreamweaver-causing-quirks-mode-in-internet-explorer .. . Answer : Does IE decide on which mode to use at a server level .. . .. . Not generally no . There is the ugliness of the compatibility view list http : blogs.msdn.com ie archive 2009 02 16 just-the-facts-recap-of-compatibility-view.aspx which is site-specific but that only kicks you back to IE7-style-Standards Mode not IE5.5-style-Quirks-Mode . Your code otherwise looks OK as long as that DOCTYPE is the very first thing on the page . IE will be forced to document.compatMode BackCompat if there is a comment PI XML declaration prior to IE8 or any non-whitespace textual content before the doctype . If a control character has snuck in that you can t see in your text-editor that could do it . Example problem page Comment : You got it Issue was that doctype declaration was not absolutely first thing on page . Thanks Comment : in my case i have some session and some header redirect but if you echo the code after that it will work : echo DOCTYPE html PUBLIC - W3C DTD XHTML 1.0 Transitional EN http : www.w3.org TR xhtml1 DTD xhtml1-transitional.dtd . you can use any other doctype",
"Question : I m working on setting up a page and am having difficulty with getting it to look well across browsers actually just IE as it renders properly for mozilla and webkit . I m wanting to rule out quirks-mode before seriously considering old IE bugs fixed since IE6 . The container page has a declared doctype however the iframe code does not . Will the iframe content be rendered in quirks-mode because it does not have a doctype or standards mode because the container has a doctype The source follows this scheme : .. . Answer : Prior to IE9 the webpage within the iframe would render according to its own doctype not according to the doctype of the parent container . However in IE9 Microsoft changed the behavior so that the child iframe inherits its doctype rendering from the parent container . Note that IE9 will still behave in the traditional manner iframe honors its own doctype whenever compatibility view is used . The best workaround for folks in your situation--writing a standards compliant container page but needing to include an iframe with a quirks-mode page--is to add either of the following meta-tags between your doctype and the opening tag in the parent page . These tags will essentially tell IE9 to pretend it is IE7 or IE8 . Including in the emulation is the logic used to determine rendering mode for the child iframe . The downside of this workaround is that you will not be able to use any of the new features supported by IE9 in your parent page but that is probably preferable to massive rendering errors in the child page . See http : web.archive.org web 20110905060718 http : www.sitepoint.com forums html-xhtml-52 ie9-iframes-doctypes-you-743000.html for more information . Comment : is there any other slution that enable executing parent IE9 standards mode Frame along with quirks or EmulateIE7 child iframe Comment : @mikepr : Preferable No it isn t . Fact is you shouldn t produce HTML with quirks-mode - ever . Some important MS products do btw with no workaround.. . Comment : Oh and by the way : Stop upvoting this it sounds good but it doesn t work . Comment : While I agree that this does not work in all situations it does reduce some of the issues and does deserve to be upvoted . Unfortunately you sometimes cannot control what is contained within your iframe and therefore cannot control if it s standards compliant . I ve personally had an issue where this solution resolved the problem at least temporarily until the other app could be updated to be standards compliant . Comment : external link broken unfortunately"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
web
|
UNK_RELATION
|
ndepend -- ndepend is a static-analysis tool for @placeholder managed code that focuses on code dependencies and quality .
|
{
"confidence": [
44.871273040771484,
43.46814727783203,
42.86333465576172,
40.561241149902344,
39.914527893066406,
39.914527893066406,
39.914527893066406,
39.914527893066406,
39.48410415649414,
39.3248291015625,
39.09442901611328,
38.923309326171875,
38.29412841796875,
37.429718017578125,
37.429718017578125,
36.77796173095703,
36.54050827026367,
36.487430572509766,
36.354061126708984,
35.498199462890625,
35.498199462890625,
35.498199462890625,
35.498199462890625,
35.498199462890625,
35.498199462890625,
35.194000244140625,
35.194000244140625,
34.8494987487793,
34.6504020690918,
34.6504020690918,
34.6504020690918,
34.28957748413086,
34.12792205810547,
34.070682525634766,
34.00201416015625,
33.52018737792969,
33.149391174316406,
33.048484802246094,
32.274810791015625,
32.274810791015625,
32.274810791015625,
32.274810791015625,
32.165592193603516,
32.165592193603516,
32.165592193603516,
30.991790771484375,
30.900606155395508,
30.57659149169922,
30.57115364074707,
30.57115364074707,
30.57115364074707,
30.57115364074707,
30.57115364074707,
30.57115364074707,
30.57115364074707,
30.57115364074707,
30.57115364074707,
30.57115364074707,
30.57115364074707,
30.57115364074707,
30.57115364074707,
30.57115364074707,
30.563674926757812,
30.563674926757812,
29.77822494506836,
29.77822494506836,
29.402790069580078,
28.974674224853516,
28.85999298095703,
28.737537384033203,
28.293212890625,
28.08634376525879,
28.08634376525879,
28.08634376525879,
28.08634376525879,
28.08634376525879,
28.08634376525879,
28.074567794799805,
27.999380111694336,
26.981956481933594,
26.944351196289062,
26.833641052246094,
26.761226654052734,
26.497343063354492,
26.497343063354492,
26.497343063354492,
26.37518310546875,
25.589757919311523,
25.589757919311523,
25.27829933166504,
25.27829933166504,
25.052419662475586,
25.052419662475586,
24.885047912597656,
24.786182403564453,
24.662675857543945,
24.148082733154297,
24.000757217407227,
23.999767303466797,
23.73102569580078
],
"content": [
"NDepend analyzes any .NET IL code including the C++ CLI managed code but not the unmanaged one .",
"Anyone know if NDepend would be a good tool for this",
"You can use also NDepend API or regex and ndepend api together .",
"I am creating a code analyzer tool using NDepend API and I would like to use the CQLinq queries .",
"Does anyone know if this is a limitation of NDepend",
"SO the task is not achievable at all with NDepend",
"It s difficult or impossible to do with NDepend .",
"concerning this NDepend has plenty of facilities :",
"I m having a little problem with NDepend not ignoring generated code .",
"If most of your code is .NET IL code NDepend should be fine for your needs .",
"I ve tried VS and NDepend .",
"Whilst evaluating NDepend I attached a NDepend project to all the Visual Studio projects that comprise our company s software suite .",
"I m looking for a tool or perhaps an nDepend SQL script if this is possible .",
"I want to verify these using NDepend .",
"I WANT THE STRING USING NDepend",
"Yes this is an actual limitation of NDepend the tool can t detect usages of an enum value because enum values are compiled to numbers and are not typed anymore in the IL code .",
"A few assemblies contain generated code that needs to be ignored by NDepend .",
"I have been trying out nDepend as a tool to use in running metrics on our team s code .",
"can NDepend show both the methods as dead by doing some settings or by CQL",
"Need to create a custom rule in NDepend using CQLinq to check whether a public-method code block is inside try and catch .",
"The following gives all the public methods : .. . .. . Is there a feature in NDepend that can be used to traverse code inside a method or find a particular string",
"I m trying to write an NDepend CQLinq query to return the enum values that are used in my code base .",
"I m refining the built-in dead-code query in NDEpend and I m finding a lot of false positives from standalone programs i.e .",
"I m evaluating ndepend http : www.ndepend.com and cppdepend http : www.cppdepend.com for a mixed-code base .",
"NDepend API won t help neither since it shares the same code model than CQLinq see my comment on question .",
"Manually looking with NDepend should work with the Dependency Matrix .",
"And is there a way to get the Obsolete attribute in NDepend at all",
"I have a version of NDepend for build servers and have automated the NDepend report generation .",
"A custom rule has to be created in NDepend to check the availability of a particular method e.g .",
"The large method that NDepend reports here is named BassAttributeNames..cctor .",
"This rule is not implementable through NDepend because the context is inside method body .",
"Why does NDepend count Static fields as LOC for a method .. . .. . It is because when you do a static field inline initialization it adds a line of code to the class constructor .",
"I was really looking for a tool that did static-analysis of the code .",
"Yes NDepend http : www.NDepend.com can do that thanks to Code Rule over LINQ Query CQLinq http : www.ndepend.com Features.aspx CQL capabilities .",
"After finding this http : stackoverflow.com questions 6505263 ndepend-finding-dead-methods SO question I based my query on one of the default queries provided by NDepend http : www.ndepend.com default-rules webframe.html Q Potentially dead Fields.html : .. . .. . However NDepend thinks none of the enum values are used .",
"The class is commented with an auto-generated annotation but is still being picked up by NDepend .",
"My opinion is certainly biased concerning NDepend since I am part of the tool team .",
"When I port a NDepend CQLinq query to C I must allways start defining a codeBase to query to so this CQLinq query .. . .. . using NDepend API in C I must port to : .. . .. . I see there is a ICQLinqExecutionContext .",
"Jiri no with NDepend you can only count the number of lines of comment http : www.ndepend.com Metrics.aspx NbLinesOfComment not extract them .",
"Do need to open my mixed solutions with CppDepend and c -only solutions with NDepend",
"It would be nice if NDepend could load CppDepend as a plugin extension but that s not possible right",
"It would be nice if NDepend could load CppDepend as a plugin extension but that s not possible right",
"This was a bug now fixed in NDepend version 5 http : www.ndepend.com NDependV5.aspx",
"Is it possible to use NUnit to run CQL queries using NDepend",
"NDepend has a nice feature that draws an internal dependency graph .",
"Since I want to pull the coverage results into NDepend to run build-time analysis I want that file to contain the information I need .",
"Just start VisualNDepend.exe do an analysis of your NDepend project or load the most recent analysis result-of your NDepend project then look at the panel CQL Query Explorer this is where you can browse queries and rules and edit them .",
"This will explain everything you need : .. . .. . Integrate NDepend with TFS http : www.ndepend.com Doc CI TFS.aspx",
"I did notice these two comments on the original query : .. . .. . which could imply that NDepend can t detect usages of an enum value .",
"Sometimes NDepend might help out but in this case it didn t give any further details .",
"Question is how to make it from Ndepend this report which it generates it is not what I am looking for .",
"Does NDepend have a direct way in CQL to measure RFC http : staff.unak.is andy StaticAnalysis0809 metrics rfc.html RFT",
"I m trying to get NDepend to identify long methods using a modified version of the standard Methods too big query .",
"I have some custom CQLs in NDepend Project and I want generate the results of these CQLs using NDepend.Console.exe .",
"I can export from Visual NDepend but I want to use NDepend.Console.exe from script .",
"The console runner is nothing but an alternative user-interface which calls NDepend core just like the GUI does .",
"Using NDepend http : www.ndepend.com how can I find all direct and indirect uses of a specific method or property",
"NDepend tells which methods is calling which methods but it doesn t tell the number of time a particular method is calling another one .",
"NDepend has the metric IMethod.Rank ndepend.com API http : www.ndepend.com API webframe.html NDepend.API NDepend.CodeModel.IMethod Rank.html",
"THE PROBLEM .. . .. . I am relatively new to NDepend and am having difficulty writing the appropriate CQLinq statement .",
"The NDepend documentation s definition of instability http : www.ndepend.com Metrics.aspx Instability is : .. . .. . The ratio of efferent coupling Ce to total coupling .",
"stable means painful to modify - I have not stumbled across this claim in the NDepend documentation so far .",
"An objective and measurable fact is that NDepend is 10 to 100 times faster concerning dependency graph and matrix and I encourage you to verify this fact by yourself NDepend comes with a trial http : www.ndepend.com NDependDownload.aspx .",
"Also here you ll find an independent comparison of NDepend versus VS2010 Arch http : merbla.blogspot.com 2010 03 vs2010-rc-vs-ndepend-v3-rc-dependency.html .",
"If B is only called by A and A is coming as dead method not called or referenced anywhere in the application can NDepend show both the methods as dead by doing some settings or by CQL",
"Both CppDepend http : cppdepend.com and NDepend http : ndepend.com are developed by the same company and seem to be based on the same codebase and share some features .",
"I have a setup where Visual Studio 2010 runs test-coverage analysis and it s output is absorbed by NDepend during an integration build .",
"I m also open to suggestions for other technologies that would accomplish this besides NDepend though I have a strong preference for NDepend due to already having invested in it and being familiar with how it works .",
"For example get all method names from source code base using nDepend API and then using regex for each method name count matches except method definition itself .",
"I m evaluating NDepend as a part of an effort to enforce code quality and correct framework usage and I am looking for a way to write the equivalent of CA2000 : Dispose objects before losing scope http : msdn.microsoft.com en-us library ms182289.aspx .",
"Whether this be by automatically triggering the nDepend code-metrics to run on a TFS build or running the metrics and then either putting them in the email notification or at least linking them to the email .",
"I suspect It may be possible with the full version of NDepend but are there any other tools that people know about",
"@William This is a pretty unexpected behavior could you please send us the concerned assemblies at support at NOSPAM ndepend dot com",
"It would be nice to be able to just include the NDepend dlls in a UnitTests library and write tests like : .. . .. . or something similar .",
"I understand nested query is not supported by CQL yet so is there any way I can capture these details by NDepend",
"I ve tried to search on the NDepend documentation if there is any possible way to do a regex on Obsolete Attributes",
"With NDepend you can get the attribute type the methods types assemblies.. . tagged with the attribute but you cannot get the string in the attribute .",
"I quite like NDepend but it s still the biggest single shortcoming that namespace type method info cannot be joined into a single query .",
"I wanted to verify few design-patterns in C code by static-analysis .",
"It seems that NDepend can t analyse c++ projects but when I open the solution with CppDepends I lose some NPDepend features for my c projects in the same solution .",
"I imagine I could use an executable task instead of the ndepend task so that the merge is not automatic and the clutter doesn t get merged .",
"I am in the process of evaluating the NDepend tool for a client of mine and was wondering if anyone could provide assistance with the following query : .. . .. . Although this provides a large list I would also like to check if the only reference is from a test project such as MyNamespace only referenced by MyNamespace.Tests .",
"With NDepend http : www.ndepend.com you can write a Code Query over LINQ CQLinq http : www.ndepend.com Features.aspx CQL to match evolution through any code-metrics .",
"Now how do I easily replace the default queries for the NDepend project with these updated modified queries",
"So every night the build does its thing and NDepend reports XML are generated .",
"So does NDepend itself support anything like this or is there some sort of utility that already exists that I could use",
"I am using the NDepend 4.1 API to count the lines-of-code in a Visual Studio 2010 solution that has a few projects which are all targeting the .NET Framework 4 .",
"But with the Pro Version you could use a Query like this : .. . .. . For this to work you have to create a NDepend Project that knows all your Assemblies .",
"You could use NDepend with some custom queries.. . That s just off the top of my head never used it for exactly that but it should work .",
"I d like to know if anyone has come up with a CQL query for NDepend that will list all classes that doesn t implement IDisposable but has one or more fields that does .",
"Those numbers are usually shown in the statistic section of each NDepend report like Sum Average Minimum etc but I want to be able to write queries for such numbers separately .",
"Ok so if we are talking of these Chidamber Kemerer metrics http : www.aivosto.com project help pm-oo-ck.html the NDepend http : www.ndepend.com ability to write Code Queries and Rules over LINQ queries CQLinq http : www.ndepend.com Features.aspx CQL will answer all your needs .",
"NDepend is more about writing code rules http : www.ndepend.com Features.aspx CQL concerning the program structure like for example : .. . .. . Types with disposable instance fields must be disposable http : www.ndepend.com DefaultRules webframe.html Q Types with disposable instance fields must be disposable.html .. . Disposable types with unmanaged resources should declare finalizer http : www.ndepend.com DefaultRules webframe.html Q Disposable types with unmanaged resources should declare finalizer.html",
"Then using the regex tool of choice modify all the queries to ignore a particular namespace or to honor the NDepend Generated attribute or whatever other global change you want to make to the criteria of the CQL statements .",
"I know that I can compare two NDepend builds and have code and metric diffs but what I m looking to do is compare the same single metric or metrics over N builds to see ongoing trends .",
"Runtime analysis is far superior to static-analysis of concurrency issues .",
"I would think this would be a major performance issue 450+ assemblies msbuild output ndepend output eventually fxcop and ncover output all in the same xml file .",
"My question now is if I can somehow combine the integrated nDepend tools with the builds and notifications for said builds in Team Foundation Server 2010 .",
"NDepend http : www.ndepend.com is the tool of choice for this kind of thing : using its CQL language I can find all the properties which for example directly change the state of their containing instance : .. . .. . This only finds those getters which change a field directly : how can I find ones which change it indirectly e.g .",
"I work on several plain c solutions without any c++ code at all but also have solutions that beside c also contain c++ managed code and c++ native-code ."
]
}
|
{
"confidence": [
52.50342559814453,
50.84486770629883,
49.722259521484375,
49.71868896484375,
48.57316589355469,
47.480926513671875,
47.231327056884766,
46.312015533447266,
45.934688568115234,
45.56836700439453,
45.30534744262695,
45.00675964355469,
44.673240661621094,
43.805702209472656,
43.778350830078125,
43.58807373046875,
43.50313186645508,
42.37065124511719,
40.98833084106445,
40.74280548095703
],
"content": [
"Question : Both CppDepend http : cppdepend.com and NDepend http : ndepend.com are developed by the same company and seem to be based on the same codebase and share some features . I haven t found a side-by-side comparison site yet . I work on several plain c solutions without any c++ code at all but also have solutions that beside c also contain c++ managed code and c++ native-code . Do I really need to buy both tools if I want the full feature set for all project types Do need to open my mixed solutions with CppDepend and c -only solutions with NDepend It seems that NDepend can t analyse c++ projects but when I open the solution with CppDepends I lose some NPDepend features for my c projects in the same solution . It would be nice if NDepend could load CppDepend as a plugin extension but that s not possible right .. . Answer : NDepend analyzes any .NET IL code including the C++ CLI managed code but not the unmanaged one . CppDepend analyzes only C++ code on any C++ compliant platform . While the tools share a lot of code they are mutually exclusive and doesn t inter-operate in any way . Also the tools share the same set of features . If most of your code is .NET IL code NDepend should be fine for your needs . If your code is 50 50 .NET and C++ unmanaged you might need both tools . It would be nice if NDepend could load CppDepend as a plugin extension but that s not possible right Right .",
"Question : null .. . Answer : I have several enums that contain a lot of values and I know most of them are not used . I m trying to write an NDepend CQLinq query to return the enum values that are used in my code base . After finding this http : stackoverflow.com questions 6505263 ndepend-finding-dead-methods SO question I based my query on one of the default queries provided by NDepend http : www.ndepend.com default-rules webframe.html Q Potentially dead Fields.html : .. . .. . However NDepend thinks none of the enum values are used . As soon as I replace .. . .. . with .. . .. . all my enum values are listed which is how I know all the other clauses of the query are OK . I did notice these two comments on the original query : .. . .. . which could imply that NDepend can t detect usages of an enum value . Does anyone know if this is a limitation of NDepend Or even better of a way to achieve what I want Thanks Comment : Yes this is an actual limitation of NDepend the tool can t detect usages of an enum value because enum values are compiled to numbers and are not typed anymore in the IL code . However this information can be inferred from the IL code with some heuristics so this is certainly a future feature . Comment : Thanks Patrick .",
"Question : Is it possible to use NUnit to run CQL queries using NDepend It would be nice to be able to just include the NDepend dlls in a UnitTests library and write tests like : .. . .. . or something similar . This would make it very easy to integrate with Team City and automatically fail the build if any of the static-analysis tests fail . .. . Answer : This is possible thanks to NDepend.API http : www.ndepend.com API webframe.html released with NDepend v4 and especially thanks to the namespace NDepend.CodeQuery http : www.ndepend.com API webframe.html NDepend.API NDepend.CodeQuery namespace.html that contains what is needed to run programatically CQLinq or CQL code queries and rules presented as a simple string . Here is documentation to get started with NDepend.API http : www.ndepend.com API webframe.html NDepend.API gettingstarted.html . We advise looking at the source code of the PowerTool named Query Code with CQLinq available in NDependInstallPath NDepend.PowerTools.SourceCode NDepend.PowerTools.sln .. . .. . Notice finally that thanks to NDepend.API you can also write directly your code queries rules or even static analyzer with C or VB.NET code hence code that can be embedded in your unit tests . Comment : Did this realise or is it still on the todo list Comment : long term TODO list so far",
"Question : I m evaluating NDepend as a part of an effort to enforce code quality and correct framework usage and I am looking for a way to write the equivalent of CA2000 : Dispose objects before losing scope http : msdn.microsoft.com en-us library ms182289.aspx . Anyone else has tried to do this or has knowledge about how to do it .. . Answer : This rule is not implementable through NDepend because the context is inside method body . NDepend is more about writing code rules http : www.ndepend.com Features.aspx CQL concerning the program structure like for example : .. . .. . Types with disposable instance fields must be disposable http : www.ndepend.com DefaultRules webframe.html Q Types with disposable instance fields must be disposable.html .. . Disposable types with unmanaged resources should declare finalizer http : www.ndepend.com DefaultRules webframe.html Q Disposable types with unmanaged resources should declare finalizer.html",
"Question : Is there a tool that analyses .NET code and finds race conditions I have a bit of code that has a public static property that gets or creates a private static field . It also has a public static method that sets this field to null ...yes I know . . As there are no locks around either of these methods it s a safe bet that things ll go horribly wrong in the future . I need a tool that ll recursively go through things that call either of these methods and see if anything was spawned on another thread . I m looking for a tool or perhaps an nDepend SQL script if this is possible . Comment : oooh really helpful there John you mean one of all those ads that revolve around It would probably help a lot if you said which ad or just mentioned the product or company it was an ad for . Or is that just if you look at the website.. . .. . Answer : See the answers here : What static-analysis tools are available for C http : stackoverflow.com questions 38635 what-static-analysis-tools-are-available-for-c .. . .. . Some static-analysis tools can do deadlock detection . Also try FxCop http : www.microsoft.com downloads details.aspx displaylang en FamilyID 917023f6-d5b7-41bb-bbc0-411a7d66cf3c from Microsoft .",
"Question : Is there a tool that analyses .NET code and finds race conditions I have a bit of code that has a public static property that gets or creates a private static field . It also has a public static method that sets this field to null ...yes I know . . As there are no locks around either of these methods it s a safe bet that things ll go horribly wrong in the future . I need a tool that ll recursively go through things that call either of these methods and see if anything was spawned on another thread . I m looking for a tool or perhaps an nDepend SQL script if this is possible . Comment : oooh really helpful there John you mean one of all those ads that revolve around It would probably help a lot if you said which ad or just mentioned the product or company it was an ad for . Or is that just if you look at the website.. . .. . Answer : Jinx http : visualstudiogallery.msdn.microsoft.com 21b09584-589d-4ce3-b055-f2303ecda3b2 will do this at runtime not statically but it may be worth looking at . Comment : Nice . Runtime analysis is far superior to static-analysis of concurrency issues . There s just too much runtime convention for the static analyzers to produce a good signal-to-noise ratio .",
"Question : I have a version of NDepend for build servers and have automated the NDepend report generation . So every night the build does its thing and NDepend reports XML are generated . What I now want to do is track some metrics as a function of time . So for instance it might be nice to have a graph of a particular type or namespace s say afferent coupling on the y axis with time on the x axis . I know that I can compare two NDepend builds and have code and metric diffs but what I m looking to do is compare the same single metric or metrics over N builds to see ongoing trends . I m sort of assuming that there isn t a tool that does this currently and that I ll have to roll my own but if there is one out there I d sure love to hear about it before investing the time . So does NDepend itself support anything like this or is there some sort of utility that already exists that I could use I m also open to suggestions for other technologies that would accomplish this besides NDepend though I have a strong preference for NDepend due to already having invested in it and being familiar with how it works . Thanks in advance . .. . Answer : With NDepend http : www.ndepend.com you can write a Code Query over LINQ CQLinq http : www.ndepend.com Features.aspx CQL to match evolution through any code-metrics . For example you could start with the query : .. . .. . ...and get an instant result in Visual Studio . Such rule is integrable into your CI TFS build-process http : www.ndepend.com Doc CI TFS.aspx and can also be shown in a HTML+javascript report http : www.ndepend.com SampleReports.aspx . Code metric evolution match http : i.stack.imgur.com GLScd.png .. . .. . Several default code rules are provided to restrict over code metric trending : .. . .. . Avoid making complex methods even more complex http : www.ndepend.com DefaultRules webframe.html Q Avoid making complex methods even more complex 28Source CC 29.html .. . Types that used to be 100 covered but not anymore http : www.ndepend.com DefaultRules webframe.html Q Types that used to be 100 covered but not anymore.html .. . From now all types added or refactored should respect basic quality principles http : www.ndepend.com DefaultRules webframe.html Q From now all types added or refactored should respect basic quality principles.html .. . Avoid adding methods to a type that already had many methods http : www.ndepend.com DefaultRules webframe.html Q Avoid adding methods to a type that already had many methods.html .. . Avoid making large methods even larger http : www.ndepend.com DefaultRules webframe.html Q Avoid making large methods even larger.html Comment : Thanks for the feedback . What I ll probably do is write my own parser and display as separate assemblies so that I can swap in something that uses the API when it comes out .",
"Question : Let s say I have method A.M1 . It is called in B.M2 2 times and in B.M3 3 times . I need to find all number of usages like Resharper does through find usages interface . So the sum for method calls would be 5 . Following Query : .. . .. . from m in Methods where m.HasAttribute specific attribute orderby m.MethodsCallingMe.Count descending select new m m.MethodsCallingMe .. . .. . gives me only 2 usages for method A.M1 . Could you please help me to find the usages number Comment : NDepend tells which methods is calling which methods but it doesn t tell the number of time a particular method is calling another one . Comment : SO the task is not achievable at all with NDepend Comment : No it is not achievable at all . .. . Answer : It s difficult or impossible to do with NDepend . NDepends shows which methods are calling specified method and not count in this situation them and even not count them recursively or through call-graph . So try to use other techniques . By first of all why you need such metric Some kind of method rank Anyway a pretty simple way to achieve it is using RegEx experssion . You can use also NDepend API or regex and ndepend api together . For example get all method names from source code base using nDepend API and then using regex for each method name count matches except method definition itself . Comment : NDepend API won t help neither since it shares the same code model than CQLinq see my comment on question . Comment : and even not count them recursively or through call-graph . concerning this NDepend has plenty of facilities : Comment : why you need such metric Some kind of method rank NDepend has the metric IMethod.Rank ndepend.com API http : www.ndepend.com API webframe.html NDepend.API NDepend.CodeModel.IMethod Rank.html Comment : Regfor you gave a good advice .",
"Question : I have a setup where Visual Studio 2010 runs test-coverage analysis and it s output is absorbed by NDepend during an integration build . A few assemblies contain generated code that needs to be ignored by NDepend . Is there a way to do this Preferably an entire namespace . .. . Answer : Found this in the Quick summary of methods to refactor .. . .. . But that doesn t address the need to modify every CQL query to ensure they all ignore the generated code .",
"Question : I have a setup where Visual Studio 2010 runs test-coverage analysis and it s output is absorbed by NDepend during an integration build . A few assemblies contain generated code that needs to be ignored by NDepend . Is there a way to do this Preferably an entire namespace . .. . Answer : Code Query and Rule over LINQ CQLinq http : www.ndepend.com Features.aspx CQL indeed provides a facility to ignore generated code . There is the convenient predefined domain named JustMyCode of type ICodeBaseView http : www.ndepend.com API webframe.html NDepend.API NDepend.CodeModel.ICodeBaseView.html . The domain JustMyCode represents a facility of CQLinq to eliminate generated code elements from CQLinq query results . For example the following query will only match large methods that are not generated by a tool like a UI designer : .. . .. . The set of generated code elements is defined by CQLinq queries prefixed with the CQLinq keyword notmycode . For example the query below matches methods defined in source files whose name ends up with .designer.cs : .. . .. . The CQLinq queries runner executes all notmycode queries before queries relying on JustMyCode hence the domain JustMyCode is defined once for all . Obviously the CQLinq compiler emits an error if a notmycode query relies on the JustMyCode domain . There are 4 default notmycode queries easily adaptable to match your need . Notes that there is no default notmycode queries for namespaces but you can create your own one s : .. . .. . Discard generated Assemblies from JustMyCode http : www.ndepend.com DefaultRules webframe.html Q Discard generated Assemblies from JustMyCode.html .. . Discard generated Types from JustMyCode http : www.ndepend.com DefaultRules webframe.html Q Discard generated Types from JustMyCode.html .. . Discard generated and designer Methods from JustMyCode http : www.ndepend.com DefaultRules webframe.html Q Discard generated and designer Methods from JustMyCode.html .. . Discard generated Fields from JustMyCode http : www.ndepend.com DefaultRules webframe.html Q Discard generated Fields from JustMyCode.html Comment : Patrick could you elaborate on this and describe how one would go about modifying all the CQL queries used to generate the metrics for a project I can see the encoded queries embedded in the project file but for the life of me I can t find where I would modify them in the UI Comment : Just start VisualNDepend.exe do an analysis of your NDepend project or load the most recent analysis result-of your NDepend project then look at the panel CQL Query Explorer this is where you can browse queries and rules and edit them . Comment : I m referring to the ability to change all the queries at once . Use case - Copy all the queries using the provided Copy to Clipboard Default CQL Queries in the CQL Query Edit options . Then using the regex tool of choice modify all the queries to ignore a particular namespace or to honor the NDepend Generated attribute or whatever other global change you want to make to the criteria of the CQL statements . Now how do I easily replace the default queries for the NDepend project with these updated modified queries Comment : Actually copy-paste from to CQL Query Explorer Group use a XML format in the clipboard you could copy this XML modify it and then paste it . Comment : I made that work.. . and then ran into the issue of not being able to use a join against a type to exclude types with the System.CodeDom.Compiler.GeneratedCode attribute . However for the OPs purposes your suggestion will work just fine .",
"Question : I have a type to define and assign some static readonly fields . I got a violation for Methods too big LOC .. . .. . I would like to know if I have an attribute for method and used it in the rule see below . Where is in my source code I need to use this attribute to discard this and which method Example code : .. . .. . enter image description here http : i.stack.imgur.com smBe7.jpg .. . .. . Sample rule : .. . .. . enter image description here http : i.stack.imgur.com DJ6Ej.jpg .. . Answer : Why does NDepend count Static fields as LOC for a method .. . .. . It is because when you do a static field inline initialization it adds a line of code to the class constructor . Actually as soon as you have one static field inline initialization in a class the C compiler creates a static-constructor for your class . So if you have N static field inline initialization you have a method the class constructor that has N Lines of Code . The large method that NDepend reports here is named BassAttributeNames..cctor . Certainly the easiest way to adapt your code rule to avoid such match is to add the clause : .. . .. . m.IsClassContructor",
"Question : From Software worth buying http : stackoverflow.com questions 273858 software-worth-buying Open source C projects that have high code quality http : stackoverflow.com questions 143088 open-source-c-projects-that-have-high-code-quality and .NET must-have development tools http : stackoverflow.com questions 180939 net-must-have-development-tools I found some software tools are multiple recommended such as Reshaper http : www.jetbrains.com resharper plugins index.jsp dotTrace http : www.jetbrains.com profiler and NDepend http : www.ndepend.com . I use Visual Studio 2010 Ultimate http : www.microsoft.com visualstudio en-us products 2010-editions ultimate overview and it has some features such as code-coverage profiling and StyleCop to name a few and it s pretty expensive . http : www.microsoftstore.com store msstore en US list size.24 ceid.172935600 categoryID.50804700 parentCategoryID.50804600 sort.listPrice order.down WT.mc id 20VSprodpagebuynow .. . .. . As a user of VS 2010 Ultimate is it worth while to invest those tools I mentioned Or do they provide similar functionalities that VS 2010 Ultimate already has Comment : You know some people think that VS was made just as a host for Resharper Comment : ReSharper 5 vs . Visual Studio 2010 Comparison http : www.jetbrains.com resharper documentation comparisonMatrix R5.html .. . Answer : Prosseek this is a good question you are asking . I have tested VS options and most of third-party options . From my experience third-parties tooling are always more convenient whatever the area covered . I agree with Ladislav Mrnka opinions : VS Ultimate provides large feature set out of the box but many features are like basic implementation . In more details : .. . .. . R is more subtle and relevant than VS equivalent when it comes to read edit and refactor code . NCover is as fast as VS coverage but it doesn t come with the frictionfull instrumentation phase . Also NCover proposes more interesting facilities to harness coverage results . DotTrace is faster and easier to harness than VS profiler both for performance and memory-management . There are also interesting alternatives like RedGate ANTS performance and memory profilers . TestDriven.NET is more adapted to run tests than VS test integration especially because it integrates with most of third-party options as a consequence if you are only using VS tooling TD.NET is useless . My opinion is certainly biased concerning NDepend since I am part of the tool team . An objective and measurable fact is that NDepend is 10 to 100 times faster concerning dependency graph and matrix and I encourage you to verify this fact by yourself NDepend comes with a trial http : www.ndepend.com NDependDownload.aspx . Also here you ll find an independent comparison of NDepend versus VS2010 Arch http : merbla.blogspot.com 2010 03 vs2010-rc-vs-ndepend-v3-rc-dependency.html .",
"Question : I am using the NDepend 4.1 API to count the lines-of-code in a Visual Studio 2010 solution that has a few projects which are all targeting the .NET Framework 4 . Here s my code : .. . .. . If I repeatedly run this analysis on my solution I get different results for totalLoc even though I have not changed the solution or its compiled assemblies in any way . For example if I run the analysis three times I might get totalLoc values of 12100 12220 and 12075 . Digging a little deeper I ve started iterating through analysisResult.CodeBase.Application.Methods and writing each method s name and NbLinesOfCode to a text file . When I diff the files from any two analysis runs I notice that most methods show a consistent LOC count but there are a handful that don t . I can t see any pattern in this and it doesn t seem to be the same set of methods each time . What could be causing this strange behavior Update 1 : If I run the analysis on any single assembly I get a consistent LOC count . The problem only happens when I pass multiple assemblies to CreateTemporaryProject . Comment : Debug vs Release builds Comment : @AustinSalonen : When I call CreateTemporaryProject I am careful to always pass in exactly the same list of assemblies which happen to be Debug assemblies right now . Comment : The assemblies are not recompiled in between two analysis Comment : @PatrickfromNDependteam : That is correct . They are not being recompiled . I am calling CreateTemporaryProject with one class-library assembly and two web assemblies . I verified that the last modified dates on these assemblies is not changing between analysis runs . Comment : @William This is a pretty unexpected behavior could you please send us the concerned assemblies at support at NOSPAM ndepend dot com .. . Answer : This was a bug now fixed in NDepend version 5 http : www.ndepend.com NDependV5.aspx Interestingly enough the bug came from a subtil concurrent access issue that manifested with different analysis results when 2 large assemblies were analyzed on two different threads",
"Question : This stems from a previous question http : stackoverflow.com questions 4585573 code-metrics-in-visual-studio-2010 I asked regarding code-metrics . I have been trying out nDepend as a tool to use in running metrics on our team s code . I have to say that so far I am very impressed with the design information given etc . My question now is if I can somehow combine the integrated nDepend tools with the builds and notifications for said builds in Team Foundation Server 2010 . Whether this be by automatically triggering the nDepend code-metrics to run on a TFS build or running the metrics and then either putting them in the email notification or at least linking them to the email . I don t know if this is even possible but if it is I was wondering if anyone could give me some direction in this area Or if not please let me know that as well any other alternative solutions . .. . Answer : This will explain everything you need : .. . .. . Integrate NDepend with TFS http : www.ndepend.com Doc CI TFS.aspx Comment : It ll take some tweaking and some more research on my part just for the fact that I don t know XAML very well but I believe this is indeed exactly what I need Thanks for your help",
"Question : I ve tried to search on the NDepend documentation if there is any possible way to do a regex on Obsolete Attributes And is there a way to get the Obsolete attribute in NDepend at all Any ideas or example of code on how to make a small Linq query to get an attribute of an obsolete For example : .. . .. . TODO I WANT THE STRING USING NDepend ObsoleteAttribute Deprecated in 2007-01-23 .. . Answer : With NDepend you can get the attribute type the methods types assemblies.. . tagged with the attribute but you cannot get the string in the attribute . Much better than reflection we d advise using the framework Mono.Cecil https : github.com jbevain cecil for that .",
"Question : null .. . Answer : Need to create a custom rule in NDepend using CQLinq to check whether a public-method code block is inside try and catch . The following gives all the public methods : .. . .. . Is there a feature in NDepend that can be used to traverse code inside a method or find a particular string Comment : Unfortunately by now this is not something reachable through CQLinq . You can still refactor a but call a method inside the try-catch and then check this method is calling the other method but of course this solution is not optimal .",
"Question : Is there a tool that analyses .NET code and finds race conditions I have a bit of code that has a public static property that gets or creates a private static field . It also has a public static method that sets this field to null ...yes I know . . As there are no locks around either of these methods it s a safe bet that things ll go horribly wrong in the future . I need a tool that ll recursively go through things that call either of these methods and see if anything was spawned on another thread . I m looking for a tool or perhaps an nDepend SQL script if this is possible . Comment : oooh really helpful there John you mean one of all those ads that revolve around It would probably help a lot if you said which ad or just mentioned the product or company it was an ad for . Or is that just if you look at the website.. . .. . Answer : You might want to check out CHESS http : research.microsoft.com en-us projects chess .",
"Question : Occasionally I am looking at some code I search for usages of a method using resharper and find that it is only called by tests . So it s effectively redundant and I can delete it and the methods that call it . Obviously there s no point in having unused code lying around the place slowing down the build and the test run . What I d like is a tool that can tell me where all the bits of production code are that are only accessed by tests . I have a full version of resharper and also a trial version of NDepend but haven t found out how to use either of these to get the result I want without paying for it . I suspect It may be possible with the full version of NDepend but are there any other tools that people know about If the context helps the solution is and ASP.net website much of whose functionality is handled by a WCF service . So the only valid entry points to the bulk of the code are the service methods . The tests are in their own seperate projects . I ve started a bounty because I m sure someone else must have had and solved this problem before Comment : Some of that test only code is likely mocks stubs etc.. . Comment : @Chad all mocks and stubs etc are in my test projects . In this question I m more concerned about production code . .. . Answer : Manually looking with NDepend should work with the Dependency Matrix . There you can see which methods are used only by the Unit Test Assemblies . I m not sure if you can write own CQL Queries with the Trial Version . But with the Pro Version you could use a Query like this : .. . .. . For this to work you have to create a NDepend Project that knows all your Assemblies . For NAME OF THE UNIT TEST ASSEMBLY you have to insert your Unit Test Assembly and in the second part you have to specify you Production Code Assemblies with IsUsedBy and seperated with OR . Comment : As far as I can see I need the full version to be able to run custom queries . I m looking at making a custom FxCop rule along the lines of your query a lot more difficult on FxCop though. . Comment : Would be cool if you could publish the rule",
"Question : Is there a tool that analyses .NET code and finds race conditions I have a bit of code that has a public static property that gets or creates a private static field . It also has a public static method that sets this field to null ...yes I know . . As there are no locks around either of these methods it s a safe bet that things ll go horribly wrong in the future . I need a tool that ll recursively go through things that call either of these methods and see if anything was spawned on another thread . I m looking for a tool or perhaps an nDepend SQL script if this is possible . Comment : oooh really helpful there John you mean one of all those ads that revolve around It would probably help a lot if you said which ad or just mentioned the product or company it was an ad for . Or is that just if you look at the website.. . .. . Answer : You re probably looking for one of these : .. . .. . CHESS http : research.microsoft.com en-us projects chess .. . Typemock Racer http : site.typemock.com typemock-racer-product .. . .. . .. . .. . NOTE : This answer is from 2010 . As with all recommendations answers recommendations tend to change over time . There may be other products out there now CHESS which was a Microsoft Research Labs project may have evolved into a final product or been scrapped altogether . Please take this answer with a grain of salt and conduct new research into which products are suitable now . Comment : Thanks Lasse I d heard of CHESS but not TypeMock Racer . I was really looking for a tool that did static-analysis of the code . I m using ReSharper 5 which has a nice feature that inspects code and shows all callers of a particular method and drills down through them recursively . What I need is something that d flag a method as being instantiated on a worker thread . I ll investiage more on the CQL approach as I know there s an upstream callers script so I m sure there s a way of finding out if any methods are the result-of a thread invocation call .",
"Question : I d like to have the nightly-build check for how many NotImplementedExeptions there are in my .NET code so hopefully we can remove them all before releasing . My first thought is that FxCop might be a good tool to do this . Does anyone have a custom FxCop rule for this How would I go about creating one myself Comment : Anyone know if NDepend would be a good tool for this ndepend.com http : www.ndepend.com .. . Answer : I ve actually implemented one and shown the code in this answer http : stackoverflow.com questions 410719 notimplementedexception-are-they-kidding-me 410800 410800 ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
.net
|
UNK_RELATION
|
|
cpputest@unit-testing@69
|
cpputest -- cpputest is a c c++ based unit xunit test framework for @placeholder and test-driving code .
|
{
"confidence": [
58.25907516479492,
57.414085388183594,
54.22900390625,
52.05436325073242,
52.05436325073242,
51.11741638183594,
51.07483673095703,
50.179962158203125,
48.87701416015625,
48.71306228637695,
47.49977111816406,
47.36518478393555,
46.98031234741211,
46.937660217285156,
46.7183723449707,
45.874671936035156,
45.48210144042969,
45.04624938964844,
45.02192306518555,
44.9061279296875,
44.50011444091797,
44.50011444091797,
43.89649200439453,
43.7574577331543,
43.41998291015625,
43.189720153808594,
42.37004089355469,
42.040618896484375,
42.040618896484375,
41.866981506347656,
41.5322151184082,
41.38823699951172,
40.935577392578125,
40.824806213378906,
40.749183654785156,
40.73841094970703,
40.69175720214844,
40.67359161376953,
40.67359161376953,
39.58671569824219,
39.548160552978516,
39.192420959472656,
38.993873596191406,
38.993873596191406,
38.993873596191406,
37.9779052734375,
37.61761474609375,
37.29742431640625,
37.29742431640625,
37.29742431640625,
37.29742431640625,
37.29742431640625,
37.20800018310547,
36.17198944091797,
36.17198944091797,
36.17198944091797,
35.51155090332031,
35.44261932373047,
35.412864685058594,
35.21326446533203,
34.82312774658203,
34.82312774658203,
34.4613037109375,
34.446189880371094,
34.198997497558594,
33.24085235595703,
33.06462860107422,
32.74974060058594,
32.74974060058594,
32.74974060058594,
32.74974060058594,
32.74974060058594,
32.74974060058594,
32.74974060058594,
32.74974060058594,
32.74974060058594,
32.74974060058594,
32.664249420166016,
32.638397216796875,
31.62430763244629,
31.62430763244629,
31.62430763244629,
31.122529983520508,
31.081623077392578,
30.27544593811035,
30.18995475769043,
30.10614776611328,
30.100414276123047,
29.966461181640625,
29.966461181640625,
29.966461181640625,
29.400062561035156,
29.35701560974121,
29.33722496032715,
29.202354431152344,
28.69316864013672,
28.545536041259766,
28.15337371826172,
27.56348419189453
],
"content": [
"I use cygwin and gcc the test framework is CppUtest .",
"I m using CppUTest to test the C code defined in a fornol.c source file .",
"I m trying to learn TDD using CPPUTest for embedded C unit-testing .",
"I was trying to compile the c++ files that come with CPPUTest .",
"And I am using CppUTest C++ for unittesting .",
"It s a unit test project using the CppUTest framework older than 3.4 - I think .",
"For inherits of C function in CppUTest I should write .. . .. . Is any alternative to inherit all C project into Cpp for CppUTest",
"I m using CppUTest as framework .",
"I m starting using CppUTest for some C C++ projects .",
"For example my production code say it builds to an executable has .. . .. . For unit test I am using CppUTest .",
"That is a bug in cpputest .",
"Download and extract Cpputest to c : cpputest-x.x .. . .. . Configure and install cpputest : Start cygwin and input the following shell commands .. . .. . cd c : cpputest-x.x .. . . configure .. . make .. . make check .. . .. . Install helper scripts optional step .. . .. . cd scripts .. . . InstallScripts.sh .. . .. . Add CPPUTEST HOME as an environment variable : in c : cygwin64 home your user name.bash profile add .. . .. . export CPPUTEST HOME cygdrive c cpputest-x.x .. . .. . You should now be good to go .",
"I am using cpputest library to test my application .",
"You can either file an issue https : github.com cpputest cpputest issues or open a pull request https : github.com cpputest cpputest pulls for your fix .",
"Download CppUTest .. . 3 .",
"In the CppuTest makefile have included CPPUTEST CPPFLAGS + -std c++1y .",
"I am trying to learn cpputest so went to the cpputest manual and copied the below code in my ubuntu 14.04lts laptop and tried to make .",
"If I change CppUTest framework code can I then commit changes",
"The cpputest version wasn t the same .",
"For running the cpputest cases you need two file .",
"I am trying to understand use a pre-defined Makefile from CppUTest MakefileWorker.mk https : github.com cpputest cpputest blob master build MakefileWorker.mk .",
"TEST GROUP macro creates a struct https : github.com cpputest cpputest blob 32dd4276545dd947e166b6bc9ae646f1e2895973 include CppUTest UtestMacros.h and then you create a static member in that struct .",
"What is the disadvantages of extern in CppUTest",
"It s possible the cpputest binaries and headers are not found under windows it may help to add cpputest binaries path to PATH .",
"I am getting started with Test Driven Development for embedded C and I started to read the book : Test-Driven development for embedded C in which they recommend two development system test-environments : Unity and CppUTest .",
"I found out that the problem here is the version of cpputest framework .",
"Is it possible and how to achieve this with CPPUtest mocking facility",
"So I decided to try CppUTest .",
"Please answer if you are familiar with CppUTest .",
"Trying to set up an embedded TDD environment in Eclipse : .. . .. . Application Project set up for GNU-ARM cross-compilation .. . CppUTest Project to build CppUTest via Cygwin working great .. . Test Project to house unit tests test groups test runner .. . .. . Trouble I m having is that the Test Project builds its unit tests into .o files but won t build the tested .h .c files so the linker fails on undefined references to the missing objects .",
"you can enable CppuTest C++11 by using this call : cmake -DC++11 ON . . .",
"Now you should really be reading the CppUTest documentation or the excellent book Test Driven Development for Embedded C https : pragprog.com book jgade test-driven-development-for-embedded-c .",
"I have CppUTest-3.6 configured with visual-studio-2010 according to D : cpputest-3.6 docsWalkThrough VS21010.docx .. . .. . Hasan",
"I have never used any unit test framework with C++ .",
"I would like to use the mock in following way in TEST function : .. . .. . I cannot find such example in CppUTest Mocking documentation .",
"Here is the calling code in a cpputest test file : .. . .. . And here is the definition of the operator function itself : .. . .. . Please note that : .. . .. . 1 .",
"I agree that cpputest documentations sucks .",
"I am learning TDD and using CppUTest in eclipse .",
"Has anyone managed to build CppUTest 3.71 with MinGW",
"I m a newby in cppuTest and actually I m trying to build the . examples within the CppuTest root directory .",
"Now I took CppUTest version 3.6 .",
"You may be fine with not having separate test case for each scenario or CppUTest may have support for programmatic way of adding test cases .",
"I just installed CppUTest on my MAC using brew as indicated by the guide .",
"The error you are getting is a linker-error and it suggests that you are not linking the CppUTest library .",
"If not write to the CppUTest google group theres always friendly people willing to help .",
"I assume you have downloaded the stable release so you can try with the current Git Snapshot https : github.com cpputest cpputest .",
"I created a static CPP library for the CppUTest Framework which copiled successfuly after a small change .",
"In which source include file is the version number of CppUTest http : cpputest.github.io defined",
"I m setting up CppUTest for our embedded system project .",
"I ll try to do something with CppUTest before confirming this works .",
"I compiled CppUTest with cygwin in codeblocks I use MinGW .",
"In build options add CppUTest lib to search directories for the linker .",
"Compile CppUTest in cygwin .. . .. . I think I ve completed the two first steps but I have no idea how to compile CppUTest in cygwin I ve never used cygwin before .",
"Here is the idea using CppUTest : .. . .. . Usage example : .. . .. . Thanks Edy .",
"I am using CppUTest in eclipse-cdt ubuntu 14.0 .",
"I ve been using CppUTest with g++ 4.7.2 for a while now without problems .",
"I installed cpputest on Ubuntu by : .. . .. . Now I am trying to build the examples from the book and it fails : .. . .. . It seems like it cannot find where apt-get installed cpputest .",
"I have the code as below : .. . .. . and I use CPPUTEST with the test code as below : .. . .. . But the error is : Allocation deallocation type mismatch .. . .. . I don t know why please help .",
"Then I have now added a few lines-of-code setting up mocking using the CppUTest and now things work again...maybe a bug in the old CppUTest framework.. . .. . .. . EDIT2 : Now in another location I can step into the subroutine but then I m stuck at the top line of the routine .",
"I downloaded the pthreads package for MinGW they I handled the timespec redefinition by adding preprocessor two lines to CppUTest source code .",
"The furthest I got was to compile the CppUTest and run its tests and that is it .",
"Considering cpputest this work : .. . .. . That is also basically what is written in README.md",
"Regarding your answer I already managed to do that compiling CppUTest but my problem is how to run the first test of one of my modules .",
"We managed to get it to work by using a mirror of the old programmers computer and then copying the directories for cygwin and CppUTest .",
"Try something like this- .. . .. . File : cpputest1.cpp .. . .. . File : cpputestmain.cpp .. . .. . Make sure that your these two files under same folder tests in your cpputest directory .",
"I am currently trying to compile and link the CppUTest library with my project .",
"CppUTest http : cpputest.github.io index.html is the perfect fit for embedded C development since it is the only testing framework that allows to mock free functions in your case write to i2c and read from i2c .",
"A new feature has been added to CppUTest which lets you specify an output parameter for mocks .",
"The latest version according to CppUtest homepage is 3.4 and I want to see if our system is using that or not .",
"https : groups.google.com forum topic cpputest N--j9TW667Y .. . .. . If you use the source distribution then it is in the configure.ac file .",
"I m trying to use CppUTest in Windows first step is to get it to work and I already have problems .",
"Does anyone know how to build CppUTest 3.7 latest release with MinGW or CMake",
"For this I ve attempted the following : .. . .. . In build options add CppUTest include to search directories for the compiler .",
"and Conflicts with my own overload .. . .. . TL DR .. . .. . In UncrosserTest add includes for CppUTest after your s .",
"The issue here was as suggest @Jonathan Wakely that cpputest defines macro NEW which prevent new from being included correctly .",
"To resolve the issue we reorder the includes to include all libs before including cpputest headers .",
"The identifier NEW is a reserved name http : stackoverflow.com q 228783 981959 so a library like cpputest must not use it .",
"I am trying to compile the following test application using CodeBlocks and CppUTest however no matter what I do I always get the undefined-reference error .",
"gcc below contains the path where g++ is installed mnt.. . .. . .. . Now when I make the CppuTest to build the Unit Tests for my code I get the following error .",
"CppUTest uses old style casts for compatibility reasons and the current makefiles already contain compiler-flags to disable that warning .",
"I m not familiar with CppUTest but it s not possible to just create an accessor and return the mock variable when needed",
"Hey Paul I wonder if you still have the same problems with a more recent version of CppUTest.. .",
"when I call SConScriptUtest I get the following error : .. . .. . cannot find -lCppUTest cannot find -lCppUTestExt .. . .. . This is while I have included the path for finding CppUTest and CppUTestExt : .. . .. . LIBPATH points to where your libraries reside : testenv.Append LIBPATH . . cpputest lib .. . .. . my . . cpputest lib path has both CppUTest.lib and CppUTestExt.lib .. . .. . So why is it not picking up",
"You may have an old version of CppUTest that only defines the second form of RunAllTests .. . .. . I usually use the RUN ALL TESTS macro and define argc as const char like this :",
"that the memory actually gets freed just only after CppUTest already reported the leaks .",
"The reason is that static objects are only destroyed and free their memory during global destruction after main function returns but CppUTest probably reports the leaks at the end of the test driver which means still in main .",
"The CppUTest documentation makes some comments about the macros conflicting with overloaded new operators and suggests including the standard headers first but I get this problem without including any headers at all although it looks like CppUTest CommandLineTestRunner.h is including string itself .",
"The basic theory behind this is that if you are always including .c files it quickly becomes impossible to unit test since the whole idea of unit-testing is drilling down and testing one bit of code without depending on the rest of it .",
"If you are using CppUTest s MakeFileWorker.mk you will want to add define an environment variable CPPUTEST HOME that specifies the directory where you installed CppUTest .",
"I tried to use Cmake GUI and MinGW make however CppUTest 3.7.1 latest version doesn t build with MinGW due to an issue of this compiler with pthreads .",
"Possible it s an include problem see CppUTest Manual http : cpputest.github.io manual.html memory leak detection - section Conflicts with operator new macros STL",
"I m inclined to include the whole c file to my test case .",
"I am sure this is a very common scenario for unit-testing c code .",
"But current unit test frameworks only work on code lebel.. .",
"I write a simple makefile like this : CC gcc CXX g++ CPPUTEST HOME root usr cpputest-3.4 FLAGS -c CPPFLAGS + -I CPPUTEST HOME include LD LIBRARIES -L CPPUTEST HOME lib -lCppUTest -lCppUTestExt TARGET TryTest OBJECTS TryTest.o SOURCES TryTest.cpp TARGET : OBJECTS Then use make to build the target .",
"I use CMake to create a Visual Studio 2013 Solution for the CppUTest-library and it builds .",
"Apparently these locations aren t in the loaders default search path so after linking the 64 bit variant to usr local lib I was able to make CppUTest without a hiccup .",
"I was able to get this working by linking the Application Project s source tree into my Test Project s list of source locations under : Test Project -- Properties -- C C++ General -- Paths and Symbols -- Source Location .",
"It sounds as-if just doing the above in your test code which is where you re using C++ would be easier ."
]
}
|
{
"confidence": [
67.85865783691406,
67.23201751708984,
64.38410949707031,
62.46263885498047,
62.105316162109375,
61.564910888671875,
61.30500793457031,
60.45097351074219,
60.07536315917969,
59.08852005004883,
57.82954406738281,
57.72334671020508,
56.17779541015625,
55.084022521972656,
54.32656478881836,
54.23638916015625,
51.94032287597656,
51.548118591308594,
50.908626556396484,
50.49784469604492
],
"content": [
"Question : I have never used any unit test framework with C++ . Now I took CppUTest version 3.6 . I am trying to compile library according to README InstallCppUTest.txt file : .. . .. . . configure OK .. . .. . make Not OK .. . .. . Shall I correct all of these compiling error or can I somehow skip the errors I know that g++ is symbolic link-to clang in OSX . Previously I tried to use gtest . Basically it was very nice when making dummy test e.g . EXPECT EQ 1 1 . When I tried to test a class of normal production code it was difficult to find how to use stubs or mocs . So I decided to try CppUTest . Comment : Preferences and opinions . IMHO the use of the old-style cast can hide certain types of conversion errors and thus should be edited to one or sometimes more of the new style casts which can be very tedious . Comment : Ok . If I change CppUTest framework code can I then commit changes Please answer if you are familiar with CppUTest . Comment : Pasi I d recommend you use the current head from github . I am pretty sure the error will be gone . CppUTest uses old style casts for compatibility reasons and the current makefiles already contain compiler-flags to disable that warning . You could of course locally change the make for 3.6 but I don t remember offhand where you d have to do that and the current code is already fixed.. . Comment : The flag in question is -Wno-old-style-cast . .. . Answer : Shall I correct all of these compiling error or can I somehow skip the errors You may disable the warning or remove -Werror - it turns all warnings into errors . I assume you have downloaded the stable release so you can try with the current Git Snapshot https : github.com cpputest cpputest . However this may not be stable . Ok . If I change CppUTest framework code can I then commit changes You should frist check the current sources link above . If it s not fixed yet it s always a good idea to contribute your fix to the project . You can either file an issue https : github.com cpputest cpputest issues or open a pull request https : github.com cpputest cpputest pulls for your fix .",
"Question : I ve taken over a programming project from another programmer . This project uses a lot of unit tests to verify the code which I intend to continue using . I have no prior experience with unit-testing apart from some theoretical knowledge so he wrote a very small guide for how to get it working before he left the company . That guide looks like this . 1 . Install cygwin with support for gcc g++ .. . 2 . Download CppUTest .. . 3 . Compile CppUTest in cygwin .. . .. . I think I ve completed the two first steps but I have no idea how to compile CppUTest in cygwin I ve never used cygwin before . I tried some quick googling on the Title of this question but I couldn t find something useful . .. . Answer : You can use either CMake http : www.cmake.org or autoconf . CMake .. . .. . Open a cygwin terminal and : .. . .. . Or use the CMake GUI .. . .. . Btw . you can enable CppuTest C++11 by using this call : cmake -DC++11 ON . . . Cmake will print this line then : .. . .. . autoconf .. . .. . With a cygwin terminal : Comment : Ok I did it the CMake way . A lot of text were printed out in the terminal so I m pretty sure it worked . The next problem is running the actuall tests . In the instructions the other programmer left it says Go to C : .. . . . . . cpputests the folder which has his tests in the terminal and then write make . When I do this I get an error Makefile44 : build MakefileWorker.mk : No such file or directory . The compiled files and the existing unit tests are currently in differant directiories so I guess this is the problem . But I m not sure how the folder structure is supposed to look . Comment : Do you have to build the complete project before Eg . run make within the project s root . Can you also check your makefile for the exact error It s possible the cpputest binaries and headers are not found under windows it may help to add cpputest binaries path to PATH . Comment : I don t know if I have ti build teh complete project . That s pretty much the entire problem I have no clue what to do to make it work . I m not at work anymore so I can t check the exact error until monday Comment : Ok if you are back there can you check how your project application eg . is build usually It s often the case you build the project maybe running make in it s root dir building and running test like make test within the test dir . Or building the the test you ll get some kind of test application and running those . Comment : Hi sorry for not-responding . We managed to get it to work by using a mirror of the old programmers computer and then copying the directories for cygwin and CppUTest . Anyway thanks for your effort to help",
"Question : I ve taken over a programming project from another programmer . This project uses a lot of unit tests to verify the code which I intend to continue using . I have no prior experience with unit-testing apart from some theoretical knowledge so he wrote a very small guide for how to get it working before he left the company . That guide looks like this . 1 . Install cygwin with support for gcc g++ .. . 2 . Download CppUTest .. . 3 . Compile CppUTest in cygwin .. . .. . I think I ve completed the two first steps but I have no idea how to compile CppUTest in cygwin I ve never used cygwin before . I tried some quick googling on the Title of this question but I couldn t find something useful . .. . Answer : I made a mini guide for internal use at my company have been working fine for us so far . It goes something like this : .. . .. . Install cygwin default and development packages . Download and extract Cpputest to c : cpputest-x.x .. . .. . Configure and install cpputest : Start cygwin and input the following shell commands .. . .. . cd c : cpputest-x.x .. . . configure .. . make .. . make check .. . .. . Install helper scripts optional step .. . .. . cd scripts .. . . InstallScripts.sh .. . .. . Add CPPUTEST HOME as an environment variable : in c : cygwin64 home your user name.bash profile add .. . .. . export CPPUTEST HOME cygdrive c cpputest-x.x .. . .. . You should now be good to go . If not write to the CppUTest google group theres always friendly people willing to help .",
"Question : Trying to set up an embedded TDD environment in Eclipse : .. . .. . Application Project set up for GNU-ARM cross-compilation .. . CppUTest Project to build CppUTest via Cygwin working great .. . Test Project to house unit tests test groups test runner .. . .. . Trouble I m having is that the Test Project builds its unit tests into .o files but won t build the tested .h .c files so the linker fails on undefined references to the missing objects . I can t depend on the object-files from the Application project or that project s builds because they re cross-compiled to ARM EABI objects . I need the Test Project to also build the Application project s source files . Is there a way to tell Eclipse to do this or do I need to set up a pre-build script to copy the tested files into a source tree within the Test Project .. . Answer : I was able to get this working by linking the Application Project s source tree into my Test Project s list of source locations under : Test Project -- Properties -- C C++ General -- Paths and Symbols -- Source Location . The downside to this approach is that unless both the Application and Test Projects are inside the Eclipse workspace an absolute path is required to add the source location .",
"Question : I m doing Unit Testing of embedded C code without running on target hardware.Here is one part of the code : .. . .. . The function write to i2c writes a value to a specific register . The function read from i2c reads back the value from the register . Further I m using the variable tempReadback to compare if the read back value is the same as the written one . So far OK and this works on the target hardware . Now I m doing the Uni Tests without running the code on target Hardware Software in the Loop . This means the expression tempReadback msg- value will never be true tempReadback is 0 and I will run each time in the statement somethingB . Is there any way to fake the register read back I m using CppUTest as framework . Will be thankful Comment : I gave you a very detailed answer did you read it Comment : Hi @marco.m thank you very much for the detailed explanation Sorry I have been on vacation and just now reading your message . I will try it and inform about the results . .. . Answer : CppUTest http : cpputest.github.io index.html is the perfect fit for embedded C development since it is the only testing framework that allows to mock free functions in your case write to i2c and read from i2c . Now you should really be reading the CppUTest documentation or the excellent book Test Driven Development for Embedded C https : pragprog.com book jgade test-driven-development-for-embedded-c . Anyway the following code shows how to do it . Your Unit Under Test UUT written in a way that is compilable next time you ask a question on SO please make the effort : .. . .. . As you wrote we need to fake or more exactly we need to mock write to i2c and read from i2c . We put the mocks in a separate file say i2c mock.cpp so that when building the Unit Test we link against the mock and not against the real implementation : .. . .. . Please refer to the CppUMock documentation for details . This is just classic CppUMock boilerplate . Last part is the Unit Test : .. . .. . This UT will actually give 100 branch coverage . Again I cannot explain all the details . If you observe and compare test cases somethingA and somethingB you will see what is needed to cause the UUT to once go in the path that calls somethingA and once to go in the path that calls somethingB . Let s take for example .. . .. . Here we are saying to CppUmock to expect a call to function read from i2c to ignore what the parameters are and this is of fundamental importance to return-value + 1 or anything else you fancy that is different from value . This will cause the UUT to go in the path that calls somethingB . Happy embedded C development and happy unit-testing",
"Question : Installed g++ 4.9.0 experimental version under Ubuntu I am using certain features provided by this version .. . .. . When building my code I use cmake from a script and it builds correctly . gcc below contains the path where g++ is installed mnt.. . .. . .. . Now when I make the CppuTest to build the Unit Tests for my code I get the following error . In the CppuTest makefile have included CPPUTEST CPPFLAGS + -std c++1y . I guess that am missing some flags in this makefile because as I said the C++ experimental library is building correctly in my regular code . What am I missing .. . Answer : Possible it s an include problem see CppUTest Manual http : cpputest.github.io manual.html memory leak detection - section Conflicts with operator new macros STL and Conflicts with my own overload .. . .. . TL DR .. . .. . In UncrosserTest add includes for CppUTest after your s . Instead of .. . .. . do",
"Question : This is a simple question I believe.. . I want the variable virtualLeds to be shared between all the tests in the test group LedDriverTests this is the code : .. . .. . When I try to compile I get the following error : .. . .. . Any ideas Comment : I don t see any good reason to share state between tests here . Sharing state between tests as opposed to fresh state for each test results in order dependencies between tests and fragile tests http : xunitpatterns.com Fragile 20Test.html that can intermittently fail as the code changes . Your best option is to use a fresh fixture http : xunitpatterns.com Fresh 20Fixture.html for each test case . .. . Answer : TEST GROUP macro creates a struct https : github.com cpputest cpputest blob 32dd4276545dd947e166b6bc9ae646f1e2895973 include CppUTest UtestMacros.h and then you create a static member in that struct . See more about static-members in struct http : stackoverflow.com a 19469639 1517864 . In short that s why you re unable to access it in this way virtualLeds 0xFFFF .. . .. . Looking at your code . I think what you want to do is : .. . .. . setup is called before running each TEST .. . .. . Remember that unit tests should pass or fail independently of other tests https : pragprog.com magazines 2012-01 unit-tests-are-first . Comment : Absolutely true aspect of unit-testing +1",
"Question : null .. . Answer : I ve been using the same CodeBlocks 13.12 with the same GDB 7.5 for the same code-project for over two years now . It s a unit test project using the CppUTest framework older than 3.4 - I think . The code is constantly changing of course - maybe that s a red herring - but maybe some change in the code caused my recent problem : .. . .. . Basically since a couple of weeks - when and where ever I set a breakpoint - I get to the breakpoint alright but then I can t move on I can t step over step into continue nothing . If I try I just stay at the same line of code where the breakpoint is and I get the associated .. . .. . debugger output as-if I ask the debugger to go to that same breakpoint again and again . Any idea someone I tried my best to google it but no luck . : - .. . .. . EDIT : To make this more interesting this is actually not consistent behavior . I just set another breakpoint in a subroutine and now things work as expected . Then I have now added a few lines-of-code setting up mocking using the CppUTest and now things work again...maybe a bug in the old CppUTest framework.. . .. . .. . EDIT2 : Now in another location I can step into the subroutine but then I m stuck at the top line of the routine . : -",
"Question : I am using CppUTest in eclipse-cdt ubuntu 14.0 . For inherits of C function in CppUTest I should write .. . .. . Is any alternative to inherit all C project into Cpp for CppUTest What is the disadvantages of extern in CppUTest .. . Answer : Well one alternative is of course to move the extern C declarations into your C-project s headers protected by if defined cplusplus of course . That will however mean that you have to go through the entire project and fix it . It sounds as-if just doing the above in your test code which is where you re using C++ would be easier . Many people do that as a way to make their C code usable from C++ . Personally I think it s a bit dirty since you re mixing languages don t cross the streams http : en.wikipedia.org wiki Proton pack Crossing the streams but it s still very common . See this question http : stackoverflow.com questions 3789340 combining-c-and-c-how-does-ifdef-cplusplus-work for lots of discussion about this . Comment : It works great .",
"Question : I m trying to learn TDD using CPPUTest for embedded C unit-testing . I was able to compile a basic C code using gcc on eclipse CDT . I was trying to compile the c++ files that come with CPPUTest . The machine I m trying to run is 64-bit Windows 7 OS . I have installed i686-w64-mingw32 binary package from sourceforge for gcc . The compilation of the test cpp files and linking using make all was successful . But when the tests started running I got the following error . The Program can t start because libstdc++-6.dll is missing from your computer . Try reinstalling the program to fix the problem . But I find libstdc++6.dll under mingw mingw lib . I have added this to the path . Still it doesn t seem to run the tests . Any suggestions to fix this will be helpful . .. . Answer : hi go to this address and download TDM-GCC compiler and befor instal that clean last mingw http : tdm-gcc.tdragon.net",
"Question : I am trying to compile the following test application using CodeBlocks and CppUTest however no matter what I do I always get the undefined-reference error . I compiled CppUTest with cygwin in codeblocks I use MinGW . The project directory just has two files main.cpp and tests.cpp I am trying to get this to compile . This is the main.cpp file : .. . .. . This is the tests.cpp file : .. . .. . I already have the libraries libCppUTest.a and libCppUTestExt.a now I have to link them to the project . For this I ve attempted the following : .. . .. . In build options add CppUTest include to search directories for the compiler . In build options add CppUTest lib to search directories for the linker . In link settings add libCppUTest.a and libCppUTestExt.a to link libraries . Also tried with the full path to these libraries . I think the problem is not Codeblocks because I ve tried with every guide I ve found to link the libraries and I always get undefined-reference . I ve also tried to add these as global settings but I get the same error undefined-reference . Any ideas Comment : This is no C code . Do not add C tag for C++ . Comment : Ok that s fine . Apologies . Comment : Libraries in C++ have no standard format and are not inter-operable even with different compiler versions . I m suspecting it s because of the different compilers . Read about name-mangling in C++ shared-libraries . Comment : can t you use Cmake on windows to compile it and can t you use DLL libraries Comment : I tried to use Cmake GUI and MinGW make however CppUTest 3.7.1 latest version doesn t build with MinGW due to an issue of this compiler with pthreads . So I used cygwin to compile it . .. . Answer : As pointed out by @Sreekar the problem is that I was using MinGW in codeblocks and the libraries were compiled with cygwin . Changing the compiler to cygwin in Codeblocks fixed the issue for me . This describes the process to change the compiler to cygwin in codeblocks if needed : .. . .. . https : www.youtube.com watch v oVmd0P85D8o",
"Question : I am getting started with Test Driven Development for embedded C and I started to read the book : Test-Driven development for embedded C in which they recommend two development system test-environments : Unity and CppUTest . Thus I decided to download the code of both and also downloaded and installed Cygwin in order to compile the stuff . However once I download everything I get really lost since there is not good documentation of this kind : .. . .. . 1- First go to XXX . 2- Run XXX . 3- Copy XXX file into XXX folder . 4- And voila all set .. . .. . The only thing I find when I download CppUTest and Unity is a ton of folders with makefiles and stuff and some READMEs that for me are like written in Chinese . The furthest I got was to compile the CppUTest and run its tests and that is it . So here is my question . Imagine that I already have my Module.c Module.h and ModuleTest.cpp . What do I have to do to compile it and run the test I wonder if you have experience with this tools and can give me some tips and advices . Thank you and best regards . Comment : http : cpputest.github.io manual.html seems clear to me . But I miss why you think embedded C and cygwin should be related . Comment : Well I need Cygwin to follow the examples in the book . I didn t go much further in the book but I guess that you can simulate hardware in some way for example if you have to write to an array of leds you just need the address where they are located but the program doesn t actually care if this address is actually connected to hardware or not so you could just have virtual leds . Also I followed that tutorial but didn t get anything . So lets assume I have my module.c module.h and test module.c what do I have to do to run the test .. . Answer : Please in the future follow the rule : one problem and one specific question . Vague question will hardly receive good answer . Considering cpputest this work : .. . .. . That is also basically what is written in README.md Comment : Hello Matzeri you are right and I modified the title and the text body to make my question more clear . I hope it is more understandable now . Regarding your answer I already managed to do that compiling CppUTest but my problem is how to run the first test of one of my modules . As i just edited in my question lets assume I have my module.c module.h and ModuleTest.cpp what do I have to do to run the test Comment : I agree that cpputest documentations sucks . Try odd-e.com material 2009 JAOO TDD C Tutorial https : www.odd-e.com material 2009 JAOO TDD C Tutorial TDD in C JAOO tutorial.pdf",
"Question : null .. . Answer : I am using cpputest library to test my application . I am using scons . when I call SConScriptUtest I get the following error : .. . .. . cannot find -lCppUTest cannot find -lCppUTestExt .. . .. . This is while I have included the path for finding CppUTest and CppUTestExt : .. . .. . LIBPATH points to where your libraries reside : testenv.Append LIBPATH . . cpputest lib .. . .. . my . . cpputest lib path has both CppUTest.lib and CppUTestExt.lib .. . .. . So why is it not picking up Comment : Are you using the testenv environment to build your test program testenv.Program .. . If that s not it can you post the full build command scons generates and the full resulting error Comment : @KennethE.Bellock I have my scons code added above . Comment : SConscript is helpful but even more so if you can scale it down to a minimal example . Can you post the build line scons generates to make your test executable and the full resulting error Comment : @KennethE.Bellock the problem is building for platform . I was building for posix whereas it s gotta be building for win32 platfrom thanks for your help anyways .",
"Question : I have a C module and I want to refactor a little bit . There are some global-variables and structures which are not hidden in the module.h file . I use this variables in some test case but nowhere else so I thought it s a good idea to set them to static . In my test cases I extern these variables and fill with test values . But if they will be static-variables I can t reach them from the test case . I don t want to write getter and setter methods and put it to the .h file because I want to hide this variables . I know if I include the .c file into my test case I can see the static-variables . Is there any other way to fill these variables I use cygwin and gcc the test framework is CppUtest . Thanks in advance . Comment : Apparently you want to debug rather than perform unit-testing .. . .. . Answer : Often its a good idea to create these static-variables in a separate file some like to call it scaffolding so that you can get away from including the .c . The basic theory behind this is that if you are always including .c files it quickly becomes impossible to unit test since the whole idea of unit-testing is drilling down and testing one bit of code without depending on the rest of it . Once you re including all these exterior .c files you aren t doing this . Comment : Thanks for the advice it sounds better than I include the whole c file to the test case . But.. . I came from java and jUnit and a little bit difficult to switch the c approach - : Comment : Java does make unit-testing easier . I loved how you could have a main method in each file . Oh well I like C anyway .",
"Question : I ve following problem . When I try to compile .so library everything works fine . By when I try to create executable which use for example logger.cpp eg . test file I get wall of errors . Full log is here http : pastebin.com AAbMTz6k . However the most funny thing that it compiles on ones developer computer . We check compiler version cmake version and everything is the same . The cpputest version wasn t the same . Maybe anyone of you have face such problem and know what we doing wrong . .. . Answer : Finally we beat that problem . The issue here was as suggest @Jonathan Wakely that cpputest defines macro NEW which prevent new from being included correctly . To resolve the issue we reorder the includes to include all libs before including cpputest headers . Comment : That is a bug in cpputest . The identifier NEW is a reserved name http : stackoverflow.com q 228783 981959 so a library like cpputest must not use it . Comment : I ll report this on theirs site .",
"Question : null .. . Answer : I ve been using CppUTest with g++ 4.7.2 for a while now without problems . However I ve just flipped the -std c++11 option on so I can start using std : : unique-ptr and it fails immediately . Even just compiling the main module : .. . .. . fails with variations on : .. . .. . Removing the -std c++11 option makes everything work just fine again . The CppUTest documentation makes some comments about the macros conflicting with overloaded new operators and suggests including the standard headers first but I get this problem without including any headers at all although it looks like CppUTest CommandLineTestRunner.h is including string itself . Anyone come across this before or know what the issue is Comment : Hey Paul I wonder if you still have the same problems with a more recent version of CppUTest.. .",
"Question : I m using Atmel Studio 6.1.2 SP2 . I m setting up CppUTest for our embedded system project . I created a static CPP library for the CppUTest Framework which copiled successfuly after a small change . Now I m including this library to a test project . A C++ application project . enter image description here http : i.stack.imgur.com UdMjq.png .. . .. . The issue I m facing now is that even though the intellisense is auto completing my include that means that it sees where the library is I get No chuch file or directory error when compiling . In GccApplication1.cpp I have this : .. . .. . And the error is that it can t find the CommandLineTestRunner.h . I tried with and but it doesn t see it . Any ideas For more information . I m following the steps from Atmel here is the tutorial http : www.atmel.no webdoc atmelstudio ch04s02s03s04.html : Comment : The library itself appears to be added correctly but is the library s path in the include list for the compilation I think including the library just gives the linker something to link with you still need to add path information manually.. . Comment : Hello Ross Thanks your suggestion helped moving the compilation forward . You may post it as answer I check it as correct and we close this question . .. . Answer : The No such file or directory error is a preprocessor error . It is telling you that the include file cannot be found in the include file path . Your IDE will have a way to specify the include path . If you are using make then you will want to use the -I option . If you are using CppUTest s MakeFileWorker.mk you will want to add define an environment variable CPPUTEST HOME that specifies the directory where you installed CppUTest . I hope that helps .",
"Question : null .. . Answer : I m writing an unit test where I have to perform different calls to a mocked object . However I m expecting different return output parameters and input parameters on each calls . If I write something like this : .. . .. . It doesn t work because I have an error on the second call with unexpected parameters they seem to be compared with the expected parameters set at the first expectation or the other way around respectively . I tried with different expectations such as expectNCalls but it doesn t work either . Is it possible and how to achieve this with CPPUtest mocking facility",
"Question : I just installed CppUTest on my MAC using brew as indicated by the guide . It failed when I tried to build the example cpp . I guess it is because the header file which define those macros are not included . So I add include as below : .. . .. . Now I get bunch of errors . .. . Answer : The error you are getting is a linker-error and it suggests that you are not linking the CppUTest library . It is hard to actually say what is wrong because your question is missing the Makefiles . Could you explain how you have compiled the example Comment : Hello Bas . I write a simple makefile like this : CC gcc CXX g++ CPPUTEST HOME root usr cpputest-3.4 FLAGS -c CPPFLAGS + -I CPPUTEST HOME include LD LIBRARIES -L CPPUTEST HOME lib -lCppUTest -lCppUTestExt TARGET TryTest OBJECTS TryTest.o SOURCES TryTest.cpp TARGET : OBJECTS Then use make to build the target . Comment : Try to use LDFLAGS instead of LD LIBRARIES and you will also need to add -lstdc++ to it .",
"Question : I have a makefile as described here in the answer : .. . .. . CPPUTestMakeFile Help linking http : stackoverflow.com questions 23624626 cpputestmakefile-help-linking 23625557 noredirect 1 comment36280237 23625557 .. . .. . I have in my cpp file : .. . .. . Then I get the error : .. . .. . Any ideas what to try Comment : Did you solve this I have the same issue on Archlinux installed from AUR Comment : I did fix it but sorry I don t remember how . I think I did not link-to the library properly . Comment : I managed to solve this too . It was the ordering of the arguments to the linker that was messing my compile up : LD LDFLAGS TEST OBJECTS LIBS -o @ was the working order . .. . Answer : For running the cpputest cases you need two file . One should contain all your test cases and another one should contain only main function . Try something like this- .. . .. . File : cpputest1.cpp .. . .. . File : cpputestmain.cpp .. . .. . Make sure that your these two files under same folder tests in your cpputest directory . And link these folder in make file . Please go through this site for more info http : cpputest.github.io"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
unit-testing
|
UNK_RELATION
|
vaadin-charts@vaadin@132
|
vaadin-charts -- vaadin-charts add-on a commercial software library for sophisticated charting and graphing data-visualizations in @placeholder apps .
|
{
"confidence": [
63.91171646118164,
60.48509979248047,
59.8362922668457,
57.77752685546875,
57.55246353149414,
56.934356689453125,
56.873409271240234,
56.58782196044922,
56.58782196044922,
56.22869110107422,
56.22869110107422,
55.937408447265625,
55.67863845825195,
55.208465576171875,
54.937721252441406,
54.937721252441406,
54.937721252441406,
54.6136360168457,
54.6136360168457,
54.6136360168457,
54.226783752441406,
53.629791259765625,
53.629791259765625,
53.622859954833984,
53.39690399169922,
53.16515350341797,
52.58953857421875,
51.7818489074707,
51.47568893432617,
51.05973434448242,
51.05973434448242,
50.234779357910156,
50.141815185546875,
49.444679260253906,
49.444679260253906,
49.444679260253906,
49.444679260253906,
48.89675521850586,
47.08518981933594,
47.08518981933594,
45.47013473510742,
45.47013473510742,
45.47013473510742,
45.18782043457031,
45.11663818359375,
43.53445053100586,
43.285343170166016,
43.07975387573242,
43.07975387573242,
43.07975387573242,
43.07975387573242,
41.464698791503906,
41.464698791503906,
41.34965515136719,
40.87736129760742,
40.366233825683594,
40.163963317871094,
40.046478271484375,
39.635467529296875,
39.529014587402344,
39.44662857055664,
39.40089797973633,
39.26804733276367,
38.46885299682617,
37.90996551513672,
37.83104705810547,
37.372703552246094,
37.1383171081543,
36.97846603393555,
36.97846603393555,
36.49573516845703,
36.49573516845703,
36.221466064453125,
36.00597381591797,
35.974281311035156,
35.898746490478516,
34.94156265258789,
34.918113708496094,
34.39091873168945,
34.28369140625,
33.78916549682617,
33.78916549682617,
33.72275161743164,
33.717411041259766,
32.924198150634766,
32.455230712890625,
32.436824798583984,
32.34800338745117,
32.34800338745117,
32.31269836425781,
32.10235595703125,
32.10235595703125,
31.446929931640625,
31.201404571533203,
30.988510131835938,
30.82176971435547,
30.82176971435547,
30.63473129272461,
30.63473129272461,
30.172088623046875
],
"content": [
"I m trying to add charts to a Vaadin application 6.8.12 using Vaadin Charts 1.1.2 the later being a wrapper for Highcharts .",
"Using Vaadin 6.x and Vaadin Charts I am playing around with BasicColumn http : demo.vaadin.com charts BasicColumn .",
"How can I style the charts in Vaadin charts from CSS",
"@Abbas why then add a vaadin-charts tag in the first place",
"In Vaadin Charts 2 https : vaadin.com add-ons charts is there a way to get the Title http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model Title.html and Legend http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model Legend.html to appear on the same row",
"If you built just vaadin-charts-demo so far build vaadin-charts-parent before as well .",
"I m trying to create a pie-chart with Vaadin Charts .",
"The ChartOptions http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts ChartOptions.html class has a setTheme http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts ChartOptions.html setTheme com.vaadin.addon.charts.model.style.Theme method .",
"You can call the setMargin http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 1.0.0 com vaadin addon charts model Title.html setMargin java.lang.Number method on the Title http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 1.0.0 com vaadin addon charts model Title.html object .",
"Use constants defined in the VerticalAlign http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model VerticalAlign.html enum .",
"My X-axis is a date-time DataSeries http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model DataSeries.html .",
"Title Object Style Object .. . .. . In Vaadin Charts https : vaadin.com add-ons charts 2 the title and subtitle of the chart are represented by appropriately named objects Title http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model Title.html and Subtitle http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model SubTitle.html .",
"How does one add an Add-On such as Vaadin Charts 2",
"Is there a way to reduce the vertical white space between the elements of a chart in Vaadin Charts 2 https : vaadin.com add-ons charts",
"I m trying to install Vaadin Charts 2 .",
"I m trying to run vaadin-charts-demo .",
"The parent includes vaadin-charts-examples as module .",
"Each has an optional Style http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model style Style.html object .",
"The Configuration contains a Legend http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model Legend.html object .",
"The Legend contains a Style http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model style Style.html object .",
"I used that browser to add Vaadin Charts 2 2.0.0 .",
"I need an example of a shared tooltip in Vaadin Charts 2 .",
"I took this image directly from Vaadin Charts documentation .",
"Example code using Vaadin https : vaadin.com home 7.3.7 with the fresh new as of 2014-12 https : vaadin.com blog - blogs vaadin-charts-2-0-released Vaadin Charts 2 in Java 8 .",
"The Vaadin Charts Demo has a Lines with Complex Html tooltip http : demo.vaadin.com charts LinesWithComplexHtmlTooltip showing such a shared tooltip .",
"Theme .. . .. . The various Theme http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model style Theme.html controlling the look of the charts vary widely in their sizing .",
"To quote the doc http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model Legend.html setStyle com.vaadin.addon.charts.model.style.Style HighCharts http : www.highcharts.com in the engine behind Vaadin Charts : .. . .. . In Highcharts 1.x versions the position of the legend area was determined by CSS .",
"In Vaadin Charts 2 just released 2014-12 how can I style the title and subtitle of the charts",
"The new Valo themes ValoLightTheme http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts themes ValoLightTheme.html and ValoDarkTheme http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts themes ValoDarkTheme.html matching Vaadin s new Valo http : demo.vaadin.com valo-theme common theme tend to be much larger than the previous default VaadinTheme http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts themes VaadinTheme.html matching Vaadin s Reindeer http : demo.vaadin.com ReindeerTheme theme .",
"screen shot of Vaadin Charts 2 chart with legend at the top next to title http : i.stack.imgur.com Nsc3C.jpg .. . .. . Version 1 versus 2 .. . .. . Note that this positioning of the legend area changed between Vaadin Charts 1 and 2 .",
"Have a look at the original class in git https : github.com vaadin-charts blob master examples src main java com vaadin addon charts examples lineandscatter LinesWithComplexHtmlTooltip.java :",
"It looks like you copied the data from the Vaadin Charts Demo - however their source renderer has rendered the HTML .",
"setVerticalAlign .. . .. . You can get them nearly even on the same horizontal line by calling setVerticalAlign http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model Legend.html setVerticalAlign com.vaadin.addon.charts.model.VerticalAlign on the Legend http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model Legend.html itself .",
"The Title object itself has a setHorizontalAlignment http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model AbstractTitle.html setHorizontalAlign com.vaadin.addon.charts.model.HorizontalAlign method .",
"Pass values defined by the HorizontalAlign http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model HorizontalAlign.html enum for LEFT CENTER RIGHT .",
"Instead of accessing such an object call the Legend method getItemStyle http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model Legend.html getItemStyle .",
"Third Orange Box .. . .. . Likewise the Legend http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 1.0.0 com vaadin addon charts model Legend.html object also offers a setMargin command .",
"In vaadin-charts-directorypackage it shows 4 errors after import .. . .. . Then after Add Facets : .. . .. . How do I fix these errors",
"Vaadin Charts can be rendered on the server-side using a headless JavaScript execution environment such as PhantomJS .",
"I am using Vaadin Charts and I have a column chart with time line set .",
"screen shot of Vaadin Charts 2 chart with Title layered on Legend http : i.stack.imgur.com 1Qdsn.png",
"HTTP Status 500 - com.vaadin.server.ServiceException : java.lang.NoClassDefFoundError : com vaadin addon charts model Series .. . .. . Any help regarding this is greatly appreciated .",
"I haven t used the charts yet but the last attempt seems correct according to the Vaadin book .",
"I am using the Vaadin Charts addon in Vaadin Touchkit for a mobile-application ofcorse and I am using Xamerin to develop a hybrid application for both Andriod and iPhone iPad .",
"The question is how to capture a screen of Vaadin not a Vaadin Chart .",
"I am trying to develop with Vaadin Charts but I am not I am not able to install it .",
"Here s the implementation for that : https : github.com vaadin-charts blob 7a55e8dab5b9941a05603c2624a576866e86045d examples src main java com vaadin addon charts examples AbstractVaadinChartExample.java L29 .. . .. . It summary it puts polling with 1 second intervals starts a new thread and while the UI still exists component is attached to UI it runs the task and waits for one second .",
"Server-Side Rendering and Exporting .. . .. . In addition to using charts in Vaadin UIs you may also need to provide them as images or in downloadable documents .",
".. . Vaadin Charts supports a HighCharts remote export service but the SVG Generator based on PhantomJS is almost as easy to use and allows much more powerful uses .",
"I am talking about the buttons that appear at the top left corner of the chart when you enable time line in vaadin-charts 3 .",
"chart1 http : i.stack.imgur.com UGVrN.png using vaadin-charts for angular2 except now I ve got two colors because I m comparing two different sources .",
"Tried following these instructions https : github.com vaadin-charts blob 7a55e8dab5b9941a05603c2624a576866e86045d DevInstructions.md but I can t do the download dependencies step even though it worked yesterday .",
"Tried googling errors one by one but not sure how to apply changes to the different files projects that are imported related to vaadin-charts-demo",
"edit The project is imported from here : https : github.com vaadin-charts tree 7a55e8dab5b9941a05603c2624a576866e86045d .. . .. . Following these instructions : https : github.com vaadin-charts blob 7a55e8dab5b9941a05603c2624a576866e86045d DevInstructions.md .. . .. . After install couldn t compile widgets .. . .. . The instructions are for Luna I m using Mars not sure how that affects things .",
"Reference : vaadin.com directory help using-vaadin-add-ons http : vaadin.com directory help using-vaadin-add-ons",
"All the code in the page is generated by Vaadin .",
"I ve made a ticket with Vaadin .",
"Use this https : vaadin.com directory addon gantt Gantt chart add-on for Vaadin .",
"The problem is that I have a Gauge Vaadin Chart Gauge that does not display on the iOS platforms this is unusual behavior so instead of posting code I would like a proposed solution with the following constraints : .. . .. . The Chart object has to be a Vaadin Charts Gauge .. . The Gauge drawing has to be 360 deg .",
"I noticed a new file AppWidgetSet.gwt.xml appear next to my MyUi.java file and the vaadin-charts-2.0.0.jar appeared in the -ui Dependencies folder .",
"Even worse : None of the info is relevant to the current multi-module Maven archetype for new Vaadin apps .",
"My workspace is intellij-idea 14.0 .. . How to use dchart Vaadin add-on in vaadin and intelij idea",
"I provide monthly data to Vaadin Charts example : .. . 01.08.2015 1 01.09.2015 2 01.10.2015 3 01.11.2015 4 01.12.2015 5 01.01.2016 6 .. . .. . Now I activate the timeline and want to use the range selector .",
"I created a Vaadin pie-chart with following code .",
"I didnt go for the Vaadin application but went for a new project using vaadin maven repo .",
"Im new in VAADIN and my seniors give a task to create a website using VAADIN but im facing a alot of difficulties in VAADIN for creating HTML CSS etc .",
"screen shot of a Vaadin Charts 2 chart with marks showing vertical white space http : i.stack.imgur.com sEj3s.png .. . .. . While I understand this makes for an attractively laid-out chart in my case I am assembling many charts with many lines within a layout .",
"So I assume the Charts add-on was successfully added .",
"Instead use a global setting affecting all charts within a UI https : www.vaadin.com api com vaadin ui UI.html a web browser s particular window tab portlet .",
"In Vaadin Charts 2 when moving the Legend from its default place below the chart to appear above the chart : .. . .. . the result is the Title being rendered as a layer hovering over the Legend .",
"From the context menu I chose Vaadin Open Add-Ons Browser .",
"Did you try adding this repository for Vaadin add-ons :",
"That object has several settings correlating to the usual CSS properties including : .. . .. . font family .. . font-size .. . color .. . .. . Font Size .. . .. . So setting the font-size is a matter of fetching : .. . .. . Chart object Configuration object Title object Style object .. . .. . and then passing a string value for text-size to the setFontSize http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model style Style.html setFontSize java.lang.String method .",
"I d like to prepare individual CSS for each charts .",
"I am working on vaadin portlet and i need to create a vaadin chart sample .",
"I would like to use Vaadin to display live stats of some systems .",
"chart2 http : i.stack.imgur.com wgtXy.png .. . .. . https : vaadin.com docs - part charts webcomponents-api charts-configuration.html charts.configuration.axes.categories .. . .. . Here s what I ve got so far :",
"Why use a chart in vaadin and gwt is hard",
"The difference can be significant especially in smaller charts .",
"Source : Vaadin Forums https : vaadin.com forum thread 12920760",
"In case you have downloaded a vaadin add-on package you might want to refer to add-on instructions .",
"I found Using Add-ons in NetBeans https : vaadin.com directory help using-vaadin-add-ons netbeans but it is outdated .",
"I read about creating a Vaadin widget Eclipse project but then I don t know how to connect with a simple Vaadin Project .. . .. . .. . Any help will be appreciated",
"Example of chart click event : https : demo.vaadin.com charts DateAxisAndClickEvent",
"Unless you have a specific need I suggest putting that code in the init method of your UI subclass such as MyVaadinUI in Vaadin projects created by Maven or the Vaadin Plugin for NetBeans Eclipse .",
"In which pom.xml you added the dependency to charts",
"Is it possible to get the distance between bars in a vaadin bar-chart and in a parallel table sync the table or treetable row heights to match",
"how can I compile the widgetset from a Vaadin project",
"There is a script to download for ant script see at Vaadin Download http : vaadin.com download",
"You don t have to make a widget project just a normal vaadin project then add the addon you need and compile the widgetset .",
"I ve been having some trouble getting my charts out to PDF .",
"The charts shown on the website is great but when I export to pdf I get this : .. . .. .",
"Here is an exemplary JsFiddle that used the data that is transferred from Vaadin to Highcharts and shows the described behaviour : Fiddle http : jsfiddle.net phqo4ppc 1",
"It s looks like you didn t add your .gwt.xml to web.xml .. . .. . Read this document : https : vaadin.com directory help using-vaadin-add-ons maven",
"When using the vaadin-archetype-clean archetype you first need to uncomment the relevant sections in your pom.xml gwt-maven-plugin and vaadin-maven-plugin configuration sections as well as the dependency on GWT and the snapshot plugin repositories .",
"I got the TRIAL license key from vaadin but I cannot find a way to install it .",
"When i deploy the tutorial in the book of vaadin without the license i get the following error .",
"Those saved pixels are even more precious when presenting multiple charts together on a page .",
"Use the click events on the chart and then open a new window with the new charts you want .",
"I downloaded required jars vaadin-charts-vaadin6-1.1.7.jar and gson-2.2.1.jar and created an application as give below : .. . .. . After compiling and deploying on tomcat server i am getting following error on UI .. . .. . Widgetset does not contain implementation for com.vaadin.addon.charts.Chart ."
]
}
|
{
"confidence": [
73.88442993164062,
71.6895980834961,
69.56855773925781,
68.81568145751953,
68.44426727294922,
68.29989624023438,
64.91803741455078,
64.53897094726562,
63.94428253173828,
63.759281158447266,
63.308860778808594,
62.53650665283203,
62.23305130004883,
61.4975700378418,
61.371131896972656,
60.08548355102539,
59.86867141723633,
57.67075729370117,
57.58555603027344,
57.48224639892578
],
"content": [
"Question : In Vaadin Charts 2 https : vaadin.com add-ons charts is there a way to get the Title http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model Title.html and Legend http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model Legend.html to appear on the same row I mean can both appear above the chart or both below the chart Putting them on the same horizontal line would save vertical space . Those saved pixels are even more precious when presenting multiple charts together on a page . .. . Answer : setVerticalAlign .. . .. . You can get them nearly even on the same horizontal line by calling setVerticalAlign http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model Legend.html setVerticalAlign com.vaadin.addon.charts.model.VerticalAlign on the Legend http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model Legend.html itself . Use constants defined in the VerticalAlign http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model VerticalAlign.html enum . screen shot of Vaadin Charts 2 chart with legend at the top next to title http : i.stack.imgur.com Nsc3C.jpg .. . .. . Version 1 versus 2 .. . .. . Note that this positioning of the legend area changed between Vaadin Charts 1 and 2 . To quote the doc http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model Legend.html setStyle com.vaadin.addon.charts.model.style.Style HighCharts http : www.highcharts.com in the engine behind Vaadin Charts : .. . .. . In Highcharts 1.x versions the position of the legend area was determined by CSS . In 2.x the position is determined by properties like align verticalAlign x and y but the styles are still parsed for backwards compatibility .",
"Question : In Vaadin Charts 2 just released 2014-12 how can I style the title and subtitle of the charts The default font-size is huge . I am showing multiple charts per layout so I cannot afford so much space wasted on titling . Is there some command or some CSS hooks for controlling the titles font-size and margin padding .. . Answer : Theme .. . .. . The various Theme http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model style Theme.html controlling the look of the charts vary widely in their sizing . The new Valo themes ValoLightTheme http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts themes ValoLightTheme.html and ValoDarkTheme http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts themes ValoDarkTheme.html matching Vaadin s new Valo http : demo.vaadin.com valo-theme common theme tend to be much larger than the previous default VaadinTheme http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts themes VaadinTheme.html matching Vaadin s Reindeer http : demo.vaadin.com ReindeerTheme theme . So one easy way to change sizes of chart labels is to switch themes . The theme is not set on the individual chart . Instead use a global setting affecting all charts within a UI https : www.vaadin.com api com vaadin ui UI.html a web browser s particular window tab portlet . The ChartOptions http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts ChartOptions.html class has a setTheme http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts ChartOptions.html setTheme com.vaadin.addon.charts.model.style.Theme method . Unless you have a specific need I suggest putting that code in the init method of your UI subclass such as MyVaadinUI in Vaadin projects created by Maven or the Vaadin Plugin for NetBeans Eclipse . Title Object Style Object .. . .. . In Vaadin Charts https : vaadin.com add-ons charts 2 the title and subtitle of the chart are represented by appropriately named objects Title http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model Title.html and Subtitle http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model SubTitle.html . Each has an optional Style http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model style Style.html object . That object has several settings correlating to the usual CSS properties including : .. . .. . font family .. . font-size .. . color .. . .. . Font Size .. . .. . So setting the font-size is a matter of fetching : .. . .. . Chart object Configuration object Title object Style object .. . .. . and then passing a string value for text-size to the setFontSize http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model style Style.html setFontSize java.lang.String method . Seems simple but there is one catch . The Style object is optional . By default it does not exist . In other words the Style object is meant for you and I to override the already-defined internal formatting . So you must first check for the Style object s existence and if null instantiate it . Example code using Vaadin https : vaadin.com home 7.3.7 with the fresh new as of 2014-12 https : vaadin.com blog - blogs vaadin-charts-2-0-released Vaadin Charts 2 in Java 8 . Left-Right Alignment .. . .. . To set the title s alignment towards the left or right of the chart no need for the Style object . The Title object itself has a setHorizontalAlignment http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model AbstractTitle.html setHorizontalAlign com.vaadin.addon.charts.model.HorizontalAlign method . Pass values defined by the HorizontalAlign http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model HorizontalAlign.html enum for LEFT CENTER RIGHT . Legend .. . .. . The legend is similar to Title . The Configuration contains a Legend http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model Legend.html object . The Legend contains a Style http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model style Style.html object . Chart object Configuration object Legend object Style object .. . .. . Legend Item .. . .. . The items marker series name in a Legend have their own styling . To change the font or font-size of those series names access the items Style object . The catch is that there is no layer of LegendItem object . Instead of accessing such an object call the Legend method getItemStyle http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model Legend.html getItemStyle . Chart object Configuration object Legend object getItemStyle method",
"Question : I need an example of a shared tooltip in Vaadin Charts 2 . This means for one slot on the X-axis multiple Y-axis values are shown together in a single tooltip box . The Vaadin Charts Demo has a Lines with Complex Html tooltip http : demo.vaadin.com charts LinesWithComplexHtmlTooltip showing such a shared tooltip . Note how data points in both series halos around red diamond and blue dot are shown highlighted while a single tooltip box displays both data points values . Screen shot of example chart with a tooltip shared between two data points . http : i.stack.imgur.com aVDyB.png .. . .. . An excerpt from the Demo s displayed source code . However adapting that code to my own project fails . My X-axis is a date-time DataSeries http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 2.0.0 com vaadin addon charts model DataSeries.html . GOOD .. . The point.key successfully renders as a date-time string . BAD .. . The series.name : point.y appears literally rather than being interpreted to render a value . Perhaps someone can post a simple complete example .. . Answer : It looks like you copied the data from the Vaadin Charts Demo - however their source renderer has rendered the HTML . Have a look at the original class in git https : github.com vaadin-charts blob master examples src main java com vaadin addon charts examples lineandscatter LinesWithComplexHtmlTooltip.java :",
"Question : I would like to use Vaadin to display live stats of some systems . The requirements require that we send out an email with the stats upon certain conditions . I was wondering if it is possible to do a screen-capture to an image that can then be sent in a email . .. . Answer : The documentation https : vaadin.com book - page charts.advanced.html charts.advanced.export states : .. . .. . 18.7.1 . Server-Side Rendering and Exporting .. . .. . In addition to using charts in Vaadin UIs you may also need to provide them as images or in downloadable documents . Vaadin Charts can be rendered on the server-side using a headless JavaScript execution environment such as PhantomJS . .. . Vaadin Charts supports a HighCharts remote export service but the SVG Generator based on PhantomJS is almost as easy to use and allows much more powerful uses . It continiues with the description how to do this . Comment : The question is how to capture a screen of Vaadin not a Vaadin Chart . Comment : @Abbas why then add a vaadin-charts tag in the first place yet the part about phantomjs holds true for any web application",
"Question : Is there a way to reduce the vertical white space between the elements of a chart in Vaadin Charts 2 https : vaadin.com add-ons charts See the orange boxes in this screen shot . screen shot of a Vaadin Charts 2 chart with marks showing vertical white space http : i.stack.imgur.com sEj3s.png .. . .. . While I understand this makes for an attractively laid-out chart in my case I am assembling many charts with many lines within a layout . So I would like to maximize the amount of pixel used for the chart s plot area . .. . Answer : First Orange Box .. . .. . The first orange box is not actually white space within the chart . Or if it is I do not know how to change it . Second Orange Box .. . .. . The second orange box is margin on the Title element . You can call the setMargin http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 1.0.0 com vaadin addon charts model Title.html setMargin java.lang.Number method on the Title http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 1.0.0 com vaadin addon charts model Title.html object . For a small chart like that shown I have found a value of 5 to be useful . Third Orange Box .. . .. . Likewise the Legend http : demo.vaadin.com javadoc com.vaadin.addon vaadin-charts 1.0.0 com vaadin addon charts model Legend.html object also offers a setMargin command . Again I have found a value of 5 to be useful . Same Size Chart .. . .. . The overall chart remains the same size . Only the space within that overall chart is changed reallocated . With both of these setMargin methods the white space between the object and the plot area is reduced . The freed pixels are allocated to the plot area . The difference can be significant especially in smaller charts . Here is a screenshot of before and after adding calls to set margin to 5 . The scaling of the Y-axis changed because of the newly-gained pixels . screen shot of before and after calling setMargin 5 http : i.stack.imgur.com 6MlKI.png",
"Question : In late 2014 the Vaadin Plugin for NetBeans was updated to create projects using the new multi-module Maven archetype . How does one add an Add-On such as Vaadin Charts 2 I tried pasting into the -ui sub-module s Pom file the Maven snippet found on the Add-On Directory page . No go . When running my app the web page renders a message suggesting the WidgetSet does not contain the add-on . screen shot of running app with message about WidgetSet does not contain implementation http : i.stack.imgur.com fhQgz.png .. . .. . That add-on instructions link leads to this page https : vaadin.com directory help using-vaadin-add-ons . Little information is provided . Even worse : None of the info is relevant to the current multi-module Maven archetype for new Vaadin apps . If there were any documentation telling me exactly what to do in adding an add-on and recompiling my WidgetSet I d gladly follow it . I found Using Add-ons in NetBeans https : vaadin.com directory help using-vaadin-add-ons netbeans but it is outdated . I opened a ticket http : dev.vaadin.com ticket 16723 asking for a new edition of that page . .. . Answer : in the root directory of your project should compile widgetset for your project . Comment : Can I do that from within NetBeans Or must I use the command-line Comment : I tried this on the command-line but it did not help . I quit NetBeans in Terminal I did a cd to the project folder in NetBeansProjects folder . I went into the folder that contains the -production -ui and -widgetset folders . I copy-pasted your mvn clean install hit return nothing appeared on console . I re-opened NetBeans did a clean-and-build on my -ui folder and ran the project . Same message as seen in my screenshot in Question . So I tried this same procedure but using mvn vaadin : update-widgetset install . Lots of output on console . But same error msg . Comment : In which pom.xml you added the dependency to charts Comment : In this experimental project I had Control-clicked on the -ui item in Projects panel of NetBeans . From the context menu I chose Vaadin Open Add-Ons Browser . I used that browser to add Vaadin Charts 2 2.0.0 . I noticed a new file AppWidgetSet.gwt.xml appear next to my MyUi.java file and the vaadin-charts-2.0.0.jar appeared in the -ui Dependencies folder . So I assume the Charts add-on was successfully added . Comment : In other experimental projects I had manually edited -ui item Project Files pom.xml .",
"Question : I m trying to run vaadin-charts-demo . Similar issue to this : Maven Could not resolve dependencies artifacts could not be resolved http : stackoverflow.com questions 4650460 maven-could-not-resolve-dependencies-artifacts-could-not-be-resolved .. . .. . pom.xml content : .. . .. . Tried googling vaadin-chart-examples and chart-demos maven repository etc . but haven t found a solution . How can this be resolved edit The project is imported from here : https : github.com vaadin-charts tree 7a55e8dab5b9941a05603c2624a576866e86045d .. . .. . Following these instructions : https : github.com vaadin-charts blob 7a55e8dab5b9941a05603c2624a576866e86045d DevInstructions.md .. . .. . After install couldn t compile widgets .. . .. . The instructions are for Luna I m using Mars not sure how that affects things . Comment : How did you set up the project initially Where did you get the information from to add this dependency Why is the question tagged with eclipse There s no reference to it in the question . Comment : I added edits - the warning error came up when I tried to compile widgets .. . Answer : If you built just vaadin-charts-demo so far build vaadin-charts-parent before as well . The parent includes vaadin-charts-examples as module . https : github.com vaadin-charts blob 7a55e8dab5b9941a05603c2624a576866e86045d pom.xml So if you don t build parent or examples explicitely at least once none of the modules artifacts is available in your Eclipse workspace and your local Maven repo to be resolved from there . Remember Aggregation and Inheritance http : books.sonatype.com mvnref-book reference pom-relationships-sect-pom-best-practice.html pom-relationships-sect-multi-vs-inherit are different types of POM Relationships https : maven.apache.org pom.html POM Relationships . For resolving dependencies from your Eclipse workspace see Your Eclipse Maven project Properties Maven Resolve dependencies from Workspace projects .",
"Question : In late 2014 the Vaadin Plugin for NetBeans was updated to create projects using the new multi-module Maven archetype . How does one add an Add-On such as Vaadin Charts 2 I tried pasting into the -ui sub-module s Pom file the Maven snippet found on the Add-On Directory page . No go . When running my app the web page renders a message suggesting the WidgetSet does not contain the add-on . screen shot of running app with message about WidgetSet does not contain implementation http : i.stack.imgur.com fhQgz.png .. . .. . That add-on instructions link leads to this page https : vaadin.com directory help using-vaadin-add-ons . Little information is provided . Even worse : None of the info is relevant to the current multi-module Maven archetype for new Vaadin apps . If there were any documentation telling me exactly what to do in adding an add-on and recompiling my WidgetSet I d gladly follow it . I found Using Add-ons in NetBeans https : vaadin.com directory help using-vaadin-add-ons netbeans but it is outdated . I opened a ticket http : dev.vaadin.com ticket 16723 asking for a new edition of that page . .. . Answer : Hack .. . .. . I found one hacky workaround : Put Maven dependency in both the -ui and -widgetset sub-module projects .pom files . I m trying to install Vaadin Charts 2 . So on the Directory page for that product I grab the Maven dependency XML snippet : .. . .. . I open two of the .pom files and paste that dependency into both . screen shot of two .pom files in list under -ui and -widgetset folders http : i.stack.imgur.com EmKo4.png .. . .. . Then I context-click on the -parent module to choose Clean and then choose Build With Dependencies . Lastly run the project and find the add-on now working . Note this workaround does not involve an command-line incantations with mvn . Works entirely within NetBeans which calls Maven on our behalf . This is a tricky kludge in that when an update of your add-on becomes available you will need to update both dependency declarations . There must be a better way .",
"Question : null .. . Answer : I am using Vaadin Charts and I have a column chart with time line set . I read that you can customize the time buttons that set time range of the range selector . I am talking about the buttons that appear at the top left corner of the chart when you enable time line in vaadin-charts 3 . Chart with timeline enable . I took this image directly from Vaadin Charts documentation . http : i.stack.imgur.com 5G4gB.png .. . .. . What I want to do is to change the value of those buttons next to the Zoom label . I checked the javadoc and apparently you can do it by calling the setButtons method . But the thing is that it says that it is an array of configuration buttons and when I go into the Buttons class I cannot see any array . I just need a simple way to set the values to minutes instead of months and years which is the default-value of the buttons .",
"Question : null .. . Answer : I m trying to add charts to a Vaadin application 6.8.12 using Vaadin Charts 1.1.2 the later being a wrapper for Highcharts . I have issues compile the project but at run time the graphs are not portrayed and I get this message in the debug window : .. . .. . JavaScriptException : String : Highcharts error 16 : www.highcharts.com errors 16 Processing time was 140ms for 7645 characters of JSON Referenced paintables : 34 .. . .. . I ve searched for similar errors but haven t found anything yet . Any hints on what may be going wrong would be helpful . Thank you . Comment : For me it means that you are including twice Highcharts Highstock as said in error . Comment : The error has a link-to the highcharts errors page : highcharts.com errors 16 http : www.highcharts.com errors 16 Comment : All the code in the page is generated by Vaadin . How can it be inserting HighCharts twice",
"Question : How do you implement the runWhileAttached method like in this demo : .. . .. . http : demo.vaadin.com charts SplineUpdatingEachSecond Receive error : method runWhileAttached is undefined for type myApp.java .. . Answer : Here s the implementation for that : https : github.com vaadin-charts blob 7a55e8dab5b9941a05603c2624a576866e86045d examples src main java com vaadin addon charts examples AbstractVaadinChartExample.java L29 .. . .. . It summary it puts polling with 1 second intervals starts a new thread and while the UI still exists component is attached to UI it runs the task and waits for one second .",
"Question : Tried following these instructions https : github.com vaadin-charts blob 7a55e8dab5b9941a05603c2624a576866e86045d DevInstructions.md but I can t do the download dependencies step even though it worked yesterday . Widget compile also does not work . In vaadin-charts-directorypackage it shows 4 errors after import .. . .. . Then after Add Facets : .. . .. . How do I fix these errors Simply want to be able to run the charts demo doesn t seem like it should be difficult but can t get past these errors . Tried googling errors one by one but not sure how to apply changes to the different files projects that are imported related to vaadin-charts-demo .. . Answer : Looks like DevInstructions.md has been outdated for a while thanks for noticing I ll create a ticket for that . About running the demos if you re using only maven you need to run install in parent project and then jetty : run in demo project . Note that install might fail for some modules if you don t do the recursive clone because submodule will be missing but the relevant modules will be built and jetty : run should work for demo . If you are using Eclipse and have workspace resolution importing demo examples and addon modules should be enough to be able to use jetty : run in the demo .",
"Question : null .. . Answer : How can I style the charts in Vaadin charts from CSS I d like to read color for Series from CSS . I d like to prepare individual CSS for each charts . Class com.vaadin.addon.charts.model.AbstractConfigurationObject.Style its not enough . How can i build this object from CSS",
"Question : Using Vaadin 6.x and Vaadin Charts I am playing around with BasicColumn http : demo.vaadin.com charts BasicColumn . I want the user to choose bar column colors on the screen . I correctly get the color from user however I couldn t manage to set colors of the column bars dynamically . I know it is pretty simple with DataSeriesItem however there is no color attribute for ListSeries . Is there a way to set the colors of bars on BasicColumn .. . Answer : This is my implementation for DataSeries . But as you set the color on PlotOptionsColumn it should as well work for ListSeries :",
"Question : I m trying to run vaadin-charts-demo . Similar issue to this : Maven Could not resolve dependencies artifacts could not be resolved http : stackoverflow.com questions 4650460 maven-could-not-resolve-dependencies-artifacts-could-not-be-resolved .. . .. . pom.xml content : .. . .. . Tried googling vaadin-chart-examples and chart-demos maven repository etc . but haven t found a solution . How can this be resolved edit The project is imported from here : https : github.com vaadin-charts tree 7a55e8dab5b9941a05603c2624a576866e86045d .. . .. . Following these instructions : https : github.com vaadin-charts blob 7a55e8dab5b9941a05603c2624a576866e86045d DevInstructions.md .. . .. . After install couldn t compile widgets .. . .. . The instructions are for Luna I m using Mars not sure how that affects things . Comment : How did you set up the project initially Where did you get the information from to add this dependency Why is the question tagged with eclipse There s no reference to it in the question . Comment : I added edits - the warning error came up when I tried to compile widgets .. . Answer : Did you try adding this repository for Vaadin add-ons : Comment : Reference : vaadin.com directory help using-vaadin-add-ons http : vaadin.com directory help using-vaadin-add-ons Comment : Yes it didn t work . It also has another project folder as one of its dependencies and the pom for that has the repository . Does that means that they are connected related it s the same as-if it were in the current project pom Comment : @newMAD Apparently you still need to add all dependencies to both poms . Check this link http : www.avajava.com tutorials lessons how-do-i-add-a-project-as-a-dependency-of-another-project.html page 1 for linking projects via maven-dependency .",
"Question : I am trying to develop with Vaadin Charts but I am not I am not able to install it . The documentation says : Once you have installed the library in your project you need to compile the widget set . I installed the library without problems using Maven but after that I don t know what to do . If I try to execute some code I receive an error like that : .. . .. . I have been reading the documentation but I m a little lost . I read about creating a Vaadin widget Eclipse project but then I don t know how to connect with a simple Vaadin Project .. . .. . .. . Any help will be appreciated Comment : You don t have to make a widget project just a normal vaadin project then add the addon you need and compile the widgetset . Look here for more details on how to integrate them : vaadin.com de book - page addons.html https : vaadin.com de book - page addons.html Comment : Here is one of my doubts how can I compile the widgetset from a Vaadin project .. . Answer : It s looks like you didn t add your .gwt.xml to web.xml .. . .. . Read this document : https : vaadin.com directory help using-vaadin-add-ons maven",
"Question : null .. . Answer : I m trying to build a chart like this : chart1 http : i.stack.imgur.com UGVrN.png using vaadin-charts for angular2 except now I ve got two colors because I m comparing two different sources . I ve got the months showing up correctly but I can t figure out how to categorize the months into quarter . chart2 http : i.stack.imgur.com wgtXy.png .. . .. . https : vaadin.com docs - part charts webcomponents-api charts-configuration.html charts.configuration.axes.categories .. . .. . Here s what I ve got so far :",
"Question : I am trying to develop with Vaadin Charts but I am not I am not able to install it . The documentation says : Once you have installed the library in your project you need to compile the widget set . I installed the library without problems using Maven but after that I don t know what to do . If I try to execute some code I receive an error like that : .. . .. . I have been reading the documentation but I m a little lost . I read about creating a Vaadin widget Eclipse project but then I don t know how to connect with a simple Vaadin Project .. . .. . .. . Any help will be appreciated Comment : You don t have to make a widget project just a normal vaadin project then add the addon you need and compile the widgetset . Look here for more details on how to integrate them : vaadin.com de book - page addons.html https : vaadin.com de book - page addons.html Comment : Here is one of my doubts how can I compile the widgetset from a Vaadin project .. . Answer : I have found a good Vaadin Tutorial that speaks about widgetset and some addons : .. . .. . If the add-on contains a custom client-side widget as is the case for most UI component add-ons it is required to create and compile the widgetset before running the application . When using the vaadin-archetype-clean archetype you first need to uncomment the relevant sections in your pom.xml gwt-maven-plugin and vaadin-maven-plugin configuration sections as well as the dependency on GWT and the snapshot plugin repositories . Then see the Directory Help page for detailed instructions . .. . To automatically find added widgets at a later time run the goal vaadin : update-widgetset and to recompile the widgetset after updating client-side widgets or Vaadin execute the goal gwt : compile . To sum up basically you must add to your build goals the nexts one : .. . .. . And automatically the corresponding inherit tags will be added to your gwt.xml file",
"Question : null .. . Answer : I find myself in a bit of a pickle . I am using the Vaadin Charts addon in Vaadin Touchkit for a mobile-application ofcorse and I am using Xamerin to develop a hybrid application for both Andriod and iPhone iPad . The problem is that I have a Gauge Vaadin Chart Gauge that does not display on the iOS platforms this is unusual behavior so instead of posting code I would like a proposed solution with the following constraints : .. . .. . The Chart object has to be a Vaadin Charts Gauge .. . The Gauge drawing has to be 360 deg . A circle .. . The Gauge should have 40 plot points that are clickable .. . Each Y-Axis on the Gauge should be displayed pie-chart style .. . .. . Sketch of Vaadin Chart http : i.stack.imgur.com EOpW0.jpg .. . .. . All help would be much appreciated and if you do need to see what I have done thus far in code I will be more than happy to update this post . On a side note the chart does display if the user rotates the screen and then returns it to its original position . Comment : What have your tried Could you post a live example Comment : I figured out the solution this the chart didn t behave nicely with a responsive width . upon further investigation it could only cater for a minimum width of 338px anything less than that and the calender would not plot its y axis . Although this could have been project specific .",
"Question : In Vaadin Charts 2 when moving the Legend from its default place below the chart to appear above the chart : .. . .. . the result is the Title being rendered as a layer hovering over the Legend . How can I fix this to not be overlapped screen shot of Vaadin Charts 2 chart with Title layered on Legend http : i.stack.imgur.com 1Qdsn.png Comment : since this is a payed addon i d rather pester support . could as well be a bug . .. . Answer : You can use verticalAlign x and y properties to set both the legend and the title location . Using title default position and setting legend vertical layout will result in the overlapping you see . But changing the title or legends Y value can prevent it . EG : .. . .. . Hope this helps"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
vaadin
|
UNK_RELATION
|
opengl@api@45
|
opengl -- opengl is a graphics standard and @placeholder which is platform independent and available for desktop workstation and mobile-devices .
|
{
"confidence": [
41.61540222167969,
38.84233093261719,
36.926143646240234,
36.88371276855469,
36.76360321044922,
35.96031188964844,
35.5069580078125,
34.80491638183594,
34.62034225463867,
34.31989669799805,
34.22553634643555,
34.041507720947266,
33.989078521728516,
33.87379455566406,
33.83571243286133,
33.83495330810547,
33.70818328857422,
33.62348175048828,
33.34346008300781,
33.24441146850586,
33.206787109375,
33.1585807800293,
32.951744079589844,
32.87983322143555,
32.6638069152832,
32.591007232666016,
32.542076110839844,
32.542076110839844,
32.533958435058594,
32.37189483642578,
32.37189483642578,
32.37189483642578,
32.37189483642578,
32.35889434814453,
32.35889434814453,
32.19127655029297,
32.16017532348633,
32.14925003051758,
32.104286193847656,
31.990985870361328,
31.963241577148438,
31.912185668945312,
31.912185668945312,
31.84172248840332,
31.793058395385742,
31.793058395385742,
31.72393035888672,
31.68625831604004,
31.61611557006836,
31.570674896240234,
31.570674896240234,
31.570674896240234,
31.444093704223633,
31.360977172851562,
31.360977172851562,
31.360977172851562,
31.163639068603516,
31.09930992126465,
31.09930992126465,
31.059263229370117,
30.972572326660156,
30.969202041625977,
30.969202041625977,
30.969202041625977,
30.955358505249023,
30.894439697265625,
30.882312774658203,
30.882312774658203,
30.834814071655273,
30.769344329833984,
30.769344329833984,
30.769344329833984,
30.762115478515625,
30.751970291137695,
30.7493896484375,
30.746484756469727,
30.746484756469727,
30.69789695739746,
30.66942024230957,
30.667858123779297,
30.66722869873047,
30.461984634399414,
30.406923294067383,
30.39036750793457,
30.301420211791992,
30.255979537963867,
30.255979537963867,
30.198762893676758,
30.194107055664062,
30.19367218017578,
30.09933090209961,
30.090335845947266,
30.081073760986328,
30.081073760986328,
30.033483505249023,
30.033483505249023,
30.027151107788086,
30.019128799438477,
30.01352882385254
],
"content": [
"OpenGL http : en.wikipedia.org wiki OpenGL .. . .. . OpenGL Open Graphics Library is cross-platform API for rendering 2D and 3D graphics .",
"OpenGL ES is used outside mobile-devices as well .",
"Anyway I hope in the future desktop opengl graphics drivers will implement OpenVG .",
"I thought it was only available in desktop OpenGL .",
"OpenGL is an open cross-platform API STANDARD .",
"Are you asking about desktop OpenGL or OpenGL ES",
"I don t believe this functionality is available in standard OpenGL .",
"OpenGL if no dedicated 3D hardware is available can render the graphics on the CPU .",
"As such OpenGL comes as part of the graphics drivers .",
"I m developing a desktop OpenGL application and I want to make sure it ll be compatible to OpenGL ES so that it ll be easier to port it to mobile platforms later .",
"OpenGL used to be completely separate standard from these models and graphics drivers didn t have to implement OpenGL at all to be used by the OS .",
"This indicates that the OpenGL graphics acceleration is not activate .",
"Which OpenGL",
"The issue i am facing is enabling opengl for the desktop not Opengl ES .",
"1 . in general OpenGL wiki https : www.opengl.org wiki Getting Started has all the links to download the latest OpenGL for your platform OS and graphics card .",
"So I would expect those functions to only be available with -opengl desktop",
"Note that these shaders and the Orange Book are for desktop OpenGL not OpenGL ES 2.0 .",
"From the link NURBS in the OpenGL Graphics Pipeline http : stackoverflow.com questions 14907454 nurbs-in-the-opengl-graphics-pipeline we know that .",
"JOGL simply loads OpenGL if available which it should be .",
"Intel-graphics aren t known for their OpenGL compability",
"GLU http : en.wikipedia.org wiki OpenGL Utility Library .. . .. . GLU OpenGL Utility Library is a graphics library for OpenGL consisting of utility functions which can be used with OpenGL .",
"The two main strands of OpenGL are OpenGL mostly for desktop laptop computers and OpenGL ES for embedded and other small systems .",
"The current binding is for desktop OpenGL .",
"OpenGL is just a standard .",
"The official version of glew does not support OpenGL ES at all only desktop OpenGL OpenGLES is for mobile-devices despite that it can still work on most desktop computers but glew is not made to be compatible with it .. . .. . So you need to either use classic OpenGL won t work on mobile or get rid of glew .",
"Java is cross-platform OpenGL is cross-platform .",
"I have purchased a graphics card which supports OpenGL 4.2 .",
"This library has an OpenGLControl which makes integrating OpenGL graphics into a windows form .",
"OpenGL is a 3D graphics rendering library .",
"I want to use Vector graphics in an OpenGL game .",
"OpenGL usually operates directly on the graphics processor .",
"OpenGL is for rendering graphics did you mean OpenAL",
"It s called The OpenGL Graphics System : A Specification .",
"OpenGL and GLU are independent from each other .",
"These features are all independent of each other in OpenGL .",
"Which OpenGL ES",
"Recompile QTv5.3 with option -opengl desktop .",
"Is there an equivalent extension-function for desktop OpenGL not ES",
"The iPhone uses OpenGL ES which is a restricted subset of OpenGL .",
"Also is this about OpenGL or OpenGL ES",
"It is OpenGL 4.5 which comes along with the graphics driver 361.91 .",
"If I target my framework for OpenGL on the desktop will it just run without modification in an OpenGL ES 2.0 environment",
"No targeting OpenGL for desktop does not equal targeting OpenGL ES because ES is a subset .",
"OpenGL initialization and extension fetching are platform dependent operations .",
"Conclusion .. . .. . OpenGL is an API for rendering 2D and 3D graphics .",
"And in QT5 there is no way to force OpenGL graphics system .",
"You just change the cmake opengl platform to mobile and related installed libraries are used .",
"The nice thing about this is that it allows you to create an OpenGL offscreen drawable that s completely independent of GPU and graphics system .",
"Is this OpenGL or OpenGL ES",
"I am currently investigating the possibility of rendering vector-graphics from an SVG file using OpenGL and OpenGL ES .",
"I am currently investigating the possibility of rendering vector-graphics from an SVG file using OpenGL and OpenGL ES .",
"I downloaded the OpenGL example from the documentation here https : developer.android.com training graphics opengl index.html and didn t change anything .",
"Stage 3D uses : .. . .. . DirectX on Windows systems .. . OpenGL on OSX systems .. . OpenGL ES on mobile .. . Software Renderer when no hardware-acceleration is available .",
"For opengl-es standard this function is not defined .",
"OpenGL is the standard owned and published by Khronos .",
"@o0rebelious0o Opengl is a standard and that will never change .",
"The OpenGL ES bindings are not as thorough as the standard desktop bindings which contain overloads for vectors and matrices .",
"Neither OpenGL nor Direct3D talk to the graphics card .",
"You are trying to mix Core Graphics and OpenGL .",
"OpenGL 4.x features are loadable as extension if available which is fine .",
"I think I was misunderstood - I have good experience with OpenGL but for PC platforms and no experience with OpenGL ES or general mobile platform programming at all :",
"Are you running on a platform that supports OpenGL ES 1.1",
"This is a cross-platform library for loading OpenGL extended functionality .",
"Actually OpenGL is not that cross-platform as people tend to believe .",
"Then it s probably the oddity of OpenGL I had to fix in my own graphics engine : Y V is inverted in OpenGL compared to other graphics APIs .",
"If I login through RDP remote desktop the supported OpenGL version is 1.1 due to the virtual graphics adapter .",
"I use project platform OpenGL glew32s.lib and project platform OpenGL glew.h in my own software .",
"In MSVC I have pragma comment lib platform OpenGL glew32s.lib and include platform OpenGL glew.h .",
"Since OpenGL is just a low-level graphics API you won t find anything like this built into OpenGL directly .",
"OpenGL ES 2.0 does not have many of the fixed-function conveniences of desktop OpenGL pre-3.1 .",
"I am testing on a desktop machine so it is OpenGL executing I just restrict myself to the OpenGL ES API .",
"Construct an OpenTK.GLControl and attach it to the WindowsFormsHost .. . Pass GraphicsContextFlags.Default for a desktop OpenGL context .. . Pass GraphicsContextFlags.Embedded for an OpenGL ES ANGLE context .. . 3 .",
"When you load a texture to OpenGL it does not go to graphics memory .",
"I made a subtle mistake in calling glEnableVertexArrayAttrib only available since OpenGL 4.5 instead of glEnableVertexAttribArray which is available since OpenGL 2.1 .",
"Are you using OpenGL or OpenGL ES",
"Irrlicht is a very basic rendering system that supports OpenGL and OpenGL ES so its easy for your to go mobile .",
"OpenGL ES is a subset of OpenGL running on embedded systems mobile-phones video-game-consoles etc .",
"The problem is that on desktop Qt 5.11 the native painter is not OpenGL .",
"There s FireMonkey - a whole graphics and UI API provided in the box with Delphi that uses Direct2D or OpenGL depending on the platform .",
"From my understanding OpenGL ES is a subset of OpenGL .",
"This is standard functionality in OpenGL 3.x .",
"If OpenGL ES can use the drawing context from EGL would standard OpenGL also work",
"However for cross-platform you could simply use gomobile for mobile platforms and create an interface for generic opengl on desktop and you would seamlessly have both .",
"I m trying to create an OpenGL window on an x64 platform .",
"OpenGL not OpenGL ES .",
"In OpenGL this is the cube -1 +1 3 songho http : www.songho.ca opengl gl projectionmatrix.html contains some nice graphics .",
"I m using OpenGL to draw how does hardware cursor relate to OpenGL graphics",
"I m reading a book on OpenGL Interactive Computer Graphics by Edward Angel .",
"This is the only way to set up vertex attribues in current versions of OpenGL Core Profile of desktop OpenGL or OpenGL ES 2.0 and later .",
"Open Graphics Library OpenGL is a cross-language cross-platform application programming interface API for rendering 2D and 3D vector-graphics .",
"OpenGL ES 2.0 devices can support any size .",
"I m building a graphics API for OpenGL which is based off the basic call-to-draw graphics style .",
"QOpenGLContext : : hasExtension and QOpenGLContext : : getProcAddress are platform independent ways of resolving OpenGL entry points .",
"I use a library that makes the OpenGL calls at least those that are platform-independent i.e .",
"For example Sony s Playstation 3 uses OpenGL ES 2.0 as a cleaned up version of desktop OpenGL .",
"I m using Qt 5.2.1 and have compiled it for OpenGL using build-option -opengl desktop .",
"Which of these languages is better for opengl game with primary platform linux",
"im using opengl-es so ive had to do work arounds for things which arnt available in standard GL .",
"OpenGL is not a scene graph there are no models in OpenGL ."
]
}
|
{
"confidence": [
48.803367614746094,
48.65489959716797,
47.65613555908203,
47.614620208740234,
47.31024169921875,
46.254207611083984,
45.37056350708008,
44.9250373840332,
44.301300048828125,
44.295196533203125,
44.221134185791016,
44.17997360229492,
44.17331314086914,
43.92979431152344,
43.60719299316406,
43.50975799560547,
43.39363479614258,
43.347774505615234,
43.155799865722656,
43.076332092285156
],
"content": [
"Question : I have some OpenGL Questions . I know OGL is an early 90s SGI API. . Back in the 90s I developed a couple apps using OGL for the DEC Alpha platform but haven t used the API since . With SGI long gone it seems a bit different . My questions : .. . .. . 1 . Is OpenGL open-source now 2 . I notice a lot of different versions and what appears to be different APIs from different developers . is this true 3 . What is the preferred version flavor for CAD and Graphics What should I download I will be using WINAPI and VS6 VS2003 and VS 2010 etc.. . Comment : OpenGL s always been open-source - that s where the Open comes from : P The non-open thing it spun off of was SGI s IRIS GL . There should not be different APIs for each vendor maybe you are thinking of extensions .. . Answer : 1 . OpenGL is an open specification . Some of the implementations are open-source like Mesa3D . Usually implementations come with your graphics drivers . 2 . There are many standards like OpenGL OpenGL ES for mobile and soon glNext not named yet . 3 . Most modern implementations drivers support OpenGL 3.3 Core Profile and using older fixed-function pipeline glBegin glVertex glMatrix etc . is considered deprecated . Comment : OpenGL ES is used outside mobile-devices as well . For example Sony s Playstation 3 uses OpenGL ES 2.0 as a cleaned up version of desktop OpenGL .",
"Question : every introduction and sample that I can find seems to use GLUT or some other framework to initialize OpenGL . Is there a way of initializing OpenGL with just what is available in GL and GLU If not then what is GLUT doing that is not possible without it Comment : which is Windows only . Comment : Yup but it s still instructive . : - Thanks Comment : Emphasis on easy to understand . - but I can t read the code for the comments : Comment : Nobody mentioned EGL http : www.khronos.org egl It s a Khronos standard for interop between operating-system and APIs like OpenGL aimed to unify such things . IDK how wide it s supported today though . Comment : As a GUI complement tiny file dialogs offers several function-calls . It s a single C C++ cross-platform file to add to your project.It has no init and no main loop . .. . Answer : GL is an API and GLU is an utility library on top of GL . It s completely operating-system independent . OpenGL initialization and extension fetching are platform dependent operations . Therefore you can do about nothing with OpenGL alone . GLUT is fast insufficient and terribly poor library and about only it does is that it initializes the opengl context and provides some primitive mouse keyboard input modules to get you ongoing . Win32 provides tools to initialize opengl context as well . For linux you could check out GLX . Also if you want a system independent way of doing it then you could check out SDL . For different programming-languages there may be utilities that provide you a platform independent desktop API .",
"Question : I used to think that Tesla will not support OpenGL API but recently leanred that Tesla products also can be used on visualization via OpenGL . I have a workstation in which there are 2 Intel E5 CPUs and 1 Tesla C2050 . According to https : developer.nvidia.com opengl-driver Tesla C2050 should support at least OpenGL version 3 . Now I d like to run a render service program using OpenGL 3.3 on that workstation but without success . The following is what I tried . If I login through RDP remote desktop the supported OpenGL version is 1.1 due to the virtual graphics adapter . Here I used tscon commond to reconnect to the pysical console . As a result the RDP connection lost . When I reconnected I saw all the windows resized to 800 600 and the detected OpenGL support was still 1.1 . If I login with a monitor pluged to some kind of integrated graphics adapter the supported OpenGL version is still 1.1 maybe because the program was started within the screen pluged to the basic adapter . BUt the Tesla GPU does not have a grpahics output port . I wonder how should I config the host to enable the use of Tesla GPU for OpenGL based rendering . .. . Answer : I have solved this problem . First in fact the Tesla C2050 is dedicated video-card and has one DVI display port . What is more important is that the BIOS on motherboard was set to start up on integrated GPU . Changing this config to PCI-E card solves the problem that unable to access Tesla card . Next about graphics API support . The official driver on NVIDIA site is offering support for OpenGL 4.4 . And the Tesla card can be used to render via OpenGL just as the same as Quadro or Geforce card . There s no notable difference and no special configuration is necessary .",
"Question : I m developing a desktop OpenGL application and I want to make sure it ll be compatible to OpenGL ES so that it ll be easier to port it to mobile platforms later . What s the best way to make sure I m using only the OpenGL ES specifications in my software Comment : Similar question stackoverflow.com questions 2476929 opengles-on-a-desktop-pc http : stackoverflow.com questions 2476929 opengles-on-a-desktop-pc but this is not exactly what I m after . Comment : Are you targeting ES 1.1 or 2.0 Comment : I think 1.1 since 2.0 is still not that common . But I ll be glad to hear about both options . Comment : If you target OpenGL ES 2.0 and Desktop 3.0 you can also try OpenREng openreng.sourceforge.net . You just change the cmake opengl platform to mobile and related installed libraries are used . You can try PowerVR OpenGL ES 2.0 emulators which use OpenGL 2.1 underneath if I remember correctly .. . Answer : There is an OpenGL ES emulator that you can use . Here s a link http : opengles-book.com downloads.html",
"Question : The standard model has been that OpenGL is for professional apps CAD and Direct3D is for games . With the debacle of openGL 3.0 is openGl still the natural choice for technical 3D apps cad GIS Are there scenegraph libraries for Direct3D Of course Direct3D is windows only . Comment : This is crazy-subjective . Words and phrases like best and natural choice don t help . Having your question consist of multiple questions all subjective the year of the linux desktop also doesn t help . Consider rephrasing the question to be more specific . Comment : ok I will try ps . The linux desktop was a joke . Comment : The Tim Sweeney article link was great arstechnica.com articles paedia gpu-sweeney-interview.ars http : arstechnica.com articles paedia gpu-sweeney-interview.ars .. . Answer : To me speaking as a graphics programmer in a large CAD company there are currently three things that retain OpenGL of beeing dropped in favor of Direct3D 10 11 for existing CAD DCC applications : .. . .. . 1 . Legacy . Most of CAD softwares are more or less hardly tight to OpenGL concepts . Rewriting everything around D3D philosophy is not always manageable technicaly speaking and depending on the ability willingness of the company to throw resources at it . Secondly it could have negative impacts if something goes wrong functionnality speaking and or performance wise and company would just not take the risk of delaying a major release because of an API and architecture switch . 2 . Peoples . Peoples in those old-boy industries are fairly conservative . They prefer spending money time on dealing with IHVs regarding all OpenGL driver issues they could have or simply won t recommend using graphics from a specific IHV e.g . Intel or ATI . Plus I believe that the automotive aerospace industry customers like Boeing Airbus TMC BMW etc don t care that much of having Quadros only workstation . Hardware is still cheap in regard to software licence prices . 3 . Future trends . With future generation of processors like Llano Larrabee Fermi and products that will follow it s definitely worth to invest R D budgets on how to program and develop new languages apis frameworks for those future hardwares in term of graphics as well as non-graphics tasks . CAD industry has huge cycles and won t move if not for a truly disruptive technology . So D3D might just come a bit late for big CAD players except Autodesk of course which is a particular case . Comment : That was pretty much my thoughts the decider was scenegraphs for OpenGL - there is nothing much available for DX",
"Question : I m writing an implementation for OpenVG http : www.khronos.org openvg and OpenGL ES http : www.khronos.org opengles in Go http : golang.org both of which depend on the Khronos EGL API http : www.khronos.org egl supposedly to ease portability I guess . I m writing an implementation of OpenVG on top of OpenGL ES for fun and educational reasons - I haven t done a lot of rendering work and I d like to learn more about the open APIs and practice implementing well defined standards easier to see if I got the right results . As I understand it EGL provides a standard API for retrieving a drawing context or what ever it s rightly called instead of using one of the multiple OS provided APIs GLX WGL etc .. . .. . enter image description here http : i.stack.imgur.com fopop.jpg .. . .. . I have a hard time beleiving Khronos would go through such effort and leave the standard OpenGL out of the loop but the thing is I haven t found how or if OpenGL the real deal interfaces with EGL or if it s only OpenGL ES . If OpenGL ES can use the drawing context from EGL would standard OpenGL also work I m really new to all of this which is why I m excited but the real project I m doing is a Go widget toolkit that utilizes OpenVG for its drawing operations and uses hardware-acceleration wherever possible . If OpenVG OpenGL and OpenGL ES depend on EGL I think my question can be answered with yes or no . Just keep in mind that I dove into this subject head-first last night . Does OpenGL use or depend on EGL .. . .. . Off topic but there is no EGL tag . Should there be Comment : is your Go widget project abandoned Comment : Pretty much . I d describe the whole thing mostly as a mental masturbation . Comment : I m doing the same mental masturbation LOL I m writing a 2D accelerated graphics lib on OpenGL then ui kit lots of masturbation to come . What made you give up Comment : I can t recall the exact reason . I did take another look at renderers this christmas but I doubt I ll produce anything as I m pretty swamped at work .. . Answer : Does OpenGL use or depend on EGL No . You can run OpenGL without EGL . But is possible to have EGL implementation capable to create desktop OpenGL context . That s because EGL s eglBindAPI int api https : www.khronos.org registry egl sdk docs man html eglBindAPI.xhtml allows EGL OPENGL API EGL OPENGL ES API or EGL OPENVG API . But if you ask : .. . .. . Does OpenGL-ES use or depend on EGL The answer is yes but there are exceptions . Currently 2015 you have several implementations of OpenGL-ES that relay on EGL to create graphics context : Google ANGLE PowerVR ARM MALI Adreno AMD Mesa etc . But on recent releases of NVIDIA https : developer.nvidia.com opengl-driver and Intel drivers you can also request OpenGL-ES contexts directly where extensions WGL EXT create context es profile and WGL EXT create context es2 profile are available Windows . Same thing on Unix platforms where GLX EXT create context es profile and GLX EXT create context es2 profile extensions are available . The intend of EGL is to easy life of developer by creating a portable and standard way to initialize and get context of supported graphics API without worrying about platform specific issues as WGL GLX etc . That is a problem of EGL implementers not final programmer . Comment : I installed NVIDIA s latest driver version 364 on my Ubuntu 14.04 and I found there are libGL.so libGLESv2.so libEGL.so . Does that mean I can use EGL to create window context on my desktop and use it with OpenGL 4.5 on my Ubuntu desktop Comment : Bind to libEGL.so and call EGL functions to query support to OpenGL . see stackoverflow.com questions 23139886 http : stackoverflow.com questions 23139886 how-to-create-opengl-context-via-drm-linux . Steps : 1 get display with eglGetDisplay .. . 2 eglInitialize display .. . 3 eglChooseConfig .. . with attrib list containing pairs .. . EGL RENDERABLE TYPE EGL OPENGL BIT EGL CONFORMANT EGL OPENGL BIT .. . 4 eglCreateContext .. . Comment : BUT from EGL card it says EGL supports only OpenGL 1.x and 2.x . I didn t try it yet . Comment : Thanks for the info . One more question . I just don t understand why we need to used mesa driver which was mentioned in that post What is lacking in the NV drivers Comment : Revised comment If you already have a libEGL.so you don t need to worry with mesa . Just bind to your EGL and be happy .",
"Question : The standard model has been that OpenGL is for professional apps CAD and Direct3D is for games . With the debacle of openGL 3.0 is openGl still the natural choice for technical 3D apps cad GIS Are there scenegraph libraries for Direct3D Of course Direct3D is windows only . Comment : This is crazy-subjective . Words and phrases like best and natural choice don t help . Having your question consist of multiple questions all subjective the year of the linux desktop also doesn t help . Consider rephrasing the question to be more specific . Comment : ok I will try ps . The linux desktop was a joke . Comment : The Tim Sweeney article link was great arstechnica.com articles paedia gpu-sweeney-interview.ars http : arstechnica.com articles paedia gpu-sweeney-interview.ars .. . Answer : D3D makes you pay the Microsoft strategy tax . That is D3D serves two masters . One is giving you features and performance . The other is to ensure lock-in to other MS products and the Windows platform generally . This has some consequences for you : .. . .. . 1 . A D3D app won t run on anything but Windows including Xbox . Maybe you don t think that s important now . But if down the road you want to run on Mac Linux PS3 future consoles etc . you may be glad you chose the platform-independent choice . 2 . MS can make some arbitrary decisions . Will the next version of D3D only run on an OS that requires new hardware is expensive and lots of people don t want to upgrade to Will they make some other future decision you don t agree with 3 . Historically OpenGL has led D3D in quick exposure of new HW features . This is because there s a mechanism in the standard for vendors to add their own extensions and for those extensions to eventually be folded into the main spec . D3D is whatever MS wants it to be with input from vendors to be sure but MS gets veto power . You could easily be in a situation like with Vista where MS decided not to expose new HW features to the old DX and only make the new DX available on Vista . This was quite a headache for game developers . Now then this is the flavor of reasons why a professional app CAD animation scientific visualization GIS etc . would favor OGL -- apps like this want to be stable for many years need ongoing maintenance and improvement and want to run on many platforms . This is in contrast to games which quite frequently are only on one platform will be released but generally not maintained there likely won t be a 2.0 an update for another OS three years hence don t need to support older HW etc . . Games want maximum performance and only need to work for a short time window and on a fixed number of platforms . If they need to target Windows anyway and D3D is a little faster that may be the right choice since the negative D3D consequences won t hurt them like it would for a CAD app say . Comment : Actually OpenGL is not that cross-platform as people tend to believe . PS3 or any other current console No . Future consoles Most likely no . Phones handhelds Not really OpenGL ES is there . That leaves PC-like platforms only . Comment : I thought D3D would only work on Windows platforms Comment : Actually one article is.gd nbHm http : is.gd nbHm says : The 3D computer graphics API software used in the Playstation 3 is LibGCM and PSGL based on OpenGL ES I believe the new Android platform uses OpenGL ES as well so if anything surely D3D is less portable Comment : You can run D3D on Linux and MacOS X with Wine or derivatives such as Cedega . Comment : Counter example : 3ds max is a professional CAD app such as those you mention that runs exclusively on Windows since its inception and uses D3D almost exclusively . The OGL viewport renderer hasn t been touched for a long time .",
"Question : 1 . Windows has only provided the GL v1.1 How to download the latest version of OpenGL binaries +hearders to begin coding in Windows and where exactly to find them 2 . Which version of the OpenGL is the latest version which is fully supported by all three MacOS Linux and Windows platforms .. . Answer : 1 . in general OpenGL wiki https : www.opengl.org wiki Getting Started has all the links to download the latest OpenGL for your platform OS and graphics card . Specifically for Windows if you re using Visual Studio NuGet package manager has a good pre-packaged OpenGL distribution called nupengl.core . 2 . as Arctic http : stackoverflow.com users 2708926 arctic said 4.5 is the latest standard . Whether it is supported by your build depends on the graphics card not on the OS .",
"Question : I plan on writing a Java 3D game that will work both on PC and Android . Unfortunately it looks like there is no common OpenGL API for both platforms . Do the APIs differ significantly Is there a way I could use the same 3D code in both versions Is it a good idea Comment : Nice question - portability on mobile platforms is still not a reality . Comment : Try using Qt . It s cross-platform and works in Windows Mac OSX Linux iOS Android BlackBerry Windows RT and soon Windows Phone . It provides the minimal set of OpenGL functions compatible across all platforms but you can use OpenGL functions specific to each platform too e.g . full OpenGL on desktops . .. . Answer : As JOGL-ES was merged into JOGL 2.x several years ago you can now use JOGL both in desktop and mobile environments Android .",
"Question : I m developing a desktop OpenGL application and I want to make sure it ll be compatible to OpenGL ES so that it ll be easier to port it to mobile platforms later . What s the best way to make sure I m using only the OpenGL ES specifications in my software Comment : Similar question stackoverflow.com questions 2476929 opengles-on-a-desktop-pc http : stackoverflow.com questions 2476929 opengles-on-a-desktop-pc but this is not exactly what I m after . Comment : Are you targeting ES 1.1 or 2.0 Comment : I think 1.1 since 2.0 is still not that common . But I ll be glad to hear about both options . Comment : If you target OpenGL ES 2.0 and Desktop 3.0 you can also try OpenREng openreng.sourceforge.net . You just change the cmake opengl platform to mobile and related installed libraries are used . You can try PowerVR OpenGL ES 2.0 emulators which use OpenGL 2.1 underneath if I remember correctly .. . Answer : If you occasionally build run against dgles http : stackoverflow.com questions 2476929 opengles-on-a-desktop-pc 2478718 2478718 you should be set . Other than that just pop open the ES 1.1 spec from time to time and double-check whatever you re using is in it . Comment : If some software could pop open the ES 1.1 specs and double check whatever I m using I m sure it ll do a much better job than I would - . But thanks",
"Question : every introduction and sample that I can find seems to use GLUT or some other framework to initialize OpenGL . Is there a way of initializing OpenGL with just what is available in GL and GLU If not then what is GLUT doing that is not possible without it Comment : which is Windows only . Comment : Yup but it s still instructive . : - Thanks Comment : Emphasis on easy to understand . - but I can t read the code for the comments : Comment : Nobody mentioned EGL http : www.khronos.org egl It s a Khronos standard for interop between operating-system and APIs like OpenGL aimed to unify such things . IDK how wide it s supported today though . Comment : As a GUI complement tiny file dialogs offers several function-calls . It s a single C C++ cross-platform file to add to your project.It has no init and no main loop . .. . Answer : What you re doing is initializing a window with an OpenGL context . This requires some calls to the operating-system . It is not possible to initialize OpenGL with just gl.h and glu.h . GLUT http : www.xmission.com nate glut.html or SDL http : www.libsdl.org SMFL http : www.sfml-dev.org etc does that work for you in a nice platform independent way . You can do the initialization with native calls as well .",
"Question : I am developing an android application in opengl ES2.0.In this Application I used to draw multiple lines and circles by touch-event in GL surfaceView . As opengl depends on GPU Currently it works fine in Google Nexus 7 ULP GeForce . In Samsung Galaxy Note 2 MALI 400MP I m trying to draw more than one line but it clears the previous line and draw current line as new . In Sony Xperia Neo V Adreno 205 I m trying to draw a new line it crashes the surface as shown in below image . enter image description here http : i.stack.imgur.com XY7dy.jpg .. . .. . Is it possible to make it work on all devices or do I need to write code for Individual GPU .. . .. . Source code .. . .. . MainActivity.java .. . .. . MyRenderer.java .. . .. . Line.java Comment : How about you show us some of your drawing code The idea of OpenGL -ES is to be device independent so you either found several driver bugs or you re doing something very wrong . Comment : You can see my code here http : tuxbalaji.wordpress.com 2013 06 19 draw-a-line-using-opengles2-0-by-touch-event-in-android Comment : How about putting the relevant code in the question so it will still be around if the external link dies . Comment : How about you show us some of your drawing code The idea of OpenGL -ES is to be device independent so you either found several driver bugs or you re doing something very wrong . -- @datenwolf This is not correct . cf my answer .. . Answer : Crossposted from my answer to a similar question Why my opengl output differs for various devices http : stackoverflow.com questions 17187032 why-my-opengl-output-differs-for-various-devices 17651847 noredirect 1 comment25741540 17651847 : .. . .. . Should we take into account of GPU while Coding No way The OpenGL API is a layer between your application and the hardware . This is largely correct for desktop graphics as all GPUs are immediate renderers however this is NOT the case in mobile graphics . The Mali GPUs use tile-based immediate-mode rendering . For this type of rendering the framebuffer is divided into tiles of size 16 by 16 pixels . The Polygon List Builder PLB organizes input data from the application into polygon lists . There is a polygon list for each tile . When a primitive covers part of a tile an entry called a polygon list command is added to the polygon list for the tile . The pixel processor takes the polygon list for one tile and computes values for all pixels in that tile before starting work on the next tile . Because this tile-based approach uses a fast on-chip tile buffer the GPU only writes the tile buffer contents to the framebuffer in main memory at the end of each tile . Non-tiled-based immediate-mode renderers generally require many more framebuffer accesses . The tile-based method therefore consumes less memory bandwidth and supports operations such as depth testing blending and anti-aliasing efficiently . Another difference is the treatment of rendered buffers . Immediate renderers will save the content of your buffer effectively allowing you to only draw differences in the rendered scene on top of what previously existed . This IS available in Mali however is not enabled by default as it can cause undesired effects if used incorrectly . There is a Mali GLES2 SDK example on how to use EGL Preserve Correctly available in the GLES2 SDK here .. . .. . The reason the Geforce ULP based nexus-7 works as intended is that as an immediate based renderer it defaults to preserving the buffers whereas Mali does not . From the Khronos EGL specification : .. . .. . EGL SWAP BEHAVIOR .. . .. . Specifies the effect on the color buffer of posting a surface with eglSwapBuffers . A value of EGL BUFFER PRESERVED indicates that color buffer contents are unaffected while EGL BUFFER DESTROYED indicates that color buffer contents may be destroyed or changed by the operation . .. . The initial value of EGL SWAP BEHAVIOR is chosen by the implementation . .. . .. . The default-value for EGL SWAP BEHAVIOUR on the Mali platform is EGL BUFFER DESTROYED . This is due to the performance hit associated with having to fetch the previous buffer from memory before rendering the new frame and storing it at the end as well as the consumption of bandwidth which is also incredibly bad for battery life on mobile-devices . I am unable to comment with certainty as to the default behavior of the Tegra SoCs however it is apparent to me that their default is EGL BUFFER PRESERVED . To clarify Mali s position with regards to the Khronos GLES specifications - Mali is fully compliant .",
"Question : I m writing an implementation for OpenVG http : www.khronos.org openvg and OpenGL ES http : www.khronos.org opengles in Go http : golang.org both of which depend on the Khronos EGL API http : www.khronos.org egl supposedly to ease portability I guess . I m writing an implementation of OpenVG on top of OpenGL ES for fun and educational reasons - I haven t done a lot of rendering work and I d like to learn more about the open APIs and practice implementing well defined standards easier to see if I got the right results . As I understand it EGL provides a standard API for retrieving a drawing context or what ever it s rightly called instead of using one of the multiple OS provided APIs GLX WGL etc .. . .. . enter image description here http : i.stack.imgur.com fopop.jpg .. . .. . I have a hard time beleiving Khronos would go through such effort and leave the standard OpenGL out of the loop but the thing is I haven t found how or if OpenGL the real deal interfaces with EGL or if it s only OpenGL ES . If OpenGL ES can use the drawing context from EGL would standard OpenGL also work I m really new to all of this which is why I m excited but the real project I m doing is a Go widget toolkit that utilizes OpenVG for its drawing operations and uses hardware-acceleration wherever possible . If OpenVG OpenGL and OpenGL ES depend on EGL I think my question can be answered with yes or no . Just keep in mind that I dove into this subject head-first last night . Does OpenGL use or depend on EGL .. . .. . Off topic but there is no EGL tag . Should there be Comment : is your Go widget project abandoned Comment : Pretty much . I d describe the whole thing mostly as a mental masturbation . Comment : I m doing the same mental masturbation LOL I m writing a 2D accelerated graphics lib on OpenGL then ui kit lots of masturbation to come . What made you give up Comment : I can t recall the exact reason . I did take another look at renderers this christmas but I doubt I ll produce anything as I m pretty swamped at work .. . Answer : There is no relationship between OpenGL and EGL . EGL generally does not run on desktops and there is no ability to create a desktop OpenGL context through EGL . OpenGL contexts are instead created and managed by platform-specific APIs . On Windows the WGL API is used . On X11-based platforms GLX is used . And so forth . There was some noise last year from Khronos about creating a version of EGL that could work on the desktop and make OpenGL contexts but thus far nothing came of it . Comment : Thats a shame . Will have to work around that but thanks for the reply . Comment : AMD have included the EGL library in their OpenGL ES 2.0 SDK developer.amd.com tools graphics-development amd-opengl-es-sdk http : developer.amd.com tools graphics-development amd-opengl-es-sdk It works on Windows with AMD Radeon ATI cards Comment : I am impressded by your reply thank you Anyway I think my comment was meant to stimmulate rethinking about the relationship of EGL and OpenGL which is the original question . I was and still am under the impression that there has been some development and today aprox . 3 years later there are lined out lots of cases where EGL is used on desktops for instance . Still being thankful I cannot understand why you bring up Mesa Wayland and -most confusing- Ubuntu-MIR . Comment : @humanityANDpeace : I cannot understand why you bring up Mesa Wayland and -most confusing- Ubuntu-MIR . Because those are pretty much the only providers of EGL for desktop OpenGL . Unless you know of some others I and Wikipedia am not aware of . Comment : @NicolBolas EGL on X11 has supported creation of desktop OpenGL contexts at least since 2011 and maybe before in Mesa .",
"Question : My question is - is it possible to compile a C++ library that uses some desktop features on mobile device - in this particular case the Irrlicht Engine I know there is a port out there that uses OGLES drivers but it also combines using the NDK . I would like to know if there is a possibility to build that library with such a tool like CCTools despite the fact that mobile-devices use OpenGL ES - maybe some kind of equivalent libraries that fit both mobile and desktop environments There may be some incompatibilities I know . The system of input and output doesn t matter at the moment . And of course - I haven t found the question that fits my expectations . .. . Answer : I wrote an article about porting desktop OpenGL apps to Android that might help : .. . .. . http : software.intel.com en-us articles porting-opengl-games-to-android-on-intel-atom-processors-part-1 .. . .. . I don t see the advantage of using CCTools rather than the NDK . I think the differences between OpenGL and OpenGL ES would be the biggest problem . Comment : So it is an issue with low-level library function-calls it would be difficult to use with complete engine . It seems that the only solution is using Java C++ mix with NDK and Irrlicht Port . Anyway thanks you made it clear to me .",
"Question : I plan on writing a Java 3D game that will work both on PC and Android . Unfortunately it looks like there is no common OpenGL API for both platforms . Do the APIs differ significantly Is there a way I could use the same 3D code in both versions Is it a good idea Comment : Nice question - portability on mobile platforms is still not a reality . Comment : Try using Qt . It s cross-platform and works in Windows Mac OSX Linux iOS Android BlackBerry Windows RT and soon Windows Phone . It provides the minimal set of OpenGL functions compatible across all platforms but you can use OpenGL functions specific to each platform too e.g . full OpenGL on desktops . .. . Answer : Android supports OpenGL ES 1.0 which overlaps with OpenGL 1.3 so this should be possible but it is not as simple a just replacing the jar files at runtime . It is a good idea to try to reuse as much as possible of you application across both platforms . Anyway it is generally good practice to isolate the rest of you code from external dependencies such OpenGL even if you don t specifically need OpenGL ES support . You never know what API platform you may want to port your application to in the future . There are 2 options that are available . The first is to hide the OpenGL implementation behind an interface that the rest of your application uses and then provide separate Jogl and Androide implementations . Depending on which platform you are running on you can then choose to instanciate the correct implemenation at runtime using the factory-pattern . As OpenGL ES and OpenGL are very similar the effort required to maintain this should not be too high providing you stick to the common functions . The other option is to try and use Jogl2 which has support for profiles . These appear to provide exactly what you need but Jogl2 is still in beta . The bottom this page talks a little about profiles : http : kenai.com projects jogl pages FAQ .. . .. . Profiles allow Java applications to be written in a way which allows compatibility with multiple OpenGL versions at the same time . Since OpenGL ES GL for embedded systems has overlapping functionality with OpenGL itself it opened the opportunity to add even Profiles which bridge desktop and embedded implementations . You might want to read this http : michael-bien.com mbien entry jogl 2 opengl profiles explained http : michael-bien.com mbien entry jogl 5F2 5Fopengl 5Fprofiles 5Fexplained for more information about profiles . Comment : Very nicely researched answer . There is a nice OS JOGL application called worldwind which I work on and I would pay to see it run on Android .",
"Question : So I realize that there are various posts that cover pairs of these but I am having trouble understanding how they all fit together . Explain what each of the following are used for and how they relate to each other : .. . glu .. . glew .. . glut .. . sdl .. . qt .. . openGL .. . webGL .. . Comment : +1 cause you r question produced such a good answer below : - .. . Answer : OpenGL http : en.wikipedia.org wiki OpenGL .. . .. . OpenGL Open Graphics Library is cross-platform API for rendering 2D and 3D graphics . The API mainly tries to focus on using the GPU to achieve hardware-accelerated http : en.wikipedia.org wiki Hardware acceleration rendering . OpenGL-ES http : en.wikipedia.org wiki OpenGL ES .. . .. . OpenGL-ES OpenGL for Embedded Systems is a subset of OpenGL designed for use on embedded systems like smartphones tablets game consoles etc . WebGL http : en.wikipedia.org wiki WebGL .. . .. . WebGL Web Graphics Library is a JavaScript API for rendering 2D and 3D graphics . WebGL also uses the GPU as much as it is possible through the browser . WebGL is based on OpenGL-ES http : en.wikipedia.org wiki OpenGL ES . Take in mind that they might have the same functions though WebGL isn t OpenGL or OpenGL-ES . WebGL is only based on OpenGL-ES . GLU http : en.wikipedia.org wiki OpenGL Utility Library .. . .. . GLU OpenGL Utility Library is a graphics library for OpenGL consisting of utility functions which can be used with OpenGL . The functions mainly focus on primitive rendering and mapping between screen- and world-coordinates etc . GLEW http : en.wikipedia.org wiki OpenGL Extension Wrangler Library .. . .. . GLEW OpenGL Extension Wrangler Library is a cross-platform library helps in querying and loading OpenGL Extensions . GLUT http : en.wikipedia.org wiki OpenGL Utility Toolkit .. . .. . GLUT OpenGL Utility Toolkit is a library of utilities for OpenGL which primarily focuses on window definition window control and monitoring of keyboard and mouse input . SDL http : en.wikipedia.org wiki Simple DirectMedia Layer .. . .. . SDL Simple DirectMedia Layer is a cross-platform development library designed to provide low-level access to audio keyboard mouse joystick and graphics hardware via OpenGL . SDL can also be used for other graphics API s such as DirectX etc . QT http : en.wikipedia.org wiki Qt 28framework 29 .. . .. . QT is a cross-platform application development framework widely used for the development of GUI programs in which case it is known as a widget toolkit and also used for developing non-GUI programs such as console tools and servers . Conclusion .. . .. . OpenGL is an API for rendering 2D and 3D graphics . OpenGL-ES is a subset of OpenGL targeting embedded systems . WebGL is a JavaScript API for rendering 2D and 3D graphics based on OpenGL-ES . GLU is a utility library for OpenGL which mainly contains mapping functions . GLEW is a utility library for OpenGL which can handle loading of OpenGL Extensions . GLUT SDL is a library for handling various things like window keyboard and mouse control as well as listening . QT is a framework mainly for creating GUI . Thereby GLU GLEW GLUT is simply utility libraries for OpenGL which requires OpenGL if not they aren t for much good . SDL doesn t require OpenGL and isn t directly an OpenGL utility library mainly but it can be used with OpenGL but also with other things as well . Comment : Upvoted for mostly correct answer but SDL doesn t really require GL . It may use many different graphics backends . Comment : @keltar thanks for the response I fixed that part of my answer . Comment : You should mention that Qt has functions for using OpenGl . As of Qt 5.1 Qt Quick 2 only uses OpenGl and so now QOpenGL classes are a core part of Qt in QtGui module . Also QtCanvas implements WebGL for non web-applications and Qt3D is a new module for games and other applications that involve pairing 3D content with other functionality .",
"Question : Is there anyone who can explain how hardware cursor works precisely How does it relate to the graphics I m drawing on the screen I m using OpenGL to draw how does hardware cursor relate to OpenGL graphics EDIT : For those who may be interested in this in the future I just implemented what is needed to show the cursor with the hardware . The implementation was in the kernel and to use it simple ioctl s were sufficient . Works perfectly . Comment : hi Luca I m interested to see your code with the ioctls for hardware cursor without X11 Can you link your code or a page manpage describing how to do it Thanks . Comment : Proprietary code sorry . I could only add information about how I implemented it . Comment : I would appreciate to see any such information i.e please answer your own question with reference to Linux and I will vote for you : or send me a message [email protected] Comment : I already added the relevant information in the question years ago . I used the system calls to move the pointer on the screen and set data related to the image to display as a cursor . I implemented this in the cursor driver of my environment which at the time was Qt for Embedded Linux . I don t think there is much more to say it was very simple . .. . Answer : Hardware Cursor means that the GPU provides to draw a small overlay picture over the screen framebuffer which position can be changed by two registers or so on the GPU . So moving around the pointer doesn t require to redraw the portions of the framebuffer that were previously obstructed . Relation to OpenGL : None Comment : +1 : for zero relation to OpenGL . Comment : No relation to OpenGL means that it is not important what is writing to the framebuffer I can use OpenGL X11 or whatever and the pointer would be placed the same way at the end of the chain . Is this right Thanks for your answer Comment : @Luca : Indeed . OpenGL is just one way to draw to the screen framebuffer . But either way the hardware cursor works independent from this . Comment : Would you say this is the best way to provide cursor to devices that needs high performance graphics Or maybe simply rendering a cursor with accelerated OpenGL implementation is better Thanks Comment : @Luca : Clearly a hardware accelerated cursor is the best solution . HW accelerated or not changing one bit in a OpenGL scene requires to rerender the whole thing or work with cache textures . HW cursors just work and they are easy to use Just use the graphics system s standard cursor image setting functions SetCursor in Windows XCursor in X11 MacOS X I don t know but the manual knows it with properly installed graphics drivers you ll get HW accelerated cursors automatically .",
"Question : I m currently trying to get OpenVG up and running on my desktop . The problem comes here : I am will be developing an application for a Windows CE device with .NET compact-framework which has hardware-accelerated OpenGL ES 2.0 and OpenVG 1.0.1 based on TI OMAP35x if you re interested . The application will definitely use OpenVG for drawing and likely OpenGL for some effects if OpenVG doesn t offer them i.e . blur . Now I d like to develop on my desktop without the emulator see this question http : stackoverflow.com questions 653577 debug-net-compact-framework-app-locally-without-emulator-or-device . So I thought I just import OpenVG with P Invoke which was quite easy since the OpenVG people made their constants into real enums and though a procedural C API it translated very well into an object-oriented form with a Graphics class for drawing and Path Paint Stroke and Image objects . I also managed to get going with differently named DLLs and entry points http : stackoverflow.com questions 654089 dllimport-with-different-entry-points-different-dlls-for-the-same-import-in-diff . Oh and I imported EGL 1.3 also quite easy to translate to an object-oriented API . Until this point it sounded quite good . I thought I d just use the OpenVG reference implementation from Khronos but it is slow . Really slow . You know like clearing the surface taking literally a second So I thought fine OpenVG is a standard I ll just take one of the other implementations . Most of them are based on OpenGL which is what I want . Or isn t it No it s not . Creating an OpenGL ES 2.0 surface with EGL 1.3 supplied with the PowerVR Windows Emulation SDK for OpenGL ES 2.0 is not compatible with any OpenVG implementation I tried . Some of them require traditional OpenGL AmanithVG GLE the EGL version supplied by PowerVR doesn t support OpenVG . Most implementations don t even have EGL and use some bizarre functions to initialize the context - all of them assuming that an OpenGL context has already been created . OpenGL not OpenGL ES . Sigh . The only one I could get to work was AmanithVG SRE which is very fast for a software implementation and does not rely on OpenGL or EGL . It works but it is still far too slow for real-time animations . I can t believe that these things feel so wrong . I m really tempted to just use WindowsMobile.DirectX.Direct3D for which PowerVR supplies an emulation layer for Desktop Windows in the hope that the final Board Support Package will supply Direct3D as an OpenGL ES wrapper like it seems to be on many devices . So the question finally : .. . .. . Is there any OpenVG implementation for Windows Desktop systems that works with OpenGL ES 2.0 Bonus points if it works smoothly with PowerVR s OpenGL ES 2.0 emulation and the supplied EGL 1.3 . Or should I just try to use a traditional OpenGL 2.0 implementation on the Desktop But they re typically not supplying EGL as well . I don t want to have two initialization layers EGL and WGL . Or should I Note : this is not a .NET question because the problem is the very same without .NET . .. . Answer : I found a closed source OpenGL ES emulator for OpenGLES 2.0 and other versions from this site while searching for a solution to another problem I had : .. . .. . http : www.malideveloper.com developer-resources tools opengl-es-20-emulator.php .. . .. . Its closed source but it appears you can use it for your development purposes . Other then that you could write your own abstraction-layer that can switch between OpenGL and OpenGL ES -- I couldn t find one available from my searches . If you find one let me know because that is what I am trying to do .",
"Question : The standard model has been that OpenGL is for professional apps CAD and Direct3D is for games . With the debacle of openGL 3.0 is openGl still the natural choice for technical 3D apps cad GIS Are there scenegraph libraries for Direct3D Of course Direct3D is windows only . Comment : This is crazy-subjective . Words and phrases like best and natural choice don t help . Having your question consist of multiple questions all subjective the year of the linux desktop also doesn t help . Consider rephrasing the question to be more specific . Comment : ok I will try ps . The linux desktop was a joke . Comment : The Tim Sweeney article link was great arstechnica.com articles paedia gpu-sweeney-interview.ars http : arstechnica.com articles paedia gpu-sweeney-interview.ars .. . Answer : Direct3D is only available on Windows and XBox . If you plan on targeting Unix or Mac in addition to Windows OpenGL is a good choice . Comment : Or equally importantly if you eventually decide to target Unix and Mac you should choose OpenGL to minimize conversions needed to support them . Comment : @Guvante : Sorry but no . Minimizing conversions is not the point at all in this business . It s all about reliability of graphics drivers time you spend on dealing with their issues .",
"Question : I am working on a gaming framework of sorts and am a newcomer to OpenGL . Most books seem to not give a terribly clear answer to this question and I want to develop on my desktop using OpenGL but execute the code in an OpenGL ES 2.0 environment . My question is twofold then : .. . .. . 1 . If I target my framework for OpenGL on the desktop will it just run without modification in an OpenGL ES 2.0 environment 2 . If not then is there a good emulator out there PC or Mac is there a script that I can run that will convert my OpenGL code into OpenGL ES code or flag things that won t work .. . Answer : It s been about three years since I was last doing any ES work so I may be out of date or simply remembering some stuff incorrectly . 1 . No targeting OpenGL for desktop does not equal targeting OpenGL ES because ES is a subset . ES does not implement immediate mode functions glBegin glEnd glVertex .. . Vertex arrays are the main way of sending stuff into the pipeline . Additionally it depends on what profile you are targetting : at least in the Lite profile ES does not need to implement floating-point functions . Instead you get fixed-point functions think 32-bit integers where first 16 bits mean digits before decimal point and the following 16 bits mean digits after the decimal point . In other words even simple code might be unportable if it uses floats you d have to replace calls to gl f functions with calls to gl x functions . See how you might solve this problem in Trolltech s example http : doc.trolltech.com 4.4 opengl-hellogl-es.html specifically the qtwidget.cpp file it s Qt example but still.. . . You ll see they make this call : .. . .. . q glClearColor f2vt 0.1f f2vt 0.1f f2vt 0.2f f2vt 1.0f .. . .. . This is meant to replace call to glClearColorf . Additionally they use macro f2vt - meaning float to vertex type - which automagically converts the argument from float to the correct data type . 2 . While I was developing some small demos three years ago for a company I ve had success working with PowerVR s SDK http : www.imgtec.com PowerVR insider sdkdownloads . It s for Visual C++ under Windows I haven t tried it under Linux no need since I was working on company PC . .. . .. . A small update to reflect my recent experiences with ES . June 7th 2011 .. . .. . Today s platforms probably don t use the Lite profile so you probably don t have to worry about fixed-point decimals .. . When porting your desktop code for mobile e.g . iOS quite probably you ll have to do primarily these and not much else : .. . replace glBegin glEnd with vertex arrays .. . replace some calls to functions such as glClearColor with calls such as glClearColorf .. . rewrite your windowing and input system .. . if targeting OpenGL ES 2.0 to get shader functionality you ll now have to completely replace fixed-function pipeline s built-in behavior with shaders - at least the basic ones that reimplement fixed-function pipeline .. . Really important : unless your mobile system is not memory-constrained you really want to look into using texture compression for your graphics chip for example on iOS devices you ll be uploading PVRTC-compressed data to the chip Comment : 2 imgtec.com PowerVR insider sdkdownloads http : www.imgtec.com PowerVR insider sdkdownloads which archive for linux platform I am sure we can emulate glBegin on top of GLES implementation Comment : @rzr : Emulating glBegin is certainly possible but might be a bad idea . You may instead want to restructure the code . On that site you ll want to download PC Emulation archive for either OpenGL ES 1.1 or OpenGL ES 2.0 . Comment : the goal is to ensure a source compatibility first dont care about performance just want to build legacy apps .. . -- rzr.online.fr q opengl http : rzr.online.fr q opengl"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
api
|
UNK_RELATION
|
mysqli@php@56
|
mysqli -- the mysqli php-extension mysql improved is a @placeholder database driver included since php 5 .
|
{
"confidence": [
55.20806884765625,
53.56629180908203,
50.65116500854492,
47.10295867919922,
45.94582748413086,
45.63080978393555,
45.363677978515625,
43.54229736328125,
43.391075134277344,
43.382896423339844,
43.13630294799805,
42.1589469909668,
42.05864334106445,
42.04846954345703,
42.0252571105957,
41.91555404663086,
41.32426452636719,
41.23019027709961,
41.16401672363281,
41.147335052490234,
41.04813766479492,
40.97752380371094,
40.75728225708008,
40.697349548339844,
40.697349548339844,
40.20406723022461,
39.868896484375,
39.868896484375,
39.375614166259766,
39.17095947265625,
39.01068115234375,
39.01068115234375,
39.01068115234375,
39.01068115234375,
39.01068115234375,
39.01068115234375,
39.01068115234375,
38.96003341674805,
38.90254592895508,
38.90254592895508,
38.798946380615234,
38.71944046020508,
38.6558723449707,
38.595985412597656,
38.44084930419922,
38.42662048339844,
38.27134704589844,
38.18222427368164,
38.18222427368164,
38.18222427368164,
38.08729934692383,
37.94302749633789,
37.85447692871094,
37.85447692871094,
37.713356018066406,
37.287071228027344,
37.189300537109375,
36.97401809692383,
36.88490295410156,
36.88490295410156,
36.88490295410156,
36.76017761230469,
36.76017761230469,
36.56332015991211,
36.3388557434082,
36.31758117675781,
36.31758117675781,
36.20991516113281,
36.00987243652344,
36.00987243652344,
35.46569061279297,
35.3814582824707,
35.08576202392578,
35.07744216918945,
34.94819259643555,
34.91242980957031,
34.91242980957031,
34.87677001953125,
34.87541580200195,
34.765647888183594,
34.51133346557617,
34.33954620361328,
34.33954620361328,
34.33954620361328,
34.33954620361328,
34.33954620361328,
34.33954620361328,
34.33954620361328,
34.22907638549805,
34.22645568847656,
34.22645568847656,
34.12380599975586,
34.11973571777344,
34.11973571777344,
34.11973571777344
],
"content": [
"MySQL and MySQLi are two different Methods .. . .. . Waring is .. . .. . But your connecting database with mysqli .. . .. . Waring in php.net MySQL extension was deprecated in PHP 5.5.0 and it was removed in PHP 7.0.0 .",
"2 Mysqli PHP extension missing",
"Both environments have PHP and mysql version 5+ and include PHP extension : mysqli .",
"mysqli MySQLi support for Kohana .. . .. . The MySQLi driver I m using is this https : github.com Azuka Kohana-Database-MySQLi links to github .",
"What is the difference between MySQL MySQLi http : en.wikipedia.org wiki MySQLi and PDO https : en.wikipedia.org wiki PHP Development and community",
"http : is.php.net manual en mysqli.installation.php .. . .. . To ensure that the mysqli extension for PHP is enabled you will need to configure the PHP source code to use mysqli .",
"The fact is that mysqli completely replace the early PHP 4 implementation of mysql .",
"Is this a bug in mysql or in php mysqli - or what am I doin wrong",
"Does anyone know how on Ubuntu 8.04 with PHP 5 and MySQL 5.0 to enable install the mysqli package extensions",
"I need mysql and mysqli connections to database .",
"It seems like the PHP command does not include the mysqli extension and the PHP-5.6 command does not include the pthreads extension .",
"I am looking for mysqli and php not for hack .",
"Note that is mysqli not only mysql .",
"The one using MySQLi as the driver .",
"Simply we can say MySQL Improved Extension offering various benefits.The mysqli extension allows you to access the functionality provided by MySQL 4.1 and above .",
"The MySQLi extension offers no such convenience .",
"Sorry I never use mysqli as mysql driver two years .",
"You are conflicting MySQL and MySQLi .",
"MySQLi .. . 3 . mysql .. . .. . Also my feeling the mysql API would probably being deleted in future releases of PHP .",
"MySQLi http : php.net manual en book.mysqli.php is the improved extension for working with MySQL databases .",
"Its deprecated in PHP 5.5.0 and it was removed in PHP 7.0.0 .. . .. . .. . .. . Setting up MySQLi",
"mysqli driver does not implement this functionality .",
"I m using PHP MySQLi Database Class https : github.com ajillion PHP-MySQLi-Database-Class and on my local computer everything works without any problem .",
"You might have to install php with the mysqli option : apt-get install php5-mysqli",
"here is mysqli code : .. . .. . when i click an update mysqli message is : .. . .. . and this is my sample php codes :",
"Short Version of converting mysql to mysqli",
"I ve read the online php manual but I m still not sure of the way these two functions work : mysqli : : commit mysqli : : rollback .",
"In fact I was browsing for php mysqli callback function when I found mysqli : : set local infile handler reference .",
"I tried mysql mysqli and pdo .",
"I ve google it and some said it s mysql bug some said you should change your mysqli driver and ... . .. . .. . Situation : .. . .. . Using mysqli driver Client API library version 5.0.51a PHP Version 5.2.4-2ubuntu5.6 Using Zend 1.9 RC 1 Mysqli adapter .",
"However those links are old and not enirely in context of mysqli PHP interface .",
"http : www.develobert.info 2009 09 php-mysqli-bindresult-empty-longtext.html",
"the PHP manual http : php.net mysqli has everything you ll need to know",
"Am creating a Registration system with user type using PHP and Mysqli procedural .",
"Persistent connections for mysqli were introduced in PHP 5.3 so they are not that old .",
"I have a rather odd issue with the PHP bind param function for MySQLi .",
"I am using bind parameter mysqli function to execute the queries in php .",
"I m running MySQL server version 5.0.77 on Linux Rocks Cluster Distro and I m trying to connect to the same database with both MySQL and MySQLi PHP functions .",
"I m having a MySQL MySQLi PHP Error with my link shortener the error is : .. . .. . here is the problematic line .",
"mysqli is provided by php-mysql-5.3.3-40.el6 6.x86 64 .. . .. . You may need to try the following",
"my.cnf relates only to the MySQL server so would usually have no influence on a PHP client and mysqli only exists within PHP .",
"Though we should use MySQLi or PDO MYSQL extension for upgraded version of PHP PHP 5.5.0 and later but for older versions mysql-real-escape-string will do the trick .",
"Use either PDO or MySQLi .. . .. . There are better more robust and well built alternatives PDO - PHP Database Object http : php.net pdo which offers a complete OOP approach to database interaction and MySQLi http : php.net mysqli which is a MySQL specific improvement .",
"If that is all you have changed you may not have the mysqli driver installed or enabled within your PHP configuration .",
"However the mysqli still throws warnings for mysqli : : init and mysqli : : stmt init .",
"It is not recognised by the mysqli driver hence there is nothing in the documentation .",
"you should download a converter for this purpose.. . see this and download.. . mysql to mysqli http : wikis.oracle.com display mysql Converting+to+MySQLi",
"I am new to PHP and MySQLi and hope someone can help me with this .",
"Check PHP version and - especially - if mysqli on the host is mysqlnd-based .",
"I believe starting with php-5.3 mysqli is enabled by default .",
"PHP mysqli functions The DirectAdmin logs show : out-of-memory the php error is : packets out of order .. . .. . I m using PHP 7.0 and MySQL 5.6",
"I found a nice mysqli class it can handle dynamic parameters and easy to use .. . .. . https : github.com ajillion PHP-MySQLi-Database-Class .. . .. . You could refer the source code how it dynamic build the query .. . .. . https : github.com ajillion PHP-MySQLi-Database-Class blob master MysqliDb.php",
"argument is mysqli object not mysqli result .",
"If you re using mysqli then use mysqli .",
"No you can t use mysql and mysqli together .",
"Adjust your code as follows : .. . .. . PHP docs : http : php.net manual en mysqli-stmt.store-result.php http : php.net manual en mysqli-stmt.num-rows.php",
"I am understanding prepared statements using PHP and mysqli .",
"I have a web based system in php that works locally in multiple places and in each place has a local database in mysqli .",
"but anyway i fixed it by using mysql instead mysqli",
"mysqli and mysql are two entirely different unrelated APIs .",
"I have only used mysqli instead of mysql .",
"@halfer - hadn t thought of extension class for mysqli .",
"I hadn t thought of extension class for mysqli .",
"This will enable mysqli and it will use the MySQL Client Library libmysql to communicate with the MySQL Server .",
"That kind of injection is not possible with ext mysql - the only way this kind of injection is possible with PHP and MySQL is when using MySQLi and the mysqli-multi-query function .",
"mysqli new mysqli mysqlhost mysqluser mysqlpasswd mysqldb",
"github.com aaronlord mysqli https : github.com aaronlord mysqli .",
"I can t login to the database using mysqli class .",
"I will also gladly accept a MySQLi specific solution as well as we are about to undertake a transition to MySQLi instead of MySQL .",
"I can get the exact mysql error message and error-code with mysqli : : error and mysqli : : errno .",
"This is problematic in php-5.3 for this reason : ca.php.net manual en mysqli-stmt.bind-param.php 96770 http : ca.php.net manual en mysqli-stmt.bind-param.php 96770",
"Are you using modules mysqli and database at the same time",
"PHP MySQLI : strange readings for affected rows http : stackoverflow.com questions 23107189 php-mysqli-strange-readings-for-affected-rows .. . .. . But the wall I hit was that affected rows was returning NULL .",
"Specifically the MySQLi extension provides the following extremely useful benefits over the old MySQL extension. . .. . .. . OOP Interface in addition to procedural Prepared Statement Support Transaction + Stored Procedure Support Nicer Syntax Speed Improvements Enhanced Debugging .. . .. . PDO Extension .. . .. . PHP Data Objects extension is a Database Abstraction Layer .",
"First of all always have this line before mysqli connect in all your environments : .. . .. . After that all mysql errors will be transferred into PHP exceptions .",
"Something like.. . do mysqli- use result while mysqli- next result",
"I got Unexpected character in input changing from mysqli to mysqli .",
"http : www.php.net manual en mysqli-stmt.bind-result.php .. . .. . http : www.php.net manual en mysqli-stmt.fetch.php .. . .. . Function MySQL Native Driver Only .. . .. . Available only with mysqlnd : http : www.php.net manual en book.mysqlnd.php .. . .. . Note : mysqli stmt : : get result is only available at PHP v5.3.0 or above .. . .. . I m gonna search for another alternative .",
"It s mysqli .",
"full way is MODPATH database classes Database MySQLi Result.php",
"However since this last issue we can no longer connect to it via mysqli from PHP .",
"Is it as simple as changing mysql query sql to mysqli query sql",
"So for example passing a mysqli connection to PDO MySQL or ext mysql will not work .",
"MySQLi is a lot more secure than MySQL which is anyway now deprecated .",
"Either way the package contains mysql mysqli and pdo mysql support .",
"It s no more a feeling : PHP7 removed mysql API leaving PDO and mysqli",
"mysqli http : php.net manual en book.mysqli.php is the enhanced version of mysql .",
"You seem to be mixing up mysql and mysqli in your code .",
".. . .. . Update .. . .. . I rebuild the apache with easyapache and I check the mysqli extension .",
"Per @Patec below : commit does NOT switch autocommit back on see the source https : github.com php php-src blob master ext mysqli mysqli api.c",
"PHP Version 5.3.3 on CentOS x86-64 RHEL 6 .. . .. . Apparently my PHP installation was configured to exclude Mysqli and disable PDO for some reason .",
"The error reads : Database Exception 8192 : mysql-connect : The mysql extension is deprecated and will be removed in the future : use mysqli or PDO instead .",
"http : stackoverflow.com questions 12859942 why-shouldnt-i-use-mysql-functions-in-php You should use mysqli or PDO library .",
"For clarification examples with a global limit of 50 : .. . .. . Is there any possibility to limit the number of returned values using either PHP MySQLi or the MySQL server itself",
"The problem is when one of the mysql-server is turned off the php mysqli connection is not working anymore and after 30 sec is automatically killed ."
]
}
|
{
"confidence": [
76.27580261230469,
67.7209701538086,
65.95600128173828,
59.42079162597656,
58.94743347167969,
58.26992416381836,
57.73550033569336,
57.69989013671875,
57.603572845458984,
57.0316162109375,
56.8276481628418,
54.740081787109375,
54.40854263305664,
54.404571533203125,
53.997711181640625,
53.35776138305664,
53.217933654785156,
53.17829513549805,
52.92808151245117,
52.69142532348633
],
"content": [
"Question : What is the difference between MySQL MySQLi http : en.wikipedia.org wiki MySQLi and PDO https : en.wikipedia.org wiki PHP Development and community Which one is the best suited to use with PHP-MySQL .. . Answer : Simply we can say MySQL Improved Extension offering various benefits.The mysqli extension allows you to access the functionality provided by MySQL 4.1 and above . The PHP Data Objects PDO extension defines a lightweight consistent interface for accessing databases in PHP . Each database driver that implements the PDO interface can expose database-specific features as regular extension functions . Note that you cannot perform any database functions using the PDO extension by itself you must use a database-specific PDO driver to access a database server .",
"Question : What is the difference between MySQL MySQLi http : en.wikipedia.org wiki MySQLi and PDO https : en.wikipedia.org wiki PHP Development and community Which one is the best suited to use with PHP-MySQL .. . Answer : mysqli http : php.net manual en book.mysqli.php is the enhanced version of mysql . PDO extension http : www.php.net manual en intro.pdo.php defines a lightweight consistent interface for accessing databases in PHP . Each database driver that implements the PDO interface can expose database-specific features as regular extension functions . Comment : copying from the manual file is not very useful .",
"Question : What is the difference between MySQL MySQLi http : en.wikipedia.org wiki MySQLi and PDO https : en.wikipedia.org wiki PHP Development and community Which one is the best suited to use with PHP-MySQL .. . Answer : Specifically the MySQLi extension provides the following extremely useful benefits over the old MySQL extension. . .. . .. . OOP Interface in addition to procedural Prepared Statement Support Transaction + Stored Procedure Support Nicer Syntax Speed Improvements Enhanced Debugging .. . .. . PDO Extension .. . .. . PHP Data Objects extension is a Database Abstraction Layer . Specifically this is not a MySQL interface as it provides drivers for many database engines of course including MYSQL . PDO aims to provide a consistent API that means when a database engine is changed the code changes to reflect this should be minimal . When using PDO your code will normally just work across many database engines simply by changing the driver you re using . In addition to being cross-database compatible PDO also supports prepared statements stored-procedures and more whilst using the MySQL Driver .",
"Question : Does anyone know how on Ubuntu 8.04 with PHP 5 and MySQL 5.0 to enable install the mysqli package extensions Preferably I d like to preserve the existing installations but if necessary I ll reinstall from scratch . I realise it s not technically programming-related but I think at a stretch maybe it s programming-enabling hopes .. . .. . Thanks for any help you re able to provide . .. . Answer : From the PHP documentation . http : is.php.net manual en mysqli.installation.php .. . .. . To ensure that the mysqli extension for PHP is enabled you will need to configure the PHP source code to use mysqli . This is achieved by running the configure script with the option --with-mysqli mysql config path mysql config prior to building PHP . This will enable mysqli and it will use the MySQL Client Library libmysql to communicate with the MySQL Server . But since you are on ubuntu . You can just install the mysqli package . Details about it here . http : packages.ubuntu.com dapper php5-mysqli Comment : I m sorry but how My noob-ness is extreme at this point I m afraid . I may need hand-holding . Or a piggy back ride through the difficult parts . blush Comment : The install command is there at the bottom . Comment : Appreciated it wasn t there for some reason when I looked first . Or I missed it.. . blush umm : sudo apt-get mysqli gives E : Package php5-mysqli has no installation candidate . And the suggested replacement php-mysql package is already the latest version . Comment : You could try installing php5-pdo if PDO is suitable for your application . I think you ll just need apt-get install php5-pdo-mysql but i cant remember the package name for certain .",
"Question : I have been using CI just fine using the MySQL driver . I want to use the mysqli driver instead but as soon as I change it just add the i at the end of mysql and added the port-number I get the following error message .. . .. . my setting look like this : .. . .. . Using : CI 2.0.2 php 5.3.4 Apache 2.2.17 Unix mysql 5.5.13 mysql.default port 3306 .. . .. . Am I doing anything wrong Thank you Comment : Is your DB Server started .. . Answer : If that is all you have changed you may not have the mysqli driver installed or enabled within your PHP configuration . Check for its presence using phpinfo or in your php.ini file extension php mysqli... . . Comment : Than you for your answer . I believe starting with php-5.3 mysqli is enabled by default . But I did check my php info and this is what I saw d.pr FUZ6 http : d.pr FUZ6 Comment : OK . Change the log level to 4 in config.php and check app logs log-2011-08-31.php file for any obvious errors once you ve refreshed the page in your app . Look for lines with mysqli connect in it .",
"Question : I m working on a project that uses Kohana 3.3 . I ve run into a problem where I want to connect to a database . The application is telling me it s using MySQL and it s decrepated . To solve this I ve downloaded a MySQLi driver for Kohana 3.3 and followed the instructions creating a mysqli folder in the modules folder and adding a new line in bootstrap.php to enable it . However when I try to perform any database actions it still says it s using MySQL . The error reads : Database Exception 8192 : mysql-connect : The mysql extension is deprecated and will be removed in the future : use mysqli or PDO instead . The line I m using to enable the module is mysqli MODPATH . mysqli MySQLi support for Kohana .. . .. . The MySQLi driver I m using is this https : github.com Azuka Kohana-Database-MySQLi links to github . Can anyone see what s going wrong Thanks in advance . Comment : Are you using modules mysqli and database at the same time I think this should not be declared as a module but rather as a driver in your DB module .. . Answer : Just enabling the module isn t enough . Since Kohana 3.3 the autoloader is case sensitive http : kohanaframework.org 3.3 guide kohana upgrading psr-0-support-fileclass-naming-conventions so MODPATH mysqli classes kohana database mysqli.php should become MODPATH mysqli classes Kohana Database MySQLi.php for example . You have to edit your APPPATH config database.php and set the driver to MySQLi or set Database : : default to the correct default database instance name . The one using MySQLi as the driver . And just to be sure do NOT edit config files outside of APPPATH . Instead copy the file to APPPATH and edit that file . You generally should not have to edit files outside of APPPATH . Updating modules to work with a new version is allowed of course . But config files outside of APPPATH should serve as examples blueprints .",
"Question : I m working on a project that uses Kohana 3.3 . I ve run into a problem where I want to connect to a database . The application is telling me it s using MySQL and it s decrepated . To solve this I ve downloaded a MySQLi driver for Kohana 3.3 and followed the instructions creating a mysqli folder in the modules folder and adding a new line in bootstrap.php to enable it . However when I try to perform any database actions it still says it s using MySQL . The error reads : Database Exception 8192 : mysql-connect : The mysql extension is deprecated and will be removed in the future : use mysqli or PDO instead . The line I m using to enable the module is mysqli MODPATH . mysqli MySQLi support for Kohana .. . .. . The MySQLi driver I m using is this https : github.com Azuka Kohana-Database-MySQLi links to github . Can anyone see what s going wrong Thanks in advance . Comment : Are you using modules mysqli and database at the same time I think this should not be declared as a module but rather as a driver in your DB module .. . Answer : I ve bumped into this issue as well . The problem has been discussed on the Kohana forums . The next version 3.4 will include changes to the Kohana Database module so you can use the MySQLi library . Until then I ve disabled deprecated errors appearing by changing the error reporting in index.php .. . .. . Hope this helps",
"Question : Does anyone know how on Ubuntu 8.04 with PHP 5 and MySQL 5.0 to enable install the mysqli package extensions Preferably I d like to preserve the existing installations but if necessary I ll reinstall from scratch . I realise it s not technically programming-related but I think at a stretch maybe it s programming-enabling hopes .. . .. . Thanks for any help you re able to provide . .. . Answer : You might have to install php with the mysqli option : apt-get install php5-mysqli Comment : That link seems to be about how to install the LAMP stack which I already have and says nothing about installing enabling mysqli for php . But thank you still it was an interesting read : Comment : I solved this problem by installing the php5-mysqlnd package . This package uses the native driver hence the trailing nd in the package name . Alternatively you could use the php5-mysql package for the traditional library . Either way the package contains mysql mysqli and pdo mysql support .",
"Question : It seems as though my PHP is trying to log in to the MySQL database with a username I am not supplying . The error I am getting is : .. . .. . I am definitely supplying a password and am not using radiocaf as the username in my connect file so after 3 hours of staring I still can t work out where I am going wrong . Here is my code : .. . .. . psl-config.php : .. . .. . db connect.php .. . .. . and then finally the main page which is where I am receiving the error I have cut out the HTML between the PHP : .. . .. . The surrounding HTML is just the layout of the page essentially just a photoshop layout sliced and exported to web . I am fairly new to PHP and so I hope this question is as explained as possible . .. . .. . Edit : .. . .. . Thanks so much guys I apologise that this question seemed poor to some of you that you flagged it . Unfortunately I wouldn t have seen the typos as I really didn t know that I was attempting to use both mysql and mysqli and that they couldn t communicate with each other . Another issue I found was Dreamweaver uploaded the code from layout.php as db connect.php . This doesn t explain to me at least how any connection was being made to bring up the access denied error for radiocaf @ localhost though . Here s the old code lines I changed in layout.php : .. . .. . changed to : .. . .. . And that s all it took but I am entirely grateful Thanks again everyone Comment : If you re using mysqli then use mysqli . You re interspersing mysql function-calls which is your problem . mysqli and mysql are two entirely different unrelated APIs . Comment : It says the error is in layout.php have you checked that file .. . Answer : You are conflicting MySQL and MySQLi . MySQL and MySQLi are two different Methods .. . .. . Waring is .. . .. . But your connecting database with mysqli .. . .. . Waring in php.net MySQL extension was deprecated in PHP 5.5.0 and it was removed in PHP 7.0.0 . Instead the MySQLi http : ttp : php.net manual en book.mysqli.php or PDO MySQL http : php.net manual en ref.pdo-mysql.php extension should be used . Comment : Thank you for your input I can see why the question has been flagged as off-topic due to typographic errors but I really am new to this and thought I was doing okay . I appreciate you pointing out that there is a difference I have since sorted the code and it now works Comment : Yes I have edited the original question to show the two lines-of-code that was changed to get the code to work . Thank you :",
"Question : What is the difference between MySQL MySQLi http : en.wikipedia.org wiki MySQLi and PDO https : en.wikipedia.org wiki PHP Development and community Which one is the best suited to use with PHP-MySQL .. . Answer : There are more than three popular ways to use MySQL from PHP . 1 . DEPRECATED The mysql functions http : www.php.net manual en ref.mysql.php are procedural and use manual escaping . 2 . MySQLi http : www.php.net manual en intro.mysqli.php is a replacement for the mysql functions with object-oriented and procedural versions . It has support for prepared statements . 3 . PDO http : php.net manual en book.pdo.php PHP Data Objects is a general database abstraction-layer with support for MySQL among many other databases . It provides prepared statements and significant flexibility in how data is returned . I would recommend using PDO with prepared statements . It is a well-designed API and will let you more easily move to another database including any that supports ODBC https : en.wikipedia.org wiki Open Database Connectivity if necessary . Comment : There is often the confusion that for procedural you have to use mysql functions where for OO you use mysqli The fact is that mysqli completely replace the early PHP 4 implementation of mysql . It is possible to use both the procedural style and the OO one with mysqli . Comment : @Patrick thanks . I ve corrected this .",
"Question : When ever I try to call store procedure in mysql that sends back a result set it keeps saying me that can t return a result set in the given context . I ve google it and some said it s mysql bug some said you should change your mysqli driver and ... . .. . .. . Situation : .. . .. . Using mysqli driver Client API library version 5.0.51a PHP Version 5.2.4-2ubuntu5.6 Using Zend 1.9 RC 1 Mysqli adapter . What should I do .. . Answer : It works perfectly with PHP 5.2.10 as well . From an earlier version I ve successfully used mysqli : : multi-query to call a problematic procedure and get the right results .",
"Question : I ve read that mysqli introduced connection-pooling that was not available in mysql . http : php.net manual en mysqli.quickstart.connections.php .. . .. . I ve read this question http : stackoverflow.com questions 9736188 mysql-persistent-connection-vs-connection-pooling that explains the difference between connection-pooling and persist connections . In the mysqli documentation for Persistent connection http : php.net manual en mysqli.quickstart.connections.php they have written that : .. . .. . If a unused persistent connection for a given combination of host username password socket port and default database can not be found in the connection pool then mysqli opens a new connection . So does mysqli use connection-pooling for persistent connections If yes then what is difference between connection-pooling and persistent connections in mysqli If no then how does mysqli perform a lookup for a connection object for a persistent connection .. . Answer : in libmysql18 it looks for any existing default mysql sock port and tests it with the credentials . if it can t be found the c++ function clone is called creating the new connection object Resource . in certain cases this can result in a stack-overflow . i m not familiar with how it works in mysqlnd native driver . maybe someone else is . if you want more information about how it works install a version of facebooks HHVM-debug package and attempt to pass a connection via global in multiple nested functions . this can trigger a stack-overflow under HHVM which will show you every function called prior to the exception up to that point . Comment : Thank you for replaying . I am looking for mysqli and php not for hack . Comment : @Dhruv yes i know . there are two different drivers php uses to connect to mysql . one is mysqlnd the other is libmysql . the driver you are using depends on your os and your installation . i answered your question about how it performs a lookup for connection objects .",
"Question : I am having trouble using the mysqli class in PHP and I haven t been able to find the answer anywhere . In my script a class creates a mysqli connection that it uses throughout it s functions . Afterward this script forks . The connection is used by the children as well but I m running into the problem of the connection being closed MYSQL Server Has Gone Away in the parent when the children die . Before I switched to mysqli was just using mysql I simply called mysql ping to assure that the db connection was there before performing the query in the parent process . Mysqli has a similar ping function BUT it doesn t actually reconnect if the connection is gone . I tried using the mysqli.reconnect ON global setting with no luck using php.ini and ini set . The php mysql-connect function allows you to grab an already-existing connection so if I was using mysql instead of mysqli I could simply reuse the connection in the child right after the process forked . BUT mysqli doesn t seem to have any such functionality.. . The only thing I was able to do was call mysqli- ping and if that returned false then reconnect to the database in the parent . This is terribly inefficient and I would much rather figure out how to do it correctly with mysqli and no need for manual reconnects that having to change back to mysql. . .. . .. . Any suggestions .. . Answer : I think you need to set mysqli.reconnect in my.cng which is the mysql config rather than php.ini I couldn t manage to change reconnect via ini set but my sys admin did it in my.cnf . So tad confused that others have done it within php.ini... . Comment : Not true . my.cnf relates only to the MySQL server so would usually have no influence on a PHP client and mysqli only exists within PHP . mysqli.reconnect http : www.php.net manual en mysqli.configuration.php ini.mysqli.reconnect is a PHP config setting .",
"Question : When ever I try to call store procedure in mysql that sends back a result set it keeps saying me that can t return a result set in the given context . I ve google it and some said it s mysql bug some said you should change your mysqli driver and ... . .. . .. . Situation : .. . .. . Using mysqli driver Client API library version 5.0.51a PHP Version 5.2.4-2ubuntu5.6 Using Zend 1.9 RC 1 Mysqli adapter . What should I do .. . Answer : The answer is to upgrade your php I ve just upgraded mine to 5.3.0 and it s works likes Candy Comment : Thanks for giving the solution you choose : - Just beware : using PHP 5.3 might lead to other troubles elsewhere in your code as it bring lots of new stuff",
"Question : I am having trouble using the mysqli class in PHP and I haven t been able to find the answer anywhere . In my script a class creates a mysqli connection that it uses throughout it s functions . Afterward this script forks . The connection is used by the children as well but I m running into the problem of the connection being closed MYSQL Server Has Gone Away in the parent when the children die . Before I switched to mysqli was just using mysql I simply called mysql ping to assure that the db connection was there before performing the query in the parent process . Mysqli has a similar ping function BUT it doesn t actually reconnect if the connection is gone . I tried using the mysqli.reconnect ON global setting with no luck using php.ini and ini set . The php mysql-connect function allows you to grab an already-existing connection so if I was using mysql instead of mysqli I could simply reuse the connection in the child right after the process forked . BUT mysqli doesn t seem to have any such functionality.. . The only thing I was able to do was call mysqli- ping and if that returned false then reconnect to the database in the parent . This is terribly inefficient and I would much rather figure out how to do it correctly with mysqli and no need for manual reconnects that having to change back to mysql. . .. . .. . Any suggestions .. . Answer : Can t you use persistent connections Also is that really necessary to fork",
"Question : I can not install the Mysqli . I am using Centos 6 apache 2.2.x and php-5.4 MySql 5.5.37-cll .. . .. . I tried : .. . .. . and I see : .. . .. . I tried : .. . .. . and I see : .. . .. . In my php.ini in section Dynamic Extensions I have none module installed i think . Correct me if I am wrong . php.ini - Dynamic Extensions .. . .. . By the way all the above module is for windows Should I need to edit activate any module for the Centos I need mysql and mysqli connections to database . .. . .. . Update .. . .. . I rebuild the apache with easyapache and I check the mysqli extension . I ll post the results from that . .. . Answer : I know this is old but for others make sure your etc yum.conf exclude line is commented out .",
"Question : I can not install the Mysqli . I am using Centos 6 apache 2.2.x and php-5.4 MySql 5.5.37-cll .. . .. . I tried : .. . .. . and I see : .. . .. . I tried : .. . .. . and I see : .. . .. . In my php.ini in section Dynamic Extensions I have none module installed i think . Correct me if I am wrong . php.ini - Dynamic Extensions .. . .. . By the way all the above module is for windows Should I need to edit activate any module for the Centos I need mysql and mysqli connections to database . .. . .. . Update .. . .. . I rebuild the apache with easyapache and I check the mysqli extension . I ll post the results from that . .. . Answer : From the results you posted above it s not installing because it can t find the php-pdo package in any of the repositories configured on your server . It looks like you have made changes to your repositories as elrepo is not in either the version 5 or 6 distributions that I have installed . I would suggest you first list the packages availabe in these repositories as they may be packaged under a different name . Run yum list php to see an output of php packages . Yum will then tell you what is available installed and needs updating . Note : If you re on a shared host chances are that PHP is already installed and mapped to a specific version . Often times you ll see the version number in the package name so php might be a php4 install php5 might be a php version 5.2 and below install php53 might be a php version 5.3 install and yes I ve even seen a php6 package mapped to php version 5.3 . So it wouldn t be out of the ordinary if the PHP package installed on YOUR server includes a version number in the package name . Really depends on what repositories you re setup to use . Comment : Rotten things... .",
"Question : I have been using CI just fine using the MySQL driver . I want to use the mysqli driver instead but as soon as I change it just add the i at the end of mysql and added the port-number I get the following error message .. . .. . my setting look like this : .. . .. . Using : CI 2.0.2 php 5.3.4 Apache 2.2.17 Unix mysql 5.5.13 mysql.default port 3306 .. . .. . Am I doing anything wrong Thank you Comment : Is your DB Server started .. . Answer : Change db default dbdriver mysql to db default dbdriver mysqli",
"Question : Helo I using bind result LIKE CONCAT .. . to reach full-text-search and pagination by two query-string . but how can I change bind result methods to fetch assoc Thanks .. . Answer : From mysql documentation examples : .. . .. . -----------EDITED---------------------- .. . .. . Please read the user notes for this method : .. . .. . http : php.net manual en mysqli-stmt.get-result.php .. . .. . It requires the mysqlnd driver.. . if it isn t installed on your webspace you will have to work with BIND RESULT FETCH http : www.php.net manual en mysqli-stmt.bind-result.php .. . .. . http : www.php.net manual en mysqli-stmt.fetch.php .. . .. . Function MySQL Native Driver Only .. . .. . Available only with mysqlnd : http : www.php.net manual en book.mysqlnd.php .. . .. . Note : mysqli stmt : : get result is only available at PHP v5.3.0 or above .. . .. . I m gonna search for another alternative . Saludos Comment : Thanks but this was NOT work . Comment : Call to undefined method mysqli stmt : : get result",
"Question : I am having trouble using the mysqli class in PHP and I haven t been able to find the answer anywhere . In my script a class creates a mysqli connection that it uses throughout it s functions . Afterward this script forks . The connection is used by the children as well but I m running into the problem of the connection being closed MYSQL Server Has Gone Away in the parent when the children die . Before I switched to mysqli was just using mysql I simply called mysql ping to assure that the db connection was there before performing the query in the parent process . Mysqli has a similar ping function BUT it doesn t actually reconnect if the connection is gone . I tried using the mysqli.reconnect ON global setting with no luck using php.ini and ini set . The php mysql-connect function allows you to grab an already-existing connection so if I was using mysql instead of mysqli I could simply reuse the connection in the child right after the process forked . BUT mysqli doesn t seem to have any such functionality.. . The only thing I was able to do was call mysqli- ping and if that returned false then reconnect to the database in the parent . This is terribly inefficient and I would much rather figure out how to do it correctly with mysqli and no need for manual reconnects that having to change back to mysql. . .. . .. . Any suggestions .. . Answer : Use http : www.php.net manual en mysqli.real-connect.php .. . reinstall php and check your php.ini settings Comment : Reinstalling php would be an overkill . Find a default php.ini in the web and check how much your php.ini has changed ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
php
|
UNK_RELATION
|
clewn@gdb@50
|
clewn -- clewn is a program that implements full @placeholder support in the vim editor that supports breakpoints watch variables gdb command completion assembly windows etc .
|
{
"confidence": [],
"content": []
}
|
{
"confidence": [],
"content": []
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
gdb
|
UNK_RELATION
|
zend-studio@php@99
|
zend-studio -- zend-studio is a commercial proprietary integrated development-environment ide for @placeholder developed by zend technologies based on the php development tools pdt plugin for the eclipse platform the pdt project is led by zend .
|
{
"confidence": [
106.83782958984375,
84.01951599121094,
81.47171783447266,
75.70137023925781,
73.3338394165039,
72.42636108398438,
72.34247589111328,
71.77913665771484,
71.24679565429688,
70.2261962890625,
70.2261962890625,
70.1468734741211,
69.72394561767578,
68.82857513427734,
68.82857513427734,
68.82857513427734,
68.7002182006836,
67.80797576904297,
66.84070587158203,
66.72030639648438,
66.3214340209961,
66.24445343017578,
65.52241516113281,
65.52241516113281,
65.52241516113281,
65.26522827148438,
65.19005584716797,
65.15843200683594,
65.15843200683594,
65.14630126953125,
63.824546813964844,
63.63459777832031,
63.5538330078125,
63.50043487548828,
63.50043487548828,
62.72461700439453,
62.42186737060547,
62.252105712890625,
62.09621047973633,
61.690704345703125,
61.690704345703125,
61.08221435546875,
61.08221435546875,
61.08221435546875,
61.08221435546875,
61.08221435546875,
61.08221435546875,
61.08221435546875,
61.06892013549805,
60.75846862792969,
60.57977294921875,
60.16492462158203,
59.60315704345703,
59.272483825683594,
59.272483825683594,
59.1439323425293,
59.14026641845703,
58.28486633300781,
58.074851989746094,
57.485931396484375,
57.485931396484375,
57.485931396484375,
56.710105895996094,
56.38600158691406,
56.38600158691406,
56.38600158691406,
55.15723419189453,
55.067710876464844,
55.067710876464844,
55.067710876464844,
55.067710876464844,
55.067710876464844,
55.067710876464844,
54.99714279174805,
54.8729248046875,
54.62102508544922,
54.495750427246094,
54.47590637207031,
54.463260650634766,
53.93817901611328,
53.73790740966797,
53.726051330566406,
53.726051330566406,
53.52128982543945,
53.21492385864258,
52.90135955810547,
52.83824920654297,
52.83824920654297,
52.659454345703125,
52.46417236328125,
52.41606903076172,
52.20280456542969,
52.09324645996094,
52.09324645996094,
51.886260986328125,
51.886260986328125,
51.886260986328125,
51.57876205444336,
51.51995849609375,
51.04243087768555
],
"content": [
"PDT and Zend Studio is based on PDT .",
"Both in Eclipse and Zend Development Environment .",
"I m going to write a plugin with Eclipse Mars for my Zend Studio 10.4 I know that the Zend Studio is based on Eclipse .",
"Zend Studio runs in Eclipse doesn t it",
"The Zend Debugger comes bundled with Zend Studio and Zend Server .",
"Download the source code of the corresponding Zend Studio Eclipse plug-in into an Eclipse workspace that has the Plug-in development-environment .",
"I am using Zend Studio as my development-environment .",
"Zend Studio uses the zend-tool zf.bat in windows to create a project .",
"Zend Studio Preferences .. . .. .",
"I am trying to add Angularjs into Zend Studio for mobile development .",
"Hi I am trying out Zend Studio for Drupal module development .",
"Something specific to Zend Studio",
"@MartinDimitrov the problem was the php preferences in Zend Studio .",
"I m using Zend studio .",
"Zend Studio 12.5",
"its a zend-studio issue .",
"How do I quickly add those libraries with Eclipse PDT or Zend Studio installed",
"For development and debugging I use the combination Zend Studio 12 + Xdebug .",
"In Zend Studio there is a command Replace e.g .",
"I m starting with an initial Zend Framework project in Zend Studio based in my htdocs folder I m using Zend Server as well on Windows 7 .",
"I have an article on some code-completion tips Zend Studio and PDT Code Completion Tips http : www.eschrade.com page zend-studio-code-assist-4b9f800a that might help .",
"I have tried this using both the Zend Studio PHP executable and the one shipping with Zend Server 7 .",
"Ah it might be a limitation in Zend studio .",
"I wonder if Zend Studio did that .",
"It is still a problem in Zend Studio 9 .",
"basically I want to be able to search the server for strings of text within Zend Studio .. . .. . ...perhaps someone who uses Eclipse or Zend Studio can comment .",
"I m using composer in a ZF2 PHP project in Zend Studio 10.6 .",
"How to fix building workspace problem in Zend Studio",
"I didn t have this problem in Zend Studio 8 .",
"I recently have begun using Zend Studio like Eclipse for web development instead of Notepad++ .",
"Im trying to add more syntax elements for Zend Studio for eclipse .",
"I guess you should change the tag from zend-framework to zend-studio because zend-framework has nothing common with jdbc usually",
"I spoke with a couple of people who build Zend Studio at ZendCon they said it would be fixed in Zend Studio 10 .",
"Why the Zend Studio doesn t recognize some functions",
"I moved to a new workspace in zend-studio .",
"Afterwards the doc path can be added to the Eclipse Zend Studio include path .",
"When I start a debug session in my IDE eclipse based Zend Studio 12.5 the lauchiung progress stopps at 78 : .. . .. .",
"I have installed Zend Studio 12.0.2 trial version in my linux operating system.How can I run php code in Zend Studio .",
"I have created a new Apigility project in Zend Studio 12 .",
"Why do I get this error : .. . .. . .. . When using Zend Tool in Zend Studio .",
"I am using ibuildings ZF http : blog.hackix.com 2010 03 zend-studio-code-formatter-for-zend-framework .",
"Or some problem in my Zend Studio setup",
"So can we call that a bug in Zend Studio",
"Or is it just something wrong with my Zend studio settings",
"It sounds like Zend Studio is being overprotective .",
"The issue is with committing submodules using Zend Studio .",
"I m interested in using Eclim with Zend Studio as well .",
"This issue is now fixed in Zend Studio 10.6.2 .",
"After finding my requirement in google i have found some links- 1 http : files.zend.com help Zend-Studio-12.5 zend-studio.htm angularjs.htm 2 http : files.zend.com help Zend-Studio-12.5 zend-studio.htm customizing zend-studio using the welcome page.htm .. . .. . But these can t help me to add angular in my project .",
"I solved it in the Zend Studio Eclipse based IDE by going to .. . .. . Preferences - PHP - Code Style - Formatter .. . .. . and then choose edit on the screen next to the fortmatter preset name .",
"I am using zend-studio to develop php and installed xdebug on apache2 .",
"What I m using : .. . .. . Zend Server CE 5.6 - .. . Zend Studio 8 - .. . Zend Debugger - .. . Zend Framework - .. . 1.11 Mac OS X - 10.6.8 - .. . .. . Thanks in advance .",
"Here is a manual entry http : files.zend.com help previous-version Zend-Studio-5 @var tag as class type hint.htm of the very old Zend Studio 5 .",
"This is the third time I m installing zend-studio and zend-server now these two are installed succesfully after half a day .",
"You can read more in : .. . .. . http : files.zend.com help Zend-Studio zend-studio.htm running php web pages.htm",
"Also how can i add xampp in servers of Zend Studio .. . .. .",
"I can browse the files in Zend Guard and then open in Zend Studio but this will only let me edit files in the output location which is not on the live server .. . .. . FYI I am using Zend Studio 5.5.1 not latest .",
"The video tutorial Apigility Integration in Zend Studio https : www.youtube.com watch v 9L9wf12t370 shows an example of Apigility application building in Zend Studio .",
"In Eclipse with which Zend Studio shares code so it might help is the PHP Include Path .",
"My Zend Studio 13 does know the Memcache but not the Memcached class .",
"Can I use the search and replace mask of Zend Studio with regular expressions",
"Given : .. . .. . The variable get variable variable throws an Assignment in condition warning in Zend Studio .",
"How to get Xdebug working with Zend Studio for PHPUnit code in the context of a library container IDE project",
"I uninstall Zend studio then again with new installation its working fine .",
"This feature is also works in new Zend Studio including version 10",
"By now both CI and Zend Studio will have changed significantly .",
"Things I have checked : I have checked all my Run and Debug settings against the Zend Studio user guide Running and Debugging Zend Framework Projects as well as those in Zend Server .",
"Also how can I get all the shortcuts of Zend Studio 12",
"I ve never used Zend Studio so can t comment there but it s possible .",
"What you are asking for in NOT a feature of Zend Studio nor would it ever be one .",
"Zend Studio will show whatever you set for @property regardless of this property existing .",
"Code Completion in Zend Studio with @property annotation http : i.stack.imgur.com tFbt5.png",
"I can confirm that in the beta version of Zend Studio 10 it is still broken .",
"In Eclipes I was not able to redirect next page so now I have installed Zend Development Environment .",
"I just installed Zend to try .",
"I m wondering if you can do something similar to this functionality available with Zend Studio 5.1 in Eclipse .",
"I m trying to add a dependency through my composer.json file in a remote Laravel Project I m working on in Zend Studio currently on my Development server .",
"Zend Tools https : github.com zendframework ZendDeveloperTools",
"Just try making a Zend Framework MVC project without using Zend Loader .",
"In my case : usr bin php .. . .. . Then I have closed and open again the Zend Studio and the issue is disappeared .",
"I m starting developping a php-extension based on C and the zend Api .",
"Zend Debugger is for PHP code opcodes for sure .",
"not php functions but a functions which are psecific to Zend",
"In Zend Studio under Debug Configurations i can test the Debugger .",
"Restart Zend and you are good to play .. .",
"What is the shortcut to go to a particular line in Zend Studio 12 in the same way that CTRL + G works in NetBeans IDE and Notepad++",
"The formatter can be configured in window- preferences- PHP- Code Style- Formatter Zend Studio 7.0 to Reformat arrays as described above .",
"How do I get Zend Studio to recognize classes provided by PHP extensions",
"I m learning zend-framework from zendCast and can t find the problem .. . .. . I m using : .. . .. . -Zend Server CE .. . .. . -Zend Studio 7.2 .. . .. . -Zend Framework 1.10 created with zend-studio .. . .. . In my library folder I have a folder App and in that folder a php file Countries.php which corresponds to App Countries class but when I try to create a new App Countries object it says that class could not be loaded any ideas on how to get rid of the error",
"But I am working on migrating several basic PHP projects to use the Laravel framework and am using Zend Studio 12 as my IDE .",
"However I already have a Zend Studio Project and installing Eclim requires the creation of an eclim project .",
"Eclipse or in fact Zend Studio which I use derived from it doesn t seem to have its own exclude for it .",
"I am getting a Error java.lang.nullpointerexception while creating new project using Zend studio .",
"i m using zend-studio 9 that is what i did : Add CI s library path as an include path to your project .",
"For instructions on installing and configuring Xdebug see Installing Xdebug http : files.zend.com help Zend-Studio content installing xdebug.htm and Configuring Xdebug http : files.zend.com help Zend-Studio content configuring xdebug.htm .",
"The way to do this is to comment your code at the very least you will need to comment the declaration of the points variable like this : - .. . .. . I don t use Zend Studio but this works in PHPStorm so I imagine it does in Zend Studio too .",
"NOTE : I want to be able to edit encoded files from a live FTP via Zend Studio not what is mentioned here - http : files.zend.com help Zend-Studio opening and editing zend-guard projects in neon.htm which is already mentioned above",
"Check also for org.eclipse.ui.ide.prefs file in the directory zend configuration.settings.. .",
"I would like to profile a php script in CLI mode with Zend Studio 11.0 .",
"I have the latest version of Zend Studio 8.01 and I am still getting this apparently fixed bug ."
]
}
|
{
"confidence": [
90.56233215332031,
88.77436065673828,
87.36199951171875,
86.01718139648438,
84.74772644042969,
83.92391204833984,
82.01580810546875,
80.6409683227539,
79.74297332763672,
79.58952331542969,
79.58655548095703,
78.14915466308594,
77.0081787109375,
76.31829833984375,
75.87460327148438,
75.33197021484375,
74.78569793701172,
74.71916198730469,
74.27603149414062,
73.54804992675781
],
"content": [
"Question : In php we use includes . So variables defined in one file and then their scope spans included files too . Zend studio has no idea how to get the type of the variable I am using inside an included file this is very annoying when the variable type is a big class . Is there a way to hint the ide about variable types in included files Comment : use the @var and @return annotations Comment : @Gordon sure but where remember I defined those variable in a file that includes the current one . .. . Answer : I have an article on some code-completion tips Zend Studio and PDT Code Completion Tips http : www.eschrade.com page zend-studio-code-assist-4b9f800a that might help . However it is a good idea to try and limit the variables that required from other files . It can quite easily make for difficult to maintain code .",
"Question : How do I setup code-completion to work on Zend Studio or any Eclipse based IDE when working with a class that has private or protected member variables WITHOUT resorting to a bunch of Getter s OR setting the member vars as public . For example : .. . Answer : Code Completion for Magic Methods can be achieved by using the @property http : manual.phpdoc.org HTMLframesConverter default phpDocumentor tutorial tags.property.pkg.html and @method http : manual.phpdoc.org HTMLframesConverter default phpDocumentor tutorial tags.method.pkg.html annotation in the DocBlock of the class not in the Method Docs . Note that there is no correlation between the actual code and the annotation . Zend Studio will show whatever you set for @property regardless of this property existing . It will also not check if there actually is a magic method available . Code Completion in Zend Studio with @property annotation http : i.stack.imgur.com tFbt5.png Comment : Does that work with Eclipse too Comment : @Matthieu it should work with Eclipse too . But dont nail me on that . Comment : Just confirming this also works on Netbeans 7.2 Comment : Yup it works in Eclipse PDT . I knew this was possible but was looking everywhere for it . The @method annotation on the class an amazing solution for fancy abstract inherited methods .",
"Question : I m using the following style of array initialization in the code : .. . .. . But PDT Zend Studio doesn t work properly in this case after pressing Return key it places cursor under the a in my example and ignores indentation . If array keys are numbers at least not start with quotation marks everything is working fine . This is how it works currently is a position where edtitor places caret after pressing Return .. . .. . This is expected result : .. . .. . So is it possible to force editor follow my indentation rules Comment : +1 : I ve got exactly the same problem -- I indend the same way you do and have never found a solution : - Comment : Just an idea : what happens if you surround this with brackets a array .. . Comment : The same thing no proper indentation . Comment : Have you looked through the code-formatting settings in the configuration windows I found them to be relatively detailed . If the setting is not there I would file it as a bug . Comment : Yep I ve looked . There are no such thing it realy looks like a bug . .. . Answer : I m not sure about Eclipse but I had the same problem in TextMate . I switched to soft tabs aka 4 spaces instead of tabs and it now acts as expected . Does ZendStudio have that option Comment : It have it doesn t work . Comment : Strangely I just opened up Flex Builder also eclipse and tested this and it works as expected . Something specific to Zend Studio Maybe ask their support . Comment : It looks like a PHP-bug i.e . PDT and Zend Studio is based on PDT .",
"Question : After having installed the HTTP extension from PECL I expected Zend Studio 6 to recognize the provided HTTP classes and for code-completion to be made available . This is not the case however . How do I get Zend Studio to recognize classes provided by PHP extensions Specifcally I want to be able to use code competition on these classes . .. . Answer : I used the phpgenerator.php script from Michael Spector . It generates a php documentation folder with the loaded extensions on your pc . Afterwards the doc path can be added to the Eclipse Zend Studio include path . Code Completion works like a charm . usage : .. . .. . http : dev.eclipse.org viewcvs viewvc.cgi org.eclipse.pdt plugins org.eclipse.php.core Resources language root Tools Project .. . .. . This script can be used for generating PHP model for PDT . It builds PHP functions according to the loaded extensions in running PHP .. . using complementary information gathered from PHP.net documentation .. . @author Michael Spector Comment : For anyone else who happens to come along wondering where this phpgenerator.php script is : gist.github.com cowlby 7776499 https : gist.github.com cowlby 7776499 That s not the original but it s the only copy I could dig up .",
"Question : I m using the following style of array initialization in the code : .. . .. . But PDT Zend Studio doesn t work properly in this case after pressing Return key it places cursor under the a in my example and ignores indentation . If array keys are numbers at least not start with quotation marks everything is working fine . This is how it works currently is a position where edtitor places caret after pressing Return .. . .. . This is expected result : .. . .. . So is it possible to force editor follow my indentation rules Comment : +1 : I ve got exactly the same problem -- I indend the same way you do and have never found a solution : - Comment : Just an idea : what happens if you surround this with brackets a array .. . Comment : The same thing no proper indentation . Comment : Have you looked through the code-formatting settings in the configuration windows I found them to be relatively detailed . If the setting is not there I would file it as a bug . Comment : Yep I ve looked . There are no such thing it realy looks like a bug . .. . Answer : I had recently exactly the same issue . I solved it in the Zend Studio Eclipse based IDE by going to .. . .. . Preferences - PHP - Code Style - Formatter .. . .. . and then choose edit on the screen next to the fortmatter preset name . In the opened window go to the Line Wrapping tab and in the list choose .. . .. . Expressions - Array Initializers . Play with the settings to your likings . Regards .. . .. . Lukas",
"Question : About once every couple months I find out that some irritating thing that Zend Studio does will be fixed in the next version - or you can add the patch now . Adding a patch isn t exactly intuitive though - I ve deadended a couple times . Could someone lay out the steps for me For example applying the patch mentioned in this post http : stackoverflow.com questions 3582304 how-fix-building-workspace-broblem-in-zend-studio . I asked this question a while ago on the zend forums http : forums.zend.com viewtopic.php f 59 t 23608 p68853 but it was never answered . .. . Answer : To apply such a patch you have to .. . .. . 1 . Download the source code of the corresponding Zend Studio Eclipse plug-in into an Eclipse workspace that has the Plug-in development-environment . 2 . Then you can right-click on the project and select Team Apply patch from the context menu . 3 . And finally build and export the resulting plug-in and install it into your environment . Yes it is not that simple because in this case you have to recompile a part of the environment you are working with .",
"Question : I have a basic project that was created from a remote system using the eclipse tools to setup that connection . I right clicked on the folder on my remote system and chose create a new project . Now I want to add PHP to the build path but it is just a basic project . How do I quickly add those libraries with Eclipse PDT or Zend Studio installed .. . Answer : When Add PHP Support is disabled but PHP libraries are not included . 1 . Right Click and Open project . 2 . Find .buildpath file . 3 . add the follwing code to it . Code : Comment : What if we don t have a .buildpath file Comment : @Salketer right-click on project - Build Path Configure Build Path.. . click Add Folder select the project root directory . Click ok . You should now have a .buildpath file",
"Question : I am trying to add Angularjs into Zend Studio for mobile development . After finding my requirement in google i have found some links- 1 http : files.zend.com help Zend-Studio-12.5 zend-studio.htm angularjs.htm 2 http : files.zend.com help Zend-Studio-12.5 zend-studio.htm customizing zend-studio using the welcome page.htm .. . .. . But these can t help me to add angular in my project . Then i have manually added angular js but it did nothing . Comment : Welcome to SO . As you were able to search for your requirements I highly encourage you to read the SO-Guidelines http : stackoverflow.com help on how to ask a question . Otherwise you won t get appropriate answers here . .. . Answer : My problem was solved . Zend 11 doesn t support Angular JS . To get AngularJS support I have installed Zend 12.5 13 .",
"Question : I always strive to increase my productivity when developing applications and in the span of the last few years I can say that I have made good steps towards increasing that productivity but I still find I need more tools or methods . I need to edit faster and learn touch typing currently in the process and therefore I find a need to move to Vim . It has been now over one year I have trashed Windows and moved to Linux Ubuntu to be more precise and I am using the IDE Zend Studio http : www.zend.com products studio combined with Aptana Studio http : www.aptana.com for developing OO PHP5.3 websites . Although the IDE does everything I would need from an IDE which I will enumerate shortly it lacks the editing mode Vim would give . So my question is : how would I have all the same following killer features I already have within this IDE in Vim Here is the extensive list of features I need to keep the productivity at an high level for me : .. . .. . Code completion for PHP5.3 not just PHP5 and not just the PHP functions but any libraries that are added to the buildpath such as Zend Framework http : framework.zend.com and my own library . Code formatting I don t use it much except for XML files but that is something I would need soon as I will start to lead more people within my company and formatters will help to keep the code coherence . I use Oxygen XML editor http : www.oxygenxml.com within Zend Studio eclipse for editing Docbook XML http : www.docbook.org technical documentation . It has already proven of great quality to me and I would like to keep it . Syntax validation for any file extensions that can be used on the Web mostly for me would be PHP5.3 syntax html syntax not that important CSS Javascript that s why I have Aptana Studio integrated with Zend Studio their javascript editor is great with JQuery support .. . .. . Maybe a git integration just like EGit http : www.eclipse.org egit eclipse-plugin Not required but a nice addon . Debugging features already using it through the ZendDebugger .. . .. . Powerful searching within files .. . .. . I know that is a lot but I am already having all this within my IDE and as I said I feel the need to move to mode based editors like Vim to be more productive when typing and I feel the learning curve and time invested in setting up all of this will be well worth the effort . I know that there is Eclim http : eclim.org which integrates eclipse to its daemon and I am thinking of using just that if anyone has feedback on Eclim used with Zend Studio that would be appreciated . Along with Eclim if I need more vim plugins to achieve my needs I would gladly appreciate it if someone could direct me to them . .. . Answer : I m interested in using Eclim with Zend Studio as well . However I already have a Zend Studio Project and installing Eclim requires the creation of an eclim project . That process according to the eclim installation notes will create a .project file in the root directory of the project . And that means it will likely overwrite the ZendStudio .project file...which will corrupt my project files.. . something I don t want to do in case I decide that eclim is not for me . Let me know how it works out for you . Comment : Yeah I am using already set-up projects as well and won t be creating ones with Eclim since projects will get created using Zend Tool . When I get time to figure all that out I will let you know how I did it if I am able to achieve all my development quality and requirement attributes on vim . Comment : @trelayne You don t have to necessarily add projects using Eclim if you already have created them . As long as they were added in your workbench Eclim will be able to see them . I have never actually created projects with Eclim . Inside vim you can type : ProjectInfo to see if the current file is in an Eclipse project .",
"Question : After having installed the HTTP extension from PECL I expected Zend Studio 6 to recognize the provided HTTP classes and for code-completion to be made available . This is not the case however . How do I get Zend Studio to recognize classes provided by PHP extensions Specifcally I want to be able to use code competition on these classes . .. . Answer : In Eclipse with which Zend Studio shares code so it might help is the PHP Include Path . PHP Include Path is in the project explorer . There you can add the directory where the extensions are . Then Eclipse will scan it and you will be able to code-complete . I did the same with PhpUnit2 .",
"Question : I m using the following style of array initialization in the code : .. . .. . But PDT Zend Studio doesn t work properly in this case after pressing Return key it places cursor under the a in my example and ignores indentation . If array keys are numbers at least not start with quotation marks everything is working fine . This is how it works currently is a position where edtitor places caret after pressing Return .. . .. . This is expected result : .. . .. . So is it possible to force editor follow my indentation rules Comment : +1 : I ve got exactly the same problem -- I indend the same way you do and have never found a solution : - Comment : Just an idea : what happens if you surround this with brackets a array .. . Comment : The same thing no proper indentation . Comment : Have you looked through the code-formatting settings in the configuration windows I found them to be relatively detailed . If the setting is not there I would file it as a bug . Comment : Yep I ve looked . There are no such thing it realy looks like a bug . .. . Answer : In ZendStudio you can apply the PhpCodeFormatter using Ctrl+Shift+F . The formatter can be configured in window- preferences- PHP- Code Style- Formatter Zend Studio 7.0 to Reformat arrays as described above . PDT as far as i know does not have this function .",
"Question : I m going to write a plugin with Eclipse Mars for my Zend Studio 10.4 I know that the Zend Studio is based on Eclipse . Is there anything to condsider Versions Configurations and so on Does somebody have links to good Eclipse-Plugin-Tutorials .. . Answer : I ve found the answert to my own question by my selfe . Yes it work Very nice . But if you ve build the .jar-file export you have to do some steps to use the own written plugin in your Zend Studio . Here is the link : enter link description here http : forums.zend.com viewtopic.php f 59 t 50293 p 123018 p123018 .. . .. . I hope that i can help some other developers with this post",
"Question : null .. . Answer : I recently have begun using Zend Studio like Eclipse for web development instead of Notepad++ . But I am sorely missing Notepad++ s CTRL+F box which includes Find All in Current Document and also a handy Find in Files . I mainly like having a search dialog pop-up at the bottom of Notepad++ and then being able to double-click on files having the string and they will open in a new tab . I finally realized that Zend Studio has both CTRL+F AND a CTRL+H searching feature but they don t operate quite like NPP . The Ctrl+F one seems to really just be good for stepping through the code but no dialog appears at the bottom . And Ctrl+H Search feature seems somewhat promising but I can t figure out how to simply search in the current file NOR have I reliably been able to search in a Working set or Selected resources if it s on a remote-server haven t tried local . But I wouldn t be surprised is Zend just is finicky about doing it remotely since that obviously involves some level of searching the server itself instead of a local filesystem. . Anyway I have two questions : .. . .. . Can I use Zend Studio to find all occurrences of a string in the current document or in a directory i.e . find in files like in Notepad++ Can I use Zend Studio to find all occurrences of a string in the current document or in a directory i.e . find in files like in Notepad++ if working directly on a live remote site basically I want to be able to search the server for strings of text within Zend Studio .. . .. . ...perhaps someone who uses Eclipse or Zend Studio can comment . FWIW I m not sure even NPP can search a remote site but it can definitely do it locally like a champ .",
"Question : I have a few problems with setting up the Zend Debugger . I have installed the Zend Server CE . I am using Zend Studio as my development-environment . In Zend Studio under Debug Configurations i can test the Debugger . Everything works fine . But when i try to debug my project the browser pops up and shows the right page but the debug session is terminated directly . I set a breakpoint in my IndexController but the debug session is terminated directly . Under my Zend Server Logs tab the Server Error Log says Zend Debugger Cannot send message . Can anybody help me .. . Answer : Is the server remote or local If it is remote are you sure the Zend Debugger port is allowed across the network You may need to create an SSH tunnel as described here http : kb.zend.com index.php View entry EntryID 109 http : kb.zend.com index.php View entry EntryID 109 . Comment : The Server is in the network . I will try this link . Comment : Its still the same . The Debug Session is terminated directly Comment : Could it be a port problem If so how can i test from my windows-7 pc if the port of my ubuntu-server with zend-server installed is opened",
"Question : I m looking for a good way to get autocomplete and click-for-reference whatever that s called for libraries in codeigniter working in Zend Studio for Eclipse . for instance if i do this- load- library dx auth this- dx auth- get user id .. . .. . zend-studio doesn t know what it is. . There is this sortof hacky way to do it see below source http : codeigniter.com forums viewthread 115310 583621 but i feel like there should be a better way of doing it. . Anyone have any ideas .. . Answer : As Peter s answer instructs adding an include path is definitely the best way to go . However this relies on the docblocks in the CI source code to be complete accurate and not ambiguous . For example if a methods @return is declared as Some Class false the autocompletion won t know what to do with it . To add to Peter s answer you can also force PDT Eclipse ZSfE to treat any variable as an instance of a particular class like so : Comment : Great tip w the type-forcing via comments . I actually didn t know that . +",
"Question : I ve started using Zend Framework and Studio for my projects and would like to hear from those who already use it what to expect . I m not interested so much in the good things because these can be marketing messages . I want to know about the things that are not so good or are annoying so I can decide for myself if they matter enough to me . Thanks for all your input . Comment : I think this should probably be community wiki given that there really is no correct answer . .. . Answer : A couple of notes from my experience : .. . .. . Not well suited for rapid development ala Rails or Django .. . No ORM .. . When developers ignore the suggested Zend way of doing things it can get very messy .. . It s not as loosely coupled as advertised . Just try making a Zend Framework MVC project without using Zend Loader . Slower than some other frameworks but fast enough for 90 of websites DB is almost always the bottleneck anyway .. . I ve found the Zend Forms to be clunky and slow to implement .. . Last I used it the Zend Feed Writer class didn t seem to work right Comment : a note : ORM is not ZF implemented but it can be integrated nevertheless",
"Question : I have installed Zend Studio 12.0.2 trial version in my linux operating system.How can I run php code in Zend Studio . I have search for the possible answers in stack-overflow . I got this link http : files.zend.com help Zend-Studio content running php scripts locally.htm but I cant find php scripts in run configurations.So I need to know what s the issue and how can I solve and run my php code .. . Answer : Your server must be running the Zend Debugger or Xdebug in order for remote debugging and profiling capabilities to function . The Zend Debugger comes bundled with Zend Studio and Zend Server . For instructions on installing and configuring Xdebug see Installing Xdebug http : files.zend.com help Zend-Studio content installing xdebug.htm and Configuring Xdebug http : files.zend.com help Zend-Studio content configuring xdebug.htm . You can read more in : .. . .. . http : files.zend.com help Zend-Studio zend-studio.htm running php web pages.htm",
"Question : In php we use includes . So variables defined in one file and then their scope spans included files too . Zend studio has no idea how to get the type of the variable I am using inside an included file this is very annoying when the variable type is a big class . Is there a way to hint the ide about variable types in included files Comment : use the @var and @return annotations Comment : @Gordon sure but where remember I defined those variable in a file that includes the current one . .. . Answer : Here is a manual entry http : files.zend.com help previous-version Zend-Studio-5 @var tag as class type hint.htm of the very old Zend Studio 5 . This feature is also works in new Zend Studio including version 10",
"Question : I m using the following style of array initialization in the code : .. . .. . But PDT Zend Studio doesn t work properly in this case after pressing Return key it places cursor under the a in my example and ignores indentation . If array keys are numbers at least not start with quotation marks everything is working fine . This is how it works currently is a position where edtitor places caret after pressing Return .. . .. . This is expected result : .. . .. . So is it possible to force editor follow my indentation rules Comment : +1 : I ve got exactly the same problem -- I indend the same way you do and have never found a solution : - Comment : Just an idea : what happens if you surround this with brackets a array .. . Comment : The same thing no proper indentation . Comment : Have you looked through the code-formatting settings in the configuration windows I found them to be relatively detailed . If the setting is not there I would file it as a bug . Comment : Yep I ve looked . There are no such thing it realy looks like a bug . .. . Answer : @MGriesbach : Actually PDT Eclipse does have this function under Source- Format .. . .. . @Sergei : Eclipse doesn t have this problem but this sounds like something is wrong with your config . Are you sure you looked through all the options You may also send an email to the Zend team this sounds like a pretty trivial bug on heir side as it encourages developers to write code not indented correctly . -- edit-- .. . .. . My bad Eclipse PDT does have this problem but i just got used to it : The problem dissapears if i press tab so it will indent the first line . The other lines will follow correctly .",
"Question : I have a basic project that was created from a remote system using the eclipse tools to setup that connection . I right clicked on the folder on my remote system and chose create a new project . Now I want to add PHP to the build path but it is just a basic project . How do I quickly add those libraries with Eclipse PDT or Zend Studio installed .. . Answer : Not sure if this what you are looking for but try .. . .. . Right click the project folder in the Explorer and click Open Project . Right click the project folder again . Find and click Configure from the Context Menu .. . In the submenu find and click Add PHP Support .. . .. . In case you want to configure the include path : .. . .. . Right click the project folder in the Explorer and click Open Project . Right click the project folder again . Find and click Include Path from the context menu .. . In the submenu find and click Configure Include Path .. . Add any resources you need in the tabbed dialog .. . .. . If both of this is not what you are looking for please clarify the question ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
php
|
UNK_RELATION
|
drush@interface@54
|
drush -- drush is a command-line shell and scripting @placeholder for drupal a veritable swiss army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command-prompt .
|
{
"confidence": [
54.521175384521484,
52.52301788330078,
52.328243255615234,
52.25251007080078,
52.183048248291016,
51.09462356567383,
50.426937103271484,
49.388057708740234,
49.30122375488281,
48.731346130371094,
48.68830108642578,
48.49959945678711,
47.64565658569336,
47.53281784057617,
46.83013916015625,
46.60735321044922,
46.60735321044922,
46.3635368347168,
45.36139678955078,
45.16954040527344,
45.03818130493164,
45.03818130493164,
44.93712615966797,
44.93712615966797,
44.93712615966797,
44.55868148803711,
44.5580940246582,
44.52296829223633,
43.98619079589844,
43.98619079589844,
43.91181945800781,
43.669246673583984,
43.26405334472656,
43.214881896972656,
43.14897918701172,
42.916114807128906,
42.878150939941406,
42.86384582519531,
42.862220764160156,
42.81598663330078,
42.620513916015625,
42.59518814086914,
42.52804946899414,
42.47300720214844,
42.238304138183594,
41.716575622558594,
41.515106201171875,
41.515106201171875,
41.515106201171875,
41.48630905151367,
41.370765686035156,
41.19816207885742,
41.19816207885742,
41.19816207885742,
41.166168212890625,
40.96074676513672,
40.83723449707031,
40.75295639038086,
40.362335205078125,
40.27219009399414,
40.27219009399414,
40.18803405761719,
40.1575927734375,
39.79801940917969,
39.705509185791016,
39.41627883911133,
39.274635314941406,
39.26649856567383,
39.148216247558594,
38.553619384765625,
38.553619384765625,
38.533348083496094,
38.448097229003906,
38.14252471923828,
38.14252471923828,
38.011260986328125,
38.00382614135742,
38.00382614135742,
38.00382614135742,
38.00382614135742,
38.00382614135742,
38.00382614135742,
38.00382614135742,
38.00382614135742,
38.00382614135742,
38.00382614135742,
37.95002746582031,
37.93473815917969,
37.664527893066406,
37.532936096191406,
37.095603942871094,
36.887290954589844,
36.887290954589844,
36.879852294921875,
36.84736633300781,
36.795413970947266,
36.795413970947266,
36.738609313964844,
36.62544631958008
],
"content": [
"Installing drush caused the changes to the command-line .",
"drush is not recognized as an internal or external command .",
"I installed drush and it s working fine when I use the drush command-prompt which I got along with my installation .",
"I have installed Drush by this command : composer global require drush drush : 7 .",
"use the below command .. . .. . drush test-clean .. . .. . Here http : www.drushcommands.com drush-7x is all command lists for Drush .. . .. . You will be able to run the individual test .",
"But when I use the command drush migrate-upgrade it returns an error - The drush command migrate-upgrade could not be found .",
"Of course there is no such a file like opt drush 7.x drush drush includes output.inc or such a directory like opt drush 7.x drush drush includes output.inc .",
"I would like to upgrade Drupal 7 to Drupal 8 using Drush command .",
"The drush command omega-guard could not be executed .",
"But I want to use another command tool ConEmu emulator but in this terminal the drush command-prompt isn t recognized",
"github.com drush-ops drush pull 880 https : github.com drush-ops drush pull 880",
"drush dl drupal-8.0.x",
"I need to use drush drush : 8 .",
"Now when I run the drush command drush status it shows that drush is not recognized as an internal or external command .",
"I m sure that drush command is in evn path .",
"I d like to use drush github.com drush-ops drush https : github.com drush-ops drush .",
"There s also a drush docker repo hub.docker.com r drush drush https : hub.docker.com r drush drush .",
"Here is drush status drush status Drupal version : 7.41 .. . Site URI : http : default .. . Default theme : garland .. . Administration theme : garland .. . PHP configuration : etc php5 cli php.ini .. . Drush version : 5.10.0 .. . Drush configuration : var www project name sites all drush drushrc.php .. . Drush alias files : home vagrant .drush project name.aliases.drushrc.php Drupal root : var www npro docroot .. . Site path : sites default .. . File directory path : sites default files",
"I am able to download stuf using drush like : drush dl drupal .",
"In command-prompt when I enter drush help it list out all Migrate Tools commands .",
"I d like to use drush github.com drush-ops drush .",
"There s also a drush docker repo hub.docker.com r drush drush .",
"drush is not recognized as an internal or external command operable program or batch-file .",
"But when I try drush status command I dont see mysql in there .",
"Try adding --root full path to your webroot in your drush command .",
"rm -f usr local bin drush and then ln -s home user .composer vendor drush drush drush usr local bin drush",
"When I do drush status I get this : .. . .. . So how do I now link the drush to my two virtual host drupal sites",
"github.com drush-ops drush issues 1839 https : github.com drush-ops drush issues 1839",
"My drush file absolute path was E : windrush vendor drush drush so I added like the following picture",
"In my case the absolute drush path is C : Documents and Settings Extralap2 Application Data Composer vendor drush drush .",
"i have sshd into my OpenShift Drupal install with the intent of changing my Drupal admin password ..however the drush tool does not seem to be installed .. . .. . drupal-.rhcloud.com 56f94fb97628e12ab700005f drush --help bash : drush : command not found drupal-.rhcloud.com 56f94fb97628e12ab700005f .. . .. . i am using : .. . .. . Drupal 7 .. . .. . is there something that needs doing to get that drush addition",
"I am user drush version 5.4 for drupal-7 .",
"I am new to XAMPP and Drush Mysql doesnt appear in Drush at all .",
"One one of my sites drush is failing to clear all caches giving the following error : .. . .. . I tried drush cc all command with both drush master 8.x and 7.x versions with the same output for this website .",
"OK the only time I ve seen this is when drush is not set to be executable I know you ve verified above but you might just want to check which drush and ls -l .composer vendor drush drush drush .",
"I ve manually symlinked path to drush command to be executable and it is working for me now however the official way of installing still fails for me .",
"Instead of completely deleting or overwriting drush.prompt.sh it may be best to modify it so as not to lose drush command-line customizations .",
"innoraft.com blog http : www.innoraft.com blog how-install-latest-drush-7-version-so-you-can-use-drush-brand-new-drupal-8",
"If i switch to sh with sh I still cant run drush with . drush but sh drush works .",
"After migrating from MySQL to Postgres drush outputs at my Drupal project : .. . .. . The Drupal project works without issues .",
"In the first one type this command to see logs drush ws --tail and run the command which throw your error in the second .",
"This is a great page about Profiles and Drush make .",
"Everytime I try to run drush cc all in a Drupa 7 environment I get the following error message .. . .. . I am using Drush 8.1.3 .. . .. . Anyone know what is causing drush to fail",
"So in my .bash-profile I added the following : .. . .. . After that I installed the latest version of Drush with the following command : .. . .. . Unfortunately every time I try to type drush status I get a drush not found error message in my prompt .",
"So how do I get drush to upload and enable my local file to my drupal site",
"its is working fine but I am unable to use drush this version with for drupal-8 .",
"I d love to try out the new Drush 7 but I can t get it to upgrade from Drush 6 to Drush 7 .",
"git-clone https : github.com drush-ops drush.git drush cd drush composer install should do it .",
"I am trying to install Drush by using composer global require drush drush : 8 .",
"Alternatively you can search SO for drush and composer : stackoverflow.com questions tagged composer-php+drush http : stackoverflow.com questions tagged composer-php+drush",
"in order to manipulate a theme in drupal I had to install Drush in order to make sub-theme .",
"Context : Windows 10 XAMPP Git Composer Drush 8 and Drupal 8 .",
"How can I use drush with this drupal docker image",
"Or you could build a new image that contains both drush and drupal .",
"I am trying to run a drush script and it is coming up with this error message : PHP Fatal error : Call to undefined function db query in phar : usr local bin drush commands core core.drush.inc 1190 : eval d code on line 49 Drush command terminated abnormally due to an unrecoverable error .",
"I have drush installed in my system but drush does not work inside vagrant .",
"Drush setup have problem .",
"no there is nothing like that but if i do drush sql-cli i get the message that the command PGPASSFILE is not available",
"Drush installing in Openshift RHC https : github.com elasa-Sites openshift-drush-installing .. . .. . So you could install drush manually by this codes :",
"And is drush in HOME .composer vendor bin",
"I need to upgrade drush version .",
"Thank you very much to your help I ve try this steps but : ln -s Applications DevDesktop drush vendor drush drush drush usr local bin drush ln : usr local bin drush : File exists .",
"However when I try a real drush command drush en -gmap in this case I get the notorious Command pm-enable needs a higher bootstrap level to run error .",
"systemseed.com blog drush-make-private-git-repository-github http : www.systemseed.com blog drush-make-private-git-repository-github",
"I have installed drush via terminal but how do I link it to my 2 local drupal sites",
"Drush wasn t working globally because I was not updating the correct PATH .",
"When I try to run Drush from the command-line I get the following error : .. . .. . Drush command terminated abnormally due to an unrecoverable error .. . .. . I am not sure why this is happening and I can t figure out what is wrong with it .",
"I installed drush 8 on my windows-10 . but it doesn t work when I request drush status in gitbash .",
"Composer is installed successfully but drush fails .",
"There was a problem acquiring the API key please contact the site administrator . .. . .. . I get this error when running any drush commands on the drupal website however drush works fine for the other websites that are hosted on the same server .",
"I am unsure of the long time support for drush seeing that lots of people recommend using drupal console for things we were using drush before downloading installing modules clearing cache etc .",
"Except for the MAMP version my problem is similar to Drush enable error http : stackoverflow.com questions 29260311 drush-enable-error 29265780 and Drush install on local server error Command pm-enable needs a higher bootstrap level http : stackoverflow.com questions 15791599 drush-install-on-local-server-error-command-pm-enable-needs-a-higher-bootstrap .",
"It could be that bash is not the shell when you login so you may need to see if you can set your default shell on your own or do something like alias drush bash drush on the remote-server .",
"Edit : I found that i could run drush with bash drush it seems to be a permission problem after all .",
"I had Drush 5 installed and I was informed I needed Drush 6 atleast .",
"I have a problem where drush isn t able to connect to my drupal site with mysql .",
"If site produces errors drush commands will fail .",
"What do which php and which drush say",
"Now I lost phpmyadmin php5 and drush .",
"Drush cannot find your database-connection details .",
"in drush commands sql sql.drush.inc : 588 .. . .. . Thanks in advance .",
"I hadn t needed to do it before with drush 6",
"Then you would be able to execute drush migrate-upgrade .",
"After that I attempted to install Drush via composer .",
"Why don t you just use drush again",
"The Drush commmand I am using is the following one .",
"how to make drush make access a private github repository",
"Now any command I run from vagrant returns alias : drush : not found .",
"I installed drush over Vagrant SSH from one of my site directories so that I could clear my cache from the command-line .",
"The reason I am not doing it with update manager is because its giving me a ftp error and rather than try to solve that I would rather bypass it completely with drush and since drush is faster anyway .",
"I m trying to make a DKAN http : demo.getdkan.com site via drush and I m currently running into some issues with the site-install .",
"In my experience the best practices of Drupal project deployment is using Features module and Drush .",
"Using these tools will be discussed at this webinar http : www.qarea.com webinars drupal-deployment-features-module-drush if you re interested .",
"Everything looks ok to the moment I m installing drush .",
"I decided to comment out the offending patch the first line so the drush make process could execute successfully .",
"Composer is used to install the libraries Drush needs it doesn t fetch download drush itself",
"In this context Composer is used to fetch the libraries Drush needs it doesn t download Drush itself .",
"But I want to run a script on linux command-line directly from the server more specific a Drupal Drush .make file .. . .. . I tried to run it using the raw file : .. . .. . for the convenience of non Drupal users let s say .. . .. . Without success .",
"As aegir user launch the service manually : .. . .. . drush @hostmaster hosting-queued"
]
}
|
{
"confidence": [
70.6557846069336,
69.28952026367188,
68.24407958984375,
67.27069091796875,
66.27368927001953,
65.70134735107422,
65.55205535888672,
64.99263000488281,
64.799560546875,
64.20147705078125,
64.08301544189453,
63.18785858154297,
63.151615142822266,
62.76080322265625,
62.743507385253906,
62.566802978515625,
62.35847091674805,
62.29761505126953,
62.093910217285156,
61.88822555541992
],
"content": [
"Question : i have sshd into my OpenShift Drupal install with the intent of changing my Drupal admin password ..however the drush tool does not seem to be installed .. . .. . drupal-.rhcloud.com 56f94fb97628e12ab700005f drush --help bash : drush : command not found drupal-.rhcloud.com 56f94fb97628e12ab700005f .. . .. . i am using : .. . .. . Drupal 7 .. . .. . is there something that needs doing to get that drush addition .. . Answer : it seams openshift drush is not working for every bodies.its happened because of using old PHP version which is not working by new composer SO you need to make one DIY app in openshift and install manually drush and new version of php php 5.5.0 . Drush installing in Openshift RHC https : github.com elasa-Sites openshift-drush-installing .. . .. . So you could install drush manually by this codes : Comment : Hey thanks Soheil ill give that a try",
"Question : I would like to upgrade Drupal 7 to Drupal 8 using Drush command . I installed Drush and modules of Migrate Tool and Migrate Plus . In command-prompt when I enter drush help it list out all Migrate Tools commands . But when I use the command drush migrate-upgrade it returns an error - The drush command migrate-upgrade could not be found . I refer this link https : www.drupal.org node 2350651 for upgrade . Please give some guidance to do this upgrade . .. . Answer : You need to install the Migrate Upgrade https : www.drupal.org project migrate upgrade module besides of what you have already installed . Then you would be able to execute drush migrate-upgrade . Comment : I already installed and enabled that module and it is required when enable the Migrate Tool module . Comment : @Senthil In any way I personally don t recommend using a migration tool . Sometimes it s better to start clean and just migrate specifically what you need . Most Drupal 7 modules are not fully migrated yet or not even in plan to be migrated . For that reason what you would need to do is to copy any CSS and HTML because everything in Drupal 8 is so much different . That s just a personal preference . Comment : Ok thanks . For now I just need to export all node data of a content-type from Drupal 7 to Drupal 8 . No need to migrate any modules I just need the node data base content to be export from Drupal 7 and import in Drupal 8 . Is there any simple way to do this Comment : This link is more useful - drupal.stackexchange.com questions 185364 http : drupal.stackexchange.com questions 185364 upgrading-from-drupal-7-to-8-with-drupal-upgrade-a-bug",
"Question : null .. . Answer : After migrating from MySQL to Postgres drush outputs at my Drupal project : .. . .. . The Drupal project works without issues . Connecting to pg db from cli works also . System : Win 7 php5.4.43 drush 7.3 postgres 9.3 .. . .. . any ideas Comment : Do you have a drushrc or drush alias file that might still define the MySQL connection information Comment : no there is nothing like that but if i do drush sql-cli i get the message that the command PGPASSFILE is not available Comment : github.com drush-ops drush pull 880 https : github.com drush-ops drush pull 880",
"Question : I am trying to set up a way to download and install Drupal 8 with some custom modules and a profile all from the command-line . For Drupal 7 i had written a drush make file that downloaded a list of modules including a custom profile and several custom modules from local git repositories .. . .. . Is there a possibility to do this using drupal console I know it can be done with composer as long as the dependencies are public Comment : Why don t you just use drush again It works great with D8 aswell . Comment : I am unsure of the long time support for drush seeing that lots of people recommend using drupal console for things we were using drush before downloading installing modules clearing cache etc . I will probably use drush but i wanted to know if there was another way of doing it . Thanks .. . Answer : You should definitely use composer https : getcomposer.org . Drupal console is not meant to manage dependencies . Composer works with private dependency . The only requirement is the installation of SSH keys for a git client . See : https : getcomposer.org doc 05-repositories.md using-private-repositories .. . .. . Look also at the official documentation for using composer and drupal https : www.drupal.org node 2718229 .",
"Question : I recently installed a variety of programs in my ubuntu environment homestead vagrant virtualbox . One of those programs has caused my command-line to start displaying the current branch of git along with cryptic symbols that relate to the git-status . They look like this : .. . .. . where you can see it is the staging branch . The relates to the git-status . Here s another example : .. . .. . In this case I m on the master branch and the refers to the git-status . While I think it s neat unfortunately git has also slowed my command-line dramatically . Therefore I would like to find out what has caused this change to git it did not use to behave like this and try to undo the features . I know that git is the reason for the slowdown because in my apps that do not have git everything works swimmingly . I also ran top and noticed that git is the only thing running while my system hangs eating up 33 to 50 of certain resources . I thought updating to a newer version of git would help but it made no changes . Currently I am running git version 2.7.1 . One of the following programs may have had something to do with this : drush ruby or compass . Unfortunately I can t isolate which program may have affected git this way and it s possible it s a different program entirely that I can t remember installing . Comment : None of these are related to the problem . I suspect you customized installed a profile for your shell bash zsh . It s coming from there . Check for a git plugin in your shell prompt . Comment : @Babar how do I check for a git plugin in my shell prompt .. . Answer : Installing drush caused the changes to the command-line . You will notice after installation of drush is complete it will mention it added a handful of lines to your .bashrc file including this one : .. . .. . If you open the file it references home vagrant .drush drush.prompt.sh you will see that this is where both PROMPT COMMAND and PS1 are being modified . Instead of completely deleting or overwriting drush.prompt.sh it may be best to modify it so as not to lose drush command-line customizations . However to completely overwrite it you can add something like the following to your .bashrc file . The .bashrc file located in your directory will modify only your profile . Here s an example that displays some nice info and a git-status that works much faster : .. . .. . You may not need to TZ line or can adjust it accordingly . Here s another nice option : Comment : Nice script certainly faster than the default prompt .",
"Question : When I try to run Drush from the command-line I get the following error : .. . .. . Drush command terminated abnormally due to an unrecoverable error .. . .. . I am not sure why this is happening and I can t figure out what is wrong with it . When I run drush -d -v status I get the following output : .. . .. . Wondering if anyone has run into this issue and found a solution . .. . Answer : maybe it is to old this message but I found this article very usefull and also It worked for me . First check if your site has drupal goto out of custom modules theses calls should check if drupal is on cli mode if not then you can make an drupal goto instrucci n . Full list : .. . .. . Look for calls to drupal goto . These calls should be wrapped in a call to drupal is cli before doing a drupal goto . Look for calls to exit in the code path .. . Make sure the uri in the drush alias is exactly as it is accessed in browser . Make a brand new install of Drupal and see if the problem happens again . If not what is different between the sites Some modules that can cause this problem include require login secure site mobile tools restrict ip .. . .. . The original post here : https : www.drupal.org node 1140842",
"Question : null .. . Answer : I installed drush and it s working fine when I use the drush command-prompt which I got along with my installation . But I want to use another command tool ConEmu emulator but in this terminal the drush command-prompt isn t recognized drush is not recognized as an internal or external command operable program or batch-file . I have already done some research without any progress . This seemed interesting : https : www.drupal.org node 1437318 .. . .. . Where they change the path to : .. . .. . C : Windows SysWOW64 cmd.exe k cd C : ProgramData Drush call C : Program Files x86 Drush DrushEnv.bat .. . .. . But it doesn t seem to work for me . C : Program is not recognized as an internal or external command operable program or batch-file . .. . Command to be executed : C : Windows system32 cmd.exe C C : Program .. . .. . ConEmuC : Root process was alive less than 10 sec ExitCode 1 . Comment : Just set up your task properly : conemu.github.io en Tasks.html find-required-information https : conemu.github.io en Tasks.html find-required-information",
"Question : I recently installed Composer globally on my system following instructions found on getcomposer.org . After that I attempted to install Drush via composer . As the first step in the Drush install I added composer s bin directory to my system path . So in my .bash-profile I added the following : .. . .. . After that I installed the latest version of Drush with the following command : .. . .. . Unfortunately every time I try to type drush status I get a drush not found error message in my prompt . I ve tried to uninstall reinstall both composer and Drush with no effect . All the research I ve done on this issue leads to threads that involve updating the system path but I m pretty sure I ve done this step correctly . Not sure what I m doing wrong here because this should be a fairly simple process . Any ideas where I might be going wrong Comment : Did you restart your shell session after adding the PATH line to your .bash-profile script Does the output from tr : n PATH contain the path you added Comment : Etan thank you for the quick response . I did restart the shell session and the output shows that path I added . I must be forgetting something very basic just can t seem to figure it out . Thanks again for responding so quickly Comment : And is drush in HOME .composer vendor bin Is it executable What does head -n 1 HOME .composer vendor bin drush say Comment : I ve confirmed that drush is in the directory you listed in your previous message . Here is the output from the head -n 1.. . command : usr bin env sh Comment : And what is the exact error you get when you try to run drush And does running HOME .composer vendor bin drush status work correctly .. . Answer : Drush wasn t working globally because I was not updating the correct PATH . I was adding it to my .bash-profile when I should have been updating .zshrc . Thanks to Etan Reisner I was able to identify the problem and find the solution . In the future when looking at PATH variables I should probably type this in my terminal to make sure I m looking in the right place :",
"Question : When I try to run Drush from the command-line I get the following error : .. . .. . Drush command terminated abnormally due to an unrecoverable error .. . .. . I am not sure why this is happening and I can t figure out what is wrong with it . When I run drush -d -v status I get the following output : .. . .. . Wondering if anyone has run into this issue and found a solution . .. . Answer : 1 . Check errors at watchdog page inside Drupal . If site produces errors drush commands will fail . 2 . If your site uses special configuration not under sites default you should add -l domain.name to each your drush command . Comment : This is an interesting analogy . I did not think it matter but that could be an issue . We are running a few sites within a multi-site system sharing the same drupal core using Domain Access . I will give this a try and post back.. . Comment : I am facing the same problem could post your solution back please . thanks",
"Question : null .. . Answer : I am trying to run a drush script and it is coming up with this error message : PHP Fatal error : Call to undefined function db query in phar : usr local bin drush commands core core.drush.inc 1190 : eval d code on line 49 Drush command terminated abnormally due to an unrecoverable error . error Error : Call to undefined function db query in phar : usr local bin drush commands core core.drush.inc 1190 : eval d code line 49 .. . .. . I ve tried googling but not had any luck . Does anyone have any ideas Any help would be greatly appreciated Comment : what is PHP version drupal version and exact command you are using",
"Question : I am new to XAMPP and Drush Mysql doesnt appear in Drush at all . I have no clue what is going on . When I type mysql I get the mysql command-prompt . But when I try drush status command I dont see mysql in there . I also tried .. . .. . This returns an error : .. . .. . Unable to load class Drush Sql Sql exception Drush Sql SqlException with message Unable to find a matching SQL Class . Drush cannot find your database-connection details . in drush commands sql sql.drush.inc : 588 .. . .. . Thanks in advance . .. . Answer : Try adding --root full path to your webroot in your drush command . I am running into exactly this right now and this worked for me . I hadn t needed to do it before with drush 6 on the same server but need to now that I ve installed drush 8.0.5 via composer .",
"Question : null .. . Answer : I can t figure this one out . I need to use drush drush : 8 . as we are building a Drupal 8 site . I ve installed it via composer but when I run drush --version it returns 6.6.0 . I ve added .composer vendor bin to PATH . Even if I do Users stevenharris .composer vendor bin drush --version it returns 6.6.0 .. . .. . But if I move into my . composer directory the same command returns 8.1.2 . Seriously baffled . .composer composer.json Comment : It seems to have difficulty detecting the 8.1.2 so it s a problem detecting the right major version . This is dumb but have you tried changing the caret to tilde for the version .",
"Question : After I installed Drush master-branch for Drupal 8 at my Windows 10 home and set PATH EV with all it s needed values I ran drush cc all .. . And then I got that error : .. . .. . C : wamp www benia drush cc all Failed loading c : wamp bin php php5.5.12 zend ext php xdebug-2.4.0rc1-7.0-vc14-x86 64.dll .. . .. . Unable to load autoload.php . .. . Drush now requires Composer in order to install its dependencies and autoload classes . Please see README.md . I am not yet a programmer and have no idea why would Drush need the Composer software and how to install it on Windows 10 home for using Drush . Can someone please write a detailed stepped answer for laymen like me how to solve it .. . Answer : Running the Windows installer for Composer should take care of everything you need . You can find it here https : getcomposer.org download . If you prefer to use the command-line the Composer site also has instructions for that . Examples Using cUrl : .. . .. . Using PHP : Comment : Hey man I ve installed it from the installer in a default course I.E without Shell menus . After I finished the installation I went to cmd and typed cd cd wamp www benia and after navigating typed drush cc all but the original error about composer installation seems to persist . Should I uninstall and then reinstall with Shell menus Or maybe there is just some kind of an action between the installation I performed and Drush that I haven t performed yet Comment : Make sure that the directory you installed it to is actually in the PATH variable . Then make sure the composer.bat and composer.phar are in the install location . If not follow the manual install https : getcomposer.org doc 00-intro.md manual-installation steps .",
"Question : null .. . Answer : I am user drush version 5.4 for drupal-7 . its is working fine but I am unable to use drush this version with for drupal-8 . I need to upgrade drush version . please provide any solution . Comment : You want to search for composer install drush using the search-engine of your choice . There you will find links like this : docs.drush.org en master install http : docs.drush.org en master install - the official drush documentation . Follow their instructions . Alternatively you can search SO for drush and composer : stackoverflow.com questions tagged composer-php+drush http : stackoverflow.com questions tagged composer-php+drush Comment : innoraft.com blog http : www.innoraft.com blog how-install-latest-drush-7-version-so-you-can-use-drush-brand-new-drupal-8",
"Question : I had drush working on my website but recently ive started seeing an error whenever I am inside of the website root . There was a problem acquiring the API key please contact the site administrator . .. . .. . I get this error when running any drush commands on the drupal website however drush works fine for the other websites that are hosted on the same server . Is there quick fix for this problem Thanks Comment : Try to open two instance of your terminal . In the first one type this command to see logs drush ws --tail and run the command which throw your error in the second . You first need to know which module is causing this error by reading logs in the first terminal before debugging . Comment : Thanks for the advice . Turned out it was the Omega theme after it had been updated If you post that as an answer I can accept it and give you the points .. . Answer : Try to open two instance of your terminal . In the first one type this command to see logs drush ws --tail and run the command which throw your error in the second . You first need to know which module is causing this error by reading logs in the first terminal before debugging .",
"Question : null .. . Answer : I have a few drupal sites D6 D7 and D8 to maintain and I use drush to periodically check on them with .. . .. . To get a list of information about the running drupal instance . However for some Drupal sites the information returned is not in English . Is there a way to force drush to use English as default for all output Comment : I tried calling drush locale-check but got an unrecoverable error : locale.d8.drush.inc line 53 using 8.1.2 . Try investigating locale-update and setting the drupal locale setting for your site .",
"Question : null .. . Answer : One one of my sites drush is failing to clear all caches giving the following error : .. . .. . I tried drush cc all command with both drush master 8.x and 7.x versions with the same output for this website . Of course there is no such a file like opt drush 7.x drush drush includes output.inc or such a directory like opt drush 7.x drush drush includes output.inc . The error above refers to file in Drupal s root includes output.inc though for some reason it is appended to drush s path in the error report . Would appreciate if someone could help me troubleshoot this further .",
"Question : When I run my tests : .. . .. . .. . and it finishes I m left with tons of tables in my database . Things like : .. . .. . I know it creates these to run the tests but when its done how do I get rid of them UPDATE .. . .. . Bonus question : Does setup run for each individual test i.e . do modules and everything get enabled every time for each test this takes forever and I can t imagine this is how everyone uses the testing with Drupal .. . Answer : use the below command .. . .. . drush test-clean .. . .. . Here http : www.drushcommands.com drush-7x is all command lists for Drush .. . .. . You will be able to run the individual test . Example comamnd .. . .. . drush test-run --methods .. . .. . Here http : www.drushcommands.com drush-7x test test-run is the list for available test .",
"Question : null .. . Answer : I have drush installed in my system but drush does not work inside vagrant . It works for MAMP though . Here is drush status drush status Drupal version : 7.41 .. . Site URI : http : default .. . Default theme : garland .. . Administration theme : garland .. . PHP configuration : etc php5 cli php.ini .. . Drush version : 5.10.0 .. . Drush configuration : var www project name sites all drush drushrc.php .. . Drush alias files : home vagrant .drush project name.aliases.drushrc.php Drupal root : var www npro docroot .. . Site path : sites default .. . File directory path : sites default files",
"Question : I d like to use drush github.com drush-ops drush . It needs to run in the drupal container . There s also a drush docker repo hub.docker.com r drush drush . But I have no clue how to make it available whithin the drupal container . It s my first docker and drupal project so maybe I m getting things completely wrong . How can I use drush with this drupal docker image https : hub.docker.com drupal Is it possible to manage it with docker-compose Maybe extending the drupal container This is my docker-compose.yml : Comment : I don t understand the question could you provide more information about what you re trying to do Comment : I d like to use drush github.com drush-ops drush https : github.com drush-ops drush . It needs to run in the drupal container . There s also a drush docker repo hub.docker.com r drush drush https : hub.docker.com r drush drush . But I have no clue how to make it available whithin the drupal container . It s my first docker and drupal project so maybe I m getting things completely wrong . Comment : I m in the same situation as @citizen404 . .. . Answer : I think you have two options you could run the drush drush container separately and use a shared hold volume so it has access to the files that drupal is going to use . Or you could build a new image that contains both drush and drupal . See https : docs.docker.com engine userguide containers dockerimages .. . .. . You can probably use the Dockerfile for the drush image and the drupal image as guidance ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
interface
|
UNK_RELATION
|
tamper-data@https@76
|
tamper-data -- tamper-data is a firefox-addon used to view and modify http @placeholder headers and post parameters .
|
{
"confidence": [
56.70470428466797,
56.32572937011719,
55.536842346191406,
51.06074523925781,
47.204322814941406,
42.0530891418457,
39.330101013183594,
37.251617431640625,
36.74996566772461,
27.139482498168945,
26.774215698242188,
26.77277374267578,
26.338359832763672,
25.79007339477539,
25.67483139038086,
24.866069793701172,
24.866069793701172,
24.251117706298828,
24.06018829345703,
23.21753692626953,
22.88072967529297,
22.479354858398438,
21.771495819091797,
20.560060501098633,
19.80527687072754,
19.70166015625,
19.30593490600586,
19.19381332397461,
19.175243377685547,
18.731252670288086,
18.419357299804688,
18.165266036987305,
18.165266036987305,
18.165266036987305,
17.899362564086914,
17.363922119140625,
17.363922119140625,
17.225143432617188,
16.47212791442871,
16.3300838470459,
16.3300838470459,
16.3300838470459,
16.3300838470459,
16.3300838470459,
16.3300838470459,
16.3300838470459,
16.3300838470459,
16.3300838470459,
16.3300838470459,
14.130569458007812,
14.130569458007812,
13.916282653808594,
13.916282653808594,
13.75007438659668,
11.550435066223145,
11.550435066223145,
11.550435066223145,
11.550435066223145,
11.550435066223145,
11.550435066223145,
11.550435066223145,
11.550435066223145,
11.550435066223145,
11.550435066223145,
11.550435066223145,
11.550435066223145,
11.550435066223145,
11.550435066223145,
11.550435066223145,
11.550435066223145,
11.550435066223145,
11.550435066223145,
11.550435066223145,
11.550435066223145,
11.550435066223145
],
"content": [
"I am using a Firefox Extension called Tamper Data Icon Redux https : addons.mozilla.org en-US firefox-addon tamper-data-icon-redux reviews src api .",
"I am using Tamper Data on Firefox .",
"And my customer requested that I test the web app by Tamper Data in Firefox .",
"Tamper Data does this .",
"This extension allows me to quickly launch the Tamper Data extension tool using a button conveniently located on the Firefox toolbar .",
"Tamper Data unfortunately does not have automation or other such features .",
"This question appears to be off-topic because Stack Overflow is not right place to report bugs with the Tamper Data add-on .",
"I found this link : modify the post data of a request in firefox extension http : stackoverflow.com questions 4791598 modify-the-post-data-of-a-request-in-firefox-extension .. . .. . Thanks in advance",
"Is there any way to utilize the functionality of Tamper data or similar plugins for the intercept and replace part",
"I would like to know if it is possible to intercept and modify a post data when the url and some of the variables meet some pattern .",
"ICEfaces can prevent tampering data or something else",
"Did you try to contact the addon author",
"Rewriting post data .. . .. . We still need to implement doSomething and actually rewrite the post data .",
"But it displayed Network Connection Corrupted when I tampered data .",
"some value POST data does not have that e.g .",
"If somebody has some basic firefox-addon example on how to capture the request and maybe do some modification to it it would be great .",
"I have the following form : .. . .. . Then I want to catch the variables values before being submitted inside a firefox-addon observer .",
"An http channel usually implements the nsIUploadStream interface and the upload stream is where the current post data is if any .",
"Constructing the new post data would be a matter of your actual requirements .",
"That s an important detail because I have a code that let me get the post data but it only works if enctype multipart form-data .",
"for example : .. . .. . let the login url be : http : www.someonlineprofiles.com .. . .. . let the post data be : .. . .. . I would like that if : .. . .. . url http : www.someonlineprofiles.com ajax login action url and .. . .. . email [email protected] .. . .. . then theme value be unconditionally changed to : hotdesert .. . .. . Is it possible to create a Firefox add-on for that are add-ons powerful enough for that",
"I m trying to develop an extension to modify certain script loads on the fly in Firefox eg .",
"It s weird man we don t know why you ll have to email the addon author for more help .",
"For reference this icon used to be the same exact size as all the other toolbar icons .",
"When I try to make a change my Firefox stops working this returned to work only once .",
"If you need to fetch some data from the old upload stream you ll need to decode the existing channel.uploadStream as multipart form-data yourself .",
"Yes Firefox add-ons are quite powerful .",
"image showing the absurdly large icon http : i.stack.imgur.com of8gP.png",
"Notice that the form DOESN T have the attribute : enctype multipart form-data .",
"You would have to manually modify it for every request .",
"Please pardon me if this was obvious I m starting out with plugin development for Firefox .",
"I ve migrated a web application from ICEfaces 1.8 to 3.3 .",
"I don t know why",
"Can anybody help me explain that exception or fix it",
"Parsing .. . .. . How exactly you parse the GET style parameters is up to you and discussed in other answers http : stackoverflow.com q 901115 484441 already .",
"enter image description here http : i.stack.imgur.com 4PlUH.jpg",
"Check their homepage http : tamperdata.mozdev.org for more appropriate options .",
"ADDED INFORMATION .. . .. . I don t know if it is interesting to know the version of my Firefox : 35.0.1",
"Given you have a nsIUploadChannel channel you can read the contents of the stream and parse them as-if they where GET parameters e.g .",
"Recently the toolbar shortcut icon size seems to have grown much larger for no apparent reason .",
"Does anyone know why this is so large now or more importantly how to fix it",
"That would be my next step .",
"I planned to see if any Stack Overflow users might have information first .",
"Fixed .",
"Go to about : addons click the gear icon and choose Check for Updates .",
"You should be all set .",
"Let me know if that doesn t work for you .",
"The icon has returned to normal size in the current version .",
"Thanks",
"Can you help me",
"Here is a screen shot : .. . .. .",
"Do only register the http observer once in your add-on : .. . .. . If you re using the SDK then put it into main.js or a dedicated module .",
"I provided a working example in another answer http : stackoverflow.com a 25020668 484441 on how you could do it .",
"Observers .. . .. . First of all it is possible for add-ons to observe and manipulate HTTP S requests before the browser sends the request https : developer.mozilla.org en-US docs Setting HTTP request headers you just need to implement and register what is called a http observer .",
"Start coding",
"but can I use TamperData to make the change only when the login url and some variable meet some patterns .",
"I was trying TamperData but didn t found such option .",
"Thanks .",
"You could make your own add-on that does though .",
"Thank you very much Alexander .",
"Your question borders on being too broad so I will give only an overview on how to do this but not a copy-paste-ready solution which would take a while to create and would also deny you a learning experience .",
"You ll also need to rewrite the code a bit and replace the const . . Components line with a require chrome https : developer.mozilla.org en-US Add-ons SDK Tutorials Chrome Authority .",
"If you re writing a XUL overlay add-on put it into a code module https : developer.mozilla.org en-US docs Mozilla JavaScript code modules .",
"It also has a setUploadStream method which you can use to replace the upload stream entirely .",
"I suggest you check TamperData and similar add-ons on how they do things there .",
"I m sure I have to use : .. . .. . but I have not get a working code so far I m a beginner .",
"I wanna get something like : .. . .. . If you know about some function with the following interface then better : .. . .. . Thank you",
"some value someother thing .",
"Reading .. . .. . Keeping the original upload stream intact .. . .. . There are some things to consider though if you want to have the original .uploadStream still working namely you must not access nsIMultiplexInputStream instances at all these will break and you must check nsISeekableStream and rewind the stream .",
"If you replace the stream with .setUploadStream anyway then these aren t much of a concern and can be ignored .",
"Only thing to remember is that usually GET parsers expect a leading e.g .",
"just some value .",
"building a JSON params file having a fixed file name intercepting it s original load and injecting the custom file in .",
"Or could someone please point to a resource which could help me do the intercepting by myself",
"I solved this myself went with a separate ASP.net project to perform these functions and redirected to generated files using Fiddlercore packages"
]
}
|
{
"confidence": [
66.55147552490234,
62.55501174926758,
53.457191467285156,
52.581748962402344,
48.43819808959961,
33.16613006591797
],
"content": [
"Question : I am using a Firefox Extension called Tamper Data Icon Redux https : addons.mozilla.org en-US firefox-addon tamper-data-icon-redux reviews src api . This extension allows me to quickly launch the Tamper Data extension tool using a button conveniently located on the Firefox toolbar . Recently the toolbar shortcut icon size seems to have grown much larger for no apparent reason . For reference this icon used to be the same exact size as all the other toolbar icons . Does anyone know why this is so large now or more importantly how to fix it image showing the absurdly large icon http : i.stack.imgur.com of8gP.png Comment : Did you try to contact the addon author Comment : That would be my next step . I planned to see if any Stack Overflow users might have information first . .. . Answer : Fixed . Go to about : addons click the gear icon and choose Check for Updates . You should be all set . Let me know if that doesn t work for you . Comment : The icon has returned to normal size in the current version . Thanks",
"Question : null .. . Answer : I am using Tamper Data on Firefox . When I try to make a change my Firefox stops working this returned to work only once . Can you help me Here is a screen shot : .. . .. . enter image description here http : i.stack.imgur.com 4PlUH.jpg Comment : This question appears to be off-topic because Stack Overflow is not right place to report bugs with the Tamper Data add-on . Check their homepage http : tamperdata.mozdev.org for more appropriate options . Comment : It s weird man we don t know why you ll have to email the addon author for more help .",
"Question : I would like to know if it is possible to intercept and modify a post data when the url and some of the variables meet some pattern . for example : .. . .. . let the login url be : http : www.someonlineprofiles.com .. . .. . let the post data be : .. . .. . I would like that if : .. . .. . url http : www.someonlineprofiles.com ajax login action url and .. . .. . email [email protected] .. . .. . then theme value be unconditionally changed to : hotdesert .. . .. . Is it possible to create a Firefox add-on for that are add-ons powerful enough for that I found this link : modify the post data of a request in firefox extension http : stackoverflow.com questions 4791598 modify-the-post-data-of-a-request-in-firefox-extension .. . .. . Thanks in advance ADDED INFORMATION .. . .. . I don t know if it is interesting to know the version of my Firefox : 35.0.1 Comment : Yes Firefox add-ons are quite powerful . Tamper Data does this . Start coding Comment : but can I use TamperData to make the change only when the login url and some variable meet some patterns . I was trying TamperData but didn t found such option . Thanks . Comment : Tamper Data unfortunately does not have automation or other such features . You would have to manually modify it for every request . You could make your own add-on that does though . Comment : Thank you very much Alexander . If somebody has some basic firefox-addon example on how to capture the request and maybe do some modification to it it would be great . Thanks . .. . Answer : Your question borders on being too broad so I will give only an overview on how to do this but not a copy-paste-ready solution which would take a while to create and would also deny you a learning experience . Observers .. . .. . First of all it is possible for add-ons to observe and manipulate HTTP S requests before the browser sends the request https : developer.mozilla.org en-US docs Setting HTTP request headers you just need to implement and register what is called a http observer . Do only register the http observer once in your add-on : .. . .. . If you re using the SDK then put it into main.js or a dedicated module . You ll also need to rewrite the code a bit and replace the const . . Components line with a require chrome https : developer.mozilla.org en-US Add-ons SDK Tutorials Chrome Authority . If you re writing a XUL overlay add-on put it into a code module https : developer.mozilla.org en-US docs Mozilla JavaScript code modules . Rewriting post data .. . .. . We still need to implement doSomething and actually rewrite the post data . An http channel usually implements the nsIUploadStream interface and the upload stream is where the current post data is if any . It also has a setUploadStream method which you can use to replace the upload stream entirely . Constructing the new post data would be a matter of your actual requirements . I provided a working example in another answer http : stackoverflow.com a 25020668 484441 on how you could do it . If you need to fetch some data from the old upload stream you ll need to decode the existing channel.uploadStream as multipart form-data yourself . I suggest you check TamperData and similar add-ons on how they do things there .",
"Question : null .. . Answer : I ve migrated a web application from ICEfaces 1.8 to 3.3 . And my customer requested that I test the web app by Tamper Data in Firefox . But it displayed Network Connection Corrupted when I tampered data . I don t know why ICEfaces can prevent tampering data or something else Can anybody help me explain that exception or fix it",
"Question : I m trying to develop an extension to modify certain script loads on the fly in Firefox eg . building a JSON params file having a fixed file name intercepting it s original load and injecting the custom file in . Is there any way to utilize the functionality of Tamper data or similar plugins for the intercept and replace part Or could someone please point to a resource which could help me do the intercepting by myself Please pardon me if this was obvious I m starting out with plugin development for Firefox . .. . Answer : I solved this myself went with a separate ASP.net project to perform these functions and redirected to generated files using Fiddlercore packages",
"Question : I have the following form : .. . .. . Then I want to catch the variables values before being submitted inside a firefox-addon observer . Notice that the form DOESN T have the attribute : enctype multipart form-data . That s an important detail because I have a code that let me get the post data but it only works if enctype multipart form-data . I m sure I have to use : .. . .. . but I have not get a working code so far I m a beginner . I wanna get something like : .. . .. . If you know about some function with the following interface then better : .. . .. . Thank you .. . Answer : Given you have a nsIUploadChannel channel you can read the contents of the stream and parse them as-if they where GET parameters e.g . some value someother thing . Reading .. . .. . Keeping the original upload stream intact .. . .. . There are some things to consider though if you want to have the original .uploadStream still working namely you must not access nsIMultiplexInputStream instances at all these will break and you must check nsISeekableStream and rewind the stream . If you replace the stream with .setUploadStream anyway then these aren t much of a concern and can be ignored . Parsing .. . .. . How exactly you parse the GET style parameters is up to you and discussed in other answers http : stackoverflow.com q 901115 484441 already . Only thing to remember is that usually GET parsers expect a leading e.g . some value POST data does not have that e.g . just some value ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
https
|
UNK_RELATION
|
aptana@javascript@119
|
aptana -- aptana studio development-environment is a free open-source gpl application designed to edit and debug html @placeholder css ruby php and python web apps .
|
{
"confidence": [
50.743167877197266,
48.604896545410156,
45.882755279541016,
45.64213562011719,
42.33303451538086,
42.03765869140625,
41.69215774536133,
41.668907165527344,
41.668907165527344,
41.60511779785156,
41.53351974487305,
41.03636932373047,
41.00326156616211,
41.00326156616211,
40.854209899902344,
40.82750701904297,
40.63134765625,
40.63134765625,
40.37775421142578,
40.330753326416016,
40.230560302734375,
40.066307067871094,
39.9281005859375,
39.643516540527344,
39.643516540527344,
39.643516540527344,
39.56267166137695,
38.96192169189453,
38.86503219604492,
38.507286071777344,
38.502315521240234,
38.502315521240234,
38.502315521240234,
38.502315521240234,
38.502315521240234,
38.502315521240234,
38.502315521240234,
38.502315521240234,
38.079524993896484,
38.079524993896484,
38.079524993896484,
38.079524993896484,
38.079524993896484,
38.079524993896484,
38.0675163269043,
37.898902893066406,
37.599124908447266,
37.464752197265625,
37.464752197265625,
37.39622116088867,
37.39622116088867,
37.35795974731445,
37.15999984741211,
37.02251434326172,
36.95590591430664,
36.95590591430664,
36.35866165161133,
36.22121047973633,
36.22121047973633,
36.22121047973633,
36.180870056152344,
35.987247467041016,
35.88520812988281,
35.811798095703125,
35.79841995239258,
35.79841995239258,
35.67850875854492,
35.6177978515625,
35.3355598449707,
35.140445709228516,
34.9975700378418,
34.9975700378418,
34.95996856689453,
34.87907028198242,
34.87907028198242,
34.87907028198242,
34.87907028198242,
34.87907028198242,
34.87907028198242,
34.87907028198242,
34.87907028198242,
34.87907028198242,
34.80863952636719,
34.7674446105957,
34.674800872802734,
34.674800872802734,
34.38467788696289,
34.18935775756836,
34.11359405517578,
33.84150695800781,
33.84150695800781,
33.84150695800781,
33.84150695800781,
33.84150695800781,
33.84150695800781,
33.84150695800781,
33.7540283203125,
33.62986373901367,
33.57065200805664,
33.55451202392578
],
"content": [
"Open up Aptana Studio .. . 2 .",
"Is there a similar thing for debugging ruby apps in Aptana 3",
"The folder is named Aptana Studio 3.6.0 .",
"Aptana is a PHP IDE .",
"You should be able to open those files in Aptana for source editing .",
"Aptana Studio 3 for Rails work .",
"Does anyone know how to make Aptana Studio ignore CSS expressions",
"is it possible to use Region code for JavaScript in Aptana Studio",
"Does Aptana Studio 3 beta Supporting jQuery",
"i am using ruby-debug-ide with Aptana Studio 3 build : 3.4.1.201306062137 .",
"Is there a CSS editor for Aptana or Eclipse that supporting CSSEdit groups",
"Aptana Beta link-to add to Available Software Sites on Aptana : http : preview.appcelerator.com aptana studio3 standalone update beta .. . .. . Upgrade to Aptana 3.6.1 .",
"What you say Aptana ar you just referring to Aptana Studio the IDE",
"I can t see Aptana perspective after install Aptana Studio 3 plug-in version in Eclipse 13.7 Indigo .",
"I am new to both python and Aptana .",
"My project is an Aptana Web project .",
"I am using Aptana Studio 3.0.9 Standalone .",
"I m using Aptana Studio 3 and Eclipse 3.7 .",
"I use Aptana Studio 3 for my web development and I love it except for a few small gripes .",
"I want to use Aptana Studio 3 Beta for all my Ruby developments .",
"I installed Python 3.5.1 64 and Aptana Studio 3 and made sure that Aptana see the python interpreter by going to window - preferences - PyDev - Interpreter - Python Interpreter - New and I added all the required files .",
"Aptana then correctly completes the install .",
"Jaxer and Aptana Studio do not yet have the ability to debug remote scripts from the client-side .",
"using FxRuby framework but how to integrate this framework with Aptana Studio 3",
"In Appcelerator create a new folder named Aptana Studio without the quotation marks .",
"When I checked in the directory the Aptana Studio folder was already there .",
"I m using eclipse with the aptana plugin because of the good code hinting for html css php and js .",
"Updated way for Aptana Studio 3 stackoverflow.com questions 4721124 http : stackoverflow.com questions 4721124 how-to-enable-jquery-support-in-aptana-studio-3",
"I installed ruby-1.9.1 with ruby installer and also installed devKit and Aptana studio 3 .",
"I m trying to get into Rails development and am using Aptana Studio RadRails as a plugin to Eclipse WinXP .",
"It works fine in the preview in Aptana .",
"Not sure if it will work with Aptana though .",
"Can Aptana behave like this",
"Is all this possible with Aptana",
"Script Coding using Aptana.. .",
"I m using aptana with MercurialEclipse .",
"I ve tried VJET and aptana .",
"Installation of Aptana was not completed .",
"When I m installig Aptana Studio 2 everything is ok.. .",
"Is there any way to disable code assist in Aptana Studio 3",
"It can be turned off in Windows by going to Window - Preferences - Aptana Studio - Editors .",
"How Can I Enable jQuery In Aptana Studio 3 beta",
"I m trying to install Aptana Studio 3 version : 3.6.1 .",
"Aptana Studio 3.6 doesnt work with the newest version of node.js .",
"I read people talking about how they like to have smarty support in Aptana 3 as in Aptana 2 but i don t find it even for Aptana 2",
"I copied the file to AppData Roaming Appcelerator Aptana Studio installer nodejs windows.msi but next Aptana installation trial failed with the same error message .",
"i thinks i saw this feature in Aptana 2 but it was remove from Aptana 3 i don t know why .",
"I will try to work on Aptana",
"Help Install Aptana Features .",
"After installing Aptana Studio 3 I now have TWO Web perspectives each with a different icon .",
"I ve written some lines of JS code with Aptana Studio 3 Web project and tried out-sourcing .",
"I am running python-2.7 through Aptana software .",
"Aptana AJAX Code Assist Settings http : i.stack.imgur.com A7Oeq.png .. . .. . Switch to the Aptana Perspective .. . .. . If you just installed the Aptana plugin and are trying to get this to work you ll have to make sure you re using the Aptana Perspective to utilize the AJAX library Code Assist feature : .. . .. . Using Eclipse PDT with Aptana Plugin .. . .. . I installed the Aptana plugin to Eclipse PDT and the jQuery Code Assist worked fine once I realized that I was still using the PDT PHP Perspective instead of the Aptana Perspective .",
"EDIT Does Aptana or its editors allow for custom code-folding limits",
"Can Aptana be made to behave in this way",
"Is it possible to add new charset to Aptana",
"The problem is about configuring Apache Tomcat as External Web Server for preview in Aptana Appcelerator Studio",
"I restarted Aptana .. . 2 .",
"Where my aptana people at",
"I ll go with the Aptana standalone .",
".. . .. . Response to comments : .. . .. . I get the error in the IDE apatana Studio 3 .. . .. . Aptana uses PyDev http : pydev.org manual 101 install.html note-for-users-with-aptana-studio-3-beta and so will exhibit the same problem .",
"The bottom line is that Sublime Text does not appear to be running in the same environment as it is in Aptana Studio .",
"1 Verify that your project is a PHP project Project - Properties - Project Natures have Aptana PHP nature checked there PHP .",
"I use the Aptana IDE which is based on Eclipse for my php development and I use the outline feature a lot .",
"Aptana Studio plugin for Eclipse http : www.aptana.com products studio3 download .",
"Convert the Visual Studio Intellisense Helper into a format Aptana can understand .",
"If I install Aptana plugin then it worked with same css editor .",
"I installed the WordPress bundle ruble for Aptana Studio https : github.com aptana wordpress.ruble but it s only providing code assistance for a subset of WordPress functions .",
"I remember Eclipse has an option to do this in Java and it was pretty helpful.How about for Python in PyDev Aptana Studio 3",
"My Ruby IDE is Aptana 3 and the Ruby versio is 1.8.7 .. . .. . Can anyone please help me here",
"I can t figure out how to install features either in Aptana or in Eclipse after installing the Aptana Eclipse Plugin .",
"I ve read that I should go to Help Install Aptana Features in both Eclipse and Aptana .",
"I m trying to debug some server-side JavaScript code running in Aptana Jaxer and I m not having any success .",
"Aptana has lost this feature or I can not find it",
"Seems like no Smarty in Aptana 3 yet .",
"I just updated my Aptana Studio3 .",
"Note that this is an issue only in the Aptana-provided version of PyDev .",
"Performing a clean Aptana reinstall had fixed this for me .",
"Does not work either with Aptana 3.5 and above .",
"I m on Aptana 3.0.9.201202141038 Just updated it today .",
"How do you work with mass JS in Aptana",
"aptana looks very nice but is running kind of slow .",
"Aptana studio 3 won t finish installing because it can t download the node.js msi file .",
"My Rails development IDE is Aptana Studio http : aptana.com 3.0.5 running on Windows .",
"Using eclipse MARS with Aptana plug-in",
"Select the Aptana plugin and press uninstall .",
"I m trying to debug a PHP page in Aptana 3.3.1 but I keep getting the following error message : .. . .. . Clicking here doesn t do anything .",
"@DSM Reading between the lines a little I think it s a bug in Aptana Studio not Tweepy Aptana reports an error and highlights get user in red even though there is nothing actually wrong with the code .",
"Install Aptana Plugin before PDT .. . .. . Sirokov pointed out that he was unable to get the Code Assist to work with PDT and Aptana Plugin unless he installed the Aptana Plugin first and then installed PDT second .",
"I don t see .apk mentioned anywhere in Aptana .",
"Then I ve create a new server in Eclipse Aptana .",
"But of course as seems to be the case with Aptana it doesn t work .",
"and how can i use --no-ff in the aptana plugin",
"When I switched to the Aptana Perspective it started working .",
"whether in Aptana itself or eclipse its the same .",
"I m using the current 3.0beta aptana eclipse-plugin",
"As there are some significant drawbacks while coding JS in Aptana and some says Aptana browser version support is not worth trusting .",
"The Aptana installer creates a folder in User name AppData Roaming Appcelerator .",
"I upgraded Aptana and PyDev with the following instructions : .. . .. . Update PyDev on Aptana http : stackoverflow.com a 25971061 4150548 .. . .. . after the upgrade PyDev worked just fine for me :",
"I am new to ruby and Aptana I have used eclipse before I was wondering if when debugging in Aptana we can drop into irb to play around with things with current values set ."
]
}
|
{
"confidence": [
58.662864685058594,
57.618019104003906,
57.54057693481445,
57.5269775390625,
56.464324951171875,
56.201847076416016,
55.824951171875,
55.41483688354492,
54.87218475341797,
54.328407287597656,
54.19401931762695,
53.29039764404297,
53.270843505859375,
53.02527618408203,
51.41130828857422,
51.251251220703125,
50.879539489746094,
50.66205596923828,
49.851959228515625,
49.280269622802734
],
"content": [
"Question : i am using ruby-debug-ide with Aptana Studio 3 build : 3.4.1.201306062137 . Rails 3.2.13 .. . .. . ruby 1.9.3p392 2013-02-22 i386-mingw32 .. . .. . ruby-debug-ide 0.4.17 ruby-debug-base19x 0.11 .. . .. . Sometimes very often when i refresh web browser aptana server is runing in debug mode server crashes with error : .. . .. . How to fix debugger .. . Answer : Using another web server solves this problem . Add gem thin to your gem file and run bundle install .",
"Question : So for the last few weeks ive been reading posts on SO and other sites about Ruby IDE s especially for support with Ruby 1.9 . Aptana RadRails plugin looks amazing as im very used to the eclipse environment so I thought id give it a try . I installed ruby-1.9.1 with ruby installer and also installed devKit and Aptana studio 3 . However I cant debug in Aptana as I get the following error : .. . .. . So i tried to do a gem install ruby-debug-ide and get the following : .. . .. . It appears to be ridiculously difficult to get a decent IDE with ruby-1.9 support with a functioning debugger - I am clearly doing it wrong any help would be appreciated . -----EDIT----- .. . .. . Output of c : Ruby191 lib ruby gems 1.9.1 gems ruby-debug-ide-0.4.16 ext gem make.out below .. . .. . Aly .. . Answer : One thing you might want to do is include the path to your rdebug-ide file this is a file without an extension in your Path env variable . Although this might be a hack it worked for me . Mine was located at : C : RailsInstaller Ruby2.0.0 lib ruby gems 2.0.0 gems ruby-debug-ide-0.4.22 bin .. . .. . It may be in a different location if you didn t use RailsInstaller . You also need to ensure that your GEM HOME variable is pointing to the proper location . Hope this helps",
"Question : So for the last few weeks ive been reading posts on SO and other sites about Ruby IDE s especially for support with Ruby 1.9 . Aptana RadRails plugin looks amazing as im very used to the eclipse environment so I thought id give it a try . I installed ruby-1.9.1 with ruby installer and also installed devKit and Aptana studio 3 . However I cant debug in Aptana as I get the following error : .. . .. . So i tried to do a gem install ruby-debug-ide and get the following : .. . .. . It appears to be ridiculously difficult to get a decent IDE with ruby-1.9 support with a functioning debugger - I am clearly doing it wrong any help would be appreciated . -----EDIT----- .. . .. . Output of c : Ruby191 lib ruby gems 1.9.1 gems ruby-debug-ide-0.4.16 ext gem make.out below .. . .. . Aly .. . Answer : What are the contents of gem make.out mentioned in the output For Ruby 1.9.x you need ruby-debug-ide19 since it works with 1.9.x versions of Ruby . Also you need a compiler . If you re using RubyInstaller releases you need to obtain RubyInstaller Development Kit listed in the downloads http : rubyinstaller.org downloads page .. . .. . Please read the text in that page and the Development Kit instructions http : github.com oneclick rubyinstaller wiki Development-Kit in our wiki . EDIT : Based on the lack of content of your gem make.out file since it shouldn t say anything about building extensions I would recommend you look at RubyInstaller Troubleshooting https : github.com oneclick rubyinstaller wiki Troubleshooting page in our wiki . Comment : I already have DevKit installed and tried doing gem install ruby-debug-ide19 and go the same error I have edited the question to add the contents of gem make.out Comment : Seem my updated response your gem make.out do not contain anything like it normally would which could indicate something is not right in your environment . Are you trying to install from the console Did DevKit installed properly Can you verify the Troubleshooting page and post something to RubyInstaller group in case nothing there is in your environment Comment : Also please paste the output of gem make.out of ruby-debug-ide19 and ruby-debug19 since that is the correct version for your installation of Ruby",
"Question : So for the last few weeks ive been reading posts on SO and other sites about Ruby IDE s especially for support with Ruby 1.9 . Aptana RadRails plugin looks amazing as im very used to the eclipse environment so I thought id give it a try . I installed ruby-1.9.1 with ruby installer and also installed devKit and Aptana studio 3 . However I cant debug in Aptana as I get the following error : .. . .. . So i tried to do a gem install ruby-debug-ide and get the following : .. . .. . It appears to be ridiculously difficult to get a decent IDE with ruby-1.9 support with a functioning debugger - I am clearly doing it wrong any help would be appreciated . -----EDIT----- .. . .. . Output of c : Ruby191 lib ruby gems 1.9.1 gems ruby-debug-ide-0.4.16 ext gem make.out below .. . .. . Aly .. . Answer : I had a similar issue : could not debug and also could not run a file with a require of a file in the folder . I rolled back by Ruby installation to 1.87 and all is working . Apologies in advance if you really need 1.9x .",
"Question : I can t see Aptana perspective after install Aptana Studio 3 plug-in version in Eclipse 13.7 Indigo . The plug-in is installed but i can t choose aptana perspective in Eclipse.. . When I m installig Aptana Studio 2 everything is ok.. . Comment : Please accept the answer or tell why it don t cover your question . .. . Answer : In Studio 3 it s called Web perspective . Comment : After installing Aptana Studio 3 I now have TWO Web perspectives each with a different icon . Once I selected the icon with the X in it I was able to do Open With.. . JAVASCRIPT SOURCE EDITOR as opposed to the Eclipse built-in JAVASCRIPT EDITOR . Now content-assist seems to MOSTLY work .",
"Question : So for the last few weeks ive been reading posts on SO and other sites about Ruby IDE s especially for support with Ruby 1.9 . Aptana RadRails plugin looks amazing as im very used to the eclipse environment so I thought id give it a try . I installed ruby-1.9.1 with ruby installer and also installed devKit and Aptana studio 3 . However I cant debug in Aptana as I get the following error : .. . .. . So i tried to do a gem install ruby-debug-ide and get the following : .. . .. . It appears to be ridiculously difficult to get a decent IDE with ruby-1.9 support with a functioning debugger - I am clearly doing it wrong any help would be appreciated . -----EDIT----- .. . .. . Output of c : Ruby191 lib ruby gems 1.9.1 gems ruby-debug-ide-0.4.16 ext gem make.out below .. . .. . Aly .. . Answer : I also had these build issues when using ruby 1.9.3.See my answer here : Ruby-debug not working - Stack Overflow http : stackoverflow.com a 9260206 889617 .. . .. . It s about getting Ruby debugging to work with the following setup .. . .. . Mac OS X Lion 10.7.2 .. . Aptana Studio 3 Build 3.0.8.201201201658 .. . Using rvm in my project working directory I have a .rvmrc stating : .. . .. . rvm use ruby-1.9.3-p0@mygemset .. . .. . .. . I hope this helps -- Freddy",
"Question : I am split between the benefits of developing Java non-commercial webapps and deploying to something like Aptana or Google cloud or just going with a Slice Host account . Tomcat or Jetty and MySQL are really my only big requirements . Aptana and Google App Engine come with some cool Eclipse deployment options but does scalability really matter without a large user base for the apps Also both Aptana and Google App Engine seem to be in infant stages so I m wondering if there will be too many restrictions even for small time development . Anyone have experience with these .. . Answer : I can t speak to Aptana but Google App Engine is a radically different development experience from what you ll get with something like Slicehost . It scales differently i.e . you ve got the possibility of handling much larger loads but it s also totally different than running your own web app server e.g . Glassfish Tomcat JBoss etc . and coding using standard Java tools . With Slicehost or any hosted solution it s easy to setup your own development-environment locally which exactly mimics what you ll be running on the server . Same software same VM maybe even the same version of Linux . You could even move to a different host and still be able to setup that same environment . With Google App Engine you ll find yourself building on an emulator you don t really run BigTable locally so there s not a one-to-one correspondence between your environment and that on the server . There s no alternative place to move to and still be running in the same environment either . Also some perhaps many of the popular Java frameworks you might use for a web app development will either not work at all e.g . or will not work out-of-the-box see here for more details http : groups.google.com group google-appengine-java web will-it-play-in-app-engine . I m not down on the App Engine in fact I think it s really cool . If the demand for your apps is relatively low and therefore you re not in need of the huge scaling requirements but your traffic is not so low that you fit comfortably within the free allowance at Google then I would probably lean towards a hosted solution like Slicehost instead . Comment : I m slowly trying to write a java app on App Engine and your points are spot on . Your choice of frameworks is currently pretty limited which is the biggest drawback for me . I have yet to try to upload my app to their servers so I can t speak to the difference in environment but I would hope they would be similar enough to catch the vast majority of issues . I ll keep going because I suspect my traffic will be small enough to be free for a very long time .",
"Question : I am new to ruby and Aptana I have used eclipse before I was wondering if when debugging in Aptana we can drop into irb to play around with things with current values set . For example doing Java dev in eclipse on a breakpoint you can open Window - Show View - Display and start executing Java code with all objects having their current state . Is there a similar thing for debugging ruby apps in Aptana 3 Thanks .. . Answer : This feature wasn t implemented in Studio 3.0 but is scheduled for 3.0.2 . Here s the ticket for the work : https : aptana.lighthouseapp.com projects 35272 tickets 2122-port-display-view-fro-ruby-debugging-from-radrails-2x .. . .. . You can try it out via our nightly builds . See here for the instructions on getting that : http : wiki.appcelerator.org display tis Changing+the+Update+Type",
"Question : null .. . Answer : I am new to python I have a windows-7 64 bit OS . I installed Python 3.5.1 64 and Aptana Studio 3 and made sure that Aptana see the python interpreter by going to window - preferences - PyDev - Interpreter - Python Interpreter - New and I added all the required files . Now I am trying some scripts written from a book in a single python file through the Aptana Studio 3 whenever I press the run button it keeps giving me this message : .. . .. . The selection cannot be launched and there are no recent launches . I tried going to window - preferences - Run Debug - Launching - Launch operations - selected launch the selected resource or active editor .. . .. . I tried promoting the file into a project and it did not work . it just kept asking me for java script and installing firefox I am new to python I open aptana and copy-paste some code in a new file save it and try to run it to learn the language that s all . Is there a problem doing this without creating a project Any idea how to fix this error",
"Question : I want to use Aptana Studio 3 Beta for all my Ruby developments . I am planning to write a Windows appl . using FxRuby framework but how to integrate this framework with Aptana Studio 3 .. . Answer : I m not 100 sure I understand what exactly you re looking for here . Studio 3 will index your ruby core std lib and gems installed on whatever version fo Ruby is on your PATH . It uses that index to generate code assist . As long as you have the fxRuby libraries built and installed into your system we should pick up the ruby API and offer code assist for you . Here s the relevants ection of fxRuby s wiki on building their library on windows : https : github.com lylejohnson fxruby wiki Setting-Up-a-Windows-Build-Environment .. . .. . I will say a word of caution : installing building and generally dealing with Ruby binaries on Windows is a difficult task unless you re comfortable with MinGW .",
"Question : I want to install Aptana 3 on my machine . I ve got Flex Builder 3 I think that I ve got the standalone version but I m not sure . Both of them are Eclipse based . I don t want to cause a problem with either installation . Which version of Aptana should I download-- the standalone or plugin version How can I tell which version of Flex Builder 3 I ve got I m on a Mac . .. . Answer : Personally I have a standalone Aptana Studio 3 and a standalone Flash Builder 4 I had standalone versions of Flex Builder 3 and Aptana 3 before . I find that I prefer multiple standalone versions of Eclipse products because I see a degradation of performance in Eclipse and Eclipse-based IDEs when I load too many plugins into one . FWIW I have the following on my main system also a Mac : .. . .. . Eclipse Standalone 3.6 with Amazon Web Services ColdFusion CFEclipse and Java-related plug-ins for Java CFML project Aptana is installed as a plugin here for the occasional HTML CSS JavaScript work with these projects . Aptana Studio 3 for Rails work . Titanium Studio 1 for mobile development .. . Flash Builder 4 for when I have to do Flex crap . I know it might seem odd to have 4 IDEs at the moment I use Aptana and Titanium almost exclusively as my current workload is Rails and mobile development but I find that all four run GREAT as is and when I start conflating plugins and features I see degraded performance . I hope this helps a little Comment : Hi Craig Cool . Thanks for the help . I ll go with the Aptana standalone . Comment : Sweet Glad it helped out Laxmidi . Good luck with it :",
"Question : I m a newbie in Javascript Programming . But I should be an expert . + and newbie in English Language also . .. . .. . Nowadays I got the assignment that I should make the company standard framework for web programmers . From my search results I think.. . Maqetta is suitable for UI Design Draft and.. . Aptana is suitable for JavaScript Programming . It s just my thought . and I m considering jQuery+jQueryUI+a.. . as Library Bases . So I ll set the standard IDE like this form : Eclipse + Maqetta Plugin + Aptana Plugin + jQuery +a Libraries. . for my Web Programmers . and Rough steps for programming are 1 . UI Designing using Maqetta.. . 2 . Script Coding using Aptana.. . Though I m a beginner for JavaScript but I have the duty on my Web Programmers I wanna ask for comments about this set-up . Is it possible Is it Not-Bad Is it Useful Thank you in advance.. . .. . Answer : Jon Ferraiolo answers on maqetta-users : .. . .. . The best way I can think of to use Maqetta and Aptana together would be to download Maqetta to run locally http : maqetta.org downloads and run it locally which will cause Maqetta to save the HTML CSS JS file it creates on your local file system.Then you could open any of those files using Aptana for source editing . .. . The ZIP file contains a README file inside with instructions . .. . When you install Maqetta locally into installfolder and run Maqetta from a browser for the first time it will create a installfolder maqetta users . You should see a single folder a . That s where Maqetta saves the files you create . You should be able to open those files in Aptana for source editing . Note that if you create multiple-projects via the New Project command each new project will get its own folder e.g . b c etc . Unfortunately there is no easy way to tell which of these folders map to which project except visual inspection .",
"Question : My Rails development IDE is Aptana Studio http : aptana.com 3.0.5 running on Windows . The applications runs on Apache + ModRails http : www.modrails.com Phusion Passenger on a separate CentOS Linux machine . I have both Rails 2.x and 3.x applications . I would like to be able to use the debugger in Aptana Studio connect to the running application remotely . There are apparently some provisions for this but I was unable to figure out what I need on the server-side in my Rails application configuration .. . .. . I ve tried this : .. . .. . 1 . Using Rack : : Debug : It creates only unix-socket cannot be connected remotely . 2 . Using ruby-debug directly : .. . .. . I added this to my config environments development.rb : .. . .. . Sprinking my code with debugger statements stop the execution but I cannot connect to this instance from Aptana not to port 5000 and not port 5001 and I don t understand why I need two ports there . Also this method would be rather slow and too convoluted even if it worked I d like to have a more integrated debugging . Is it possible at all .. . Answer : The old steps for Netbeans are relatively close since Aptana RadRails and Netbeans share the same debugger core : http : blogs.oracle.com martink entry remote debugging debug whatever ruby .. . .. . Basically run the ruby app using rdebug-ide -p 7000 or whatever port you want then inside the IDE go to Run Debug configurations . On the left hand side select Remote Ruby Debug Session and then add a new configuration there the plus icon above the list . Enter the proper host IP name and port you entered on the command-line .",
"Question : My code is neatly organized in CSSEdit groups but the others in my team use Aptana or other tools . Is there a CSS editor for Aptana or Eclipse that supporting CSSEdit groups EDIT Does Aptana or its editors allow for custom code-folding limits That would be already great . Thanks . .. . Answer : Definitely not Aptana and not any editor for Eclipse I know of since it s a very CSSEdit-specific feature . It sounds somewhat similar to the region functionality in Visual Studio though that generally does not show a folder hierarchy . I would suggest adding a feature request for Aptana at http : jira.appcelerator.org browse APSTUD",
"Question : I installed the WordPress bundle ruble for Aptana Studio https : github.com aptana wordpress.ruble but it s only providing code assistance for a subset of WordPress functions . I d like code assistance for all WordPress core functions or as many as possible . My projects have PHP as their nature and are connected via SFTP to remote WordPress installations . After the bundle which hasn t been updated in over a year didn t provide everything I was looking for I tried using a local copy of WordPress as an external library then adding it as an external directory to the PHP Buildpath . Neither one added any more functions than the bundle provided . These actions were suggested in Aptana Studio Support https : aptanastudio.tenderapp.com discussions questions 969-can-aptana-3-do-code-assist-for-wordpress-projects and WordPress Answers http : wordpress.stackexchange.com questions 27063 aptana-wordpress-code-hinting . Am I doing something wrong or is the level of code assistance I m looking for not available .. . Answer : It s true that the WordPress bundle offers just some limited auto-completion support . Though including the local copy of another WordPress installation as a PHP external library seemed to solve this in the latest Aptana Studio version 3.4.0 as you already mention to have tried and as it is suggested in this one https : wiki.appcelerator.org display tis PHP+Development PHPDevelopment-AttachingPHPResources of the links that you pointed out . Here are all the specific steps I took so you can check if there was something different in the procedure you followed . Open the Preferences menu going to Window Preferences .. . Select Aptana Studio Editors PHP Libraries .. . Click New user library .. . Add the path to another local WordPress installation not the same WordPress files in the current project selecting the root folder of a freshly extracted WordPress download e.g . : C : wordpress-3.5.1 wordpress .. . Make sure the new library is selected in the user libraries list marking it with a checkmark next to the library icon . Apply the changes and press OK .. . Make sure your project is a PHP project . Right click the project folder select Properties Project Natures and mark the PHP checkbox . Now inside PHP code I get autocompletion suggestions for all core WordPress functions - and I can even go to check their source by pressing F3 on their function name . Comment : Thanks for your reply E . Serrano . Unfortunately that doesn t seem to have worked for me . I added the library and Aptana showed that it indexed it but I still don t get auto-complete for the majority of WordPress functions . I tested by opening an existing theme template file and typing various functions from the Codex Function Reference http : codex.wordpress.org Function Reference . I don t know what I m missing . Comment : It s amazing . I closed the project I was working on and after opening a new project the WordPress-related auto-completion is gone The right library is still imported there but I m experiencing the same issue you were mentioning . I ve tried adding the library again importing a different version deselecting the working set etc . with no luck . Comment : I realized autocompletion doesn t work in Aptana projects set only as Web Project . But it does work when configured as PHP projects . So you can have full WordPress code auto-completion in Aptana following the aforementioned steps and adding the PHP project type for that specific project right-click on an existing project Properties Project Natures Check PHP . A little P will appear on your open project folder and PHP code assist will use the included WordPress libraries from now on . Comment : My projects are already set to PHP projects but I still only get auto-completion for a few functions tested by opening an existing theme template file and typing various functions from the Codex Function Reference http : codex.wordpress.org Function Reference . Comment : Is PHP the Primary nature of the project Do you also have the Web project nature assigned to that project Alternatively have you tried assigning the source WordPress directories as External Directories in the PHP Buildpath tab inside Project Properties",
"Question : I am new to both python and Aptana . I am trying to use the tweepy package in python . I have the following code from python s site http : packages.python.org tweepy html getting started.html : .. . .. . I get an Undefined variable from import : get user . The code actually runs fine with no errors and produces the expected results . I googled and found http : mitchfournier.com 2010 06 18 aptana-studio-and-undefined-variable-from-import-doesnotexist how to resolve the undefined variable error but it seems like a hack-a-round . In sum that link says to add get user to globals in the preferences . Being new to both Python and Aptana I just wanted to check to see if that is the best way to resolve it....it just seems like a hack . When I change tweepy.api.get user to tweepy.api.public timeline I get the same error and thus will have to manually add public timeline to the globals....It doesn t seem like the correct way when you have to manually configure each variable . thanks Comment : @DSM Reading between the lines a little I think it s a bug in Aptana Studio not Tweepy Aptana reports an error and highlights get user in red even though there is nothing actually wrong with the code . Comment : @JasonOrendorff : ah I see . Comment : @DSM...that s kind of what I think but being a newb wanted to check . Why doesn t Aptana do the same thing w other packages btw I am using tweepy version 1.1 .. . Answer : I had a Problem similar to your case also using PyDev with Aptana . I upgraded Aptana and PyDev with the following instructions : .. . .. . Update PyDev on Aptana http : stackoverflow.com a 25971061 4150548 .. . .. . after the upgrade PyDev worked just fine for me : Comment : Whilst this may theoretically answer the question it would be preferable http : meta.stackoverflow.com q 8259 to include the essential parts of the answer here and provide the link for reference .",
"Question : I can t figure out how to install features either in Aptana or in Eclipse after installing the Aptana Eclipse Plugin . Specifically I want to install the jQuery Code Assist feature . I ve read that I should go to Help Install Aptana Features in both Eclipse and Aptana . Well this menu item doesn t exist in either . When I go to Help in Aptana the only options are : Check for Updates and Install new software . Same goes for Eclipse . I m using Aptana Studio 3 and Eclipse 3.7 . Comment : So I eventually found this link : Comment : So I eventually found this link : download.aptana.org tools studio plugin install frameworks http : download.aptana.org tools studio plugin install frameworks . But of course as seems to be the case with Aptana it doesn t work . I get the following message : Missing requirement : Aptana Support for jQuery 1.4.2.00001 com.jquery.1.4.feature.group 1.4.2.00001 requires com.aptana.ide.snippets 0.0.0 but it could not be found . Searching around for that I found an Aptana posting from 2010 saying they don t support feature updates : aptanastudio.tenderapp.com discussions problems https : aptanastudio.tenderapp.com discussions problems 1852-aptana-3cant-install-jquery-plugin . .. . Answer : The process has changed . Instead you drop a library API file into your project : .. . .. . http : wiki.appcelerator.org display tis Using+JavaScript+Libraries Comment : when you drop a library file in at least with the Eclipse Aptana 3.0 plugin it doesn t work well . The only way to get the code-assist to come up is if you do something like test .add and then hit backspace and delete the last two d s and then you get the jQuery Code-Assist to appear . On top of that compared to Aptana 2.0 the code assist snippets that explain what the function does are completely useless and look like gibberish . There is no text explanations just what seem like regex expressions within the functions . Aptana 3.0 is broken and would recommend people just use 2.0 . Comment : I can t replicate what you are seeing . 1 I download the linked .sdocml file into my project 2 I type and I immediately get code hinting . I get the same after typing test . You may have downloaded the jQuery ruble which includes snippets that will behave like you describe i.e . .add 1 : selector elements html 0 . Snippets insert chunks of code and serve a different use-case . There is currently an issue with chaining snippets in jQuery which is encapsulated in this ticket : jira.appcelerator.org browse APSTUD-2445 http : jira.appcelerator.org browse APSTUD-2445 Comment : The .sdocml I used was the one listed on the page you provided above . The link on that page is : raw.github.com aptana javascript-jquery.ruble master support https : raw.github.com aptana javascript-jquery.ruble master support jquery.1.4.2.sdocml . Is that not the right link Is there a non-ruble .sdocml link Comment : That is the correct file . I did have an issue with the first time I tried it because it saved it as a .html file accidentally . Once I fixed that it worked . It sounds like either a bug or a mis-configuration . Can you file a ticket @ jira.appcelerator.org browse APSTUD http : jira.appcelerator.org browse APSTUD and someone will take a look Comment : I struggled with Aptana Studio 3.0 a lot too after upgrading from 2.0 . It seems that a lot of features don t work out-of-the-box anymore and need manual tweaking . Anyway make sure your project has at least the Web nature . Right-click your project in Project Explorer select Properties go to the Project Natures property and make sure Web is checked . It will ask you to close and re-open the project in Eclipse . You might find a lot of things working better after that . Good luck",
"Question : I am new to ruby and Aptana I have used eclipse before I was wondering if when debugging in Aptana we can drop into irb to play around with things with current values set . For example doing Java dev in eclipse on a breakpoint you can open Window - Show View - Display and start executing Java code with all objects having their current state . Is there a similar thing for debugging ruby apps in Aptana 3 Thanks .. . Answer : If you want to start an IRB session at runtime try Pry http : github.com banister pry . Also Check out the blog post http : banisterfiend.wordpress.com 2011 01 27 turning-irb-on-its-head-with-pry",
"Question : How would I be able to create a new .php or .html examples in Aptana 3 without going to the process of creating a new project file in order to accomplish it . I am running on a Mac and running Aptana Studio 3.2.2 .. . .. . If someone could lead me to the right direction with a link-to how that would be awesome . Thanks .. . Answer : File New From template HTML Choose the type of HTML file you would like to create and you are set",
"Question : I want to use autocomplete for jQuery in Eclipse . The Aptana Plugin is installed : .. . .. . Support for jQuery also : .. . .. . JavaScript WTP is installed : .. . .. . But the autocomplete doesn t work . Does anyone have an idea of where the problem could be Comment : This was very helpful...i am new to Aptana and I struggled with adding support for jQuery1.4 am using Aptana2 as v3 has no js debugging . If you have the same problem go to this page - install the plugin for jQuery aptanastudio.tenderapp.com faqs https : aptanastudio.tenderapp.com faqs updating-changing-or-uninstalling manual-plugin-install -- then follow the jmohr s suggestions to activate the code assist Comment : See this question for Aptana3 stackoverflow.com questions 4721124 http : stackoverflow.com questions 4721124 how-to-enable-jquery-support-in-aptana-studio-3 Comment : my question and the answer is 1 5 years older as the linked one and the problem was already solved... . .. . Answer : Turn on JavaScript Code Assist Feature .. . .. . When you install additional AJAX library support the Code Assist for that library isn t turned on by default . To turn on the Code Assist feature after you install additional AJAX Libraries : .. . .. . Aptana AJAX Code Assist Settings http : i.stack.imgur.com A7Oeq.png .. . .. . Switch to the Aptana Perspective .. . .. . If you just installed the Aptana plugin and are trying to get this to work you ll have to make sure you re using the Aptana Perspective to utilize the AJAX library Code Assist feature : .. . .. . Using Eclipse PDT with Aptana Plugin .. . .. . I installed the Aptana plugin to Eclipse PDT and the jQuery Code Assist worked fine once I realized that I was still using the PDT PHP Perspective instead of the Aptana Perspective . When I switched to the Aptana Perspective it started working . Install Aptana Plugin before PDT .. . .. . Sirokov pointed out that he was unable to get the Code Assist to work with PDT and Aptana Plugin unless he installed the Aptana Plugin first and then installed PDT second . Comment : Updated way for Aptana Studio 3 stackoverflow.com questions 4721124 http : stackoverflow.com questions 4721124 how-to-enable-jquery-support-in-aptana-studio-3 Comment : what s this additional AJAX library how can i install it thanks"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
javascript
|
UNK_RELATION
|
bitsy@api@107
|
bitsy -- bitsy is a small fast embeddable durable in-memory graph database that implements the blueprints @placeholder .
|
{
"confidence": [
44.46162033081055,
43.189239501953125,
39.41663360595703,
39.41663360595703,
39.41663360595703,
39.41663360595703,
38.35720443725586,
37.94976806640625,
32.61838150024414,
24.517501831054688,
21.811052322387695,
21.33063507080078,
21.33063507080078,
18.679611206054688,
14.519564628601074,
14.519564628601074,
14.519564628601074,
14.519564628601074,
14.519564628601074,
14.519564628601074,
14.519564628601074,
14.519564628601074,
14.519564628601074,
14.519564628601074,
14.519564628601074,
14.519564628601074,
14.519564628601074,
14.519564628601074,
14.519564628601074,
14.519564628601074,
14.519564628601074,
13.05269718170166,
13.05269718170166,
13.05269718170166
],
"content": [
"imports as they aren t validated : .. . .. . Finally the reason your class can t be found is because Bitsy is not a TinkerPop maintained Blueprints implementation and therefore does not ship with the Gremlin distribution .",
"i have a java application which writes network state information into Bitsy .",
"I ve been trying to connect to a Bitsy graphDB which already contains some data from gremlin 2.5.0 groovy .",
"Copy the Bitsy jar files to the Gremlin classpath - be sure to get all dependencies or it may not work properly .",
"Use Grape to pull Bitsy in for your Gremlin Console session .. . .. . For the latter you can issue the following commands :",
"Is it possible you didn t shut down Bitsy properly when you first created it",
"Although when i look at the Bitsy database files which are supposed to contain information like below for a vertex : .. . .. . Instead all i see is a list .. . .. . and so on .",
"btw i am using Bitsy 1.5.1 with gremlin-java-2.4.0.jar with eclipse-kepler .",
"First note that Bitsy is officially compatible with TinkerPop 2.4.0 not 2.5.0 so while it might work in the 2.5.0 Gremlin Console I would recommend going backward to 2.4.0 .",
"What is shows is dependent on the Blueprints implementation but typically shows the identifier for the element .",
"If you want all the properties you could use the map https : github.com tinkerpop gremlin blob 2.5.0 gremlin-java src main java com tinkerpop gremlin java GremlinFluentPipeline.java L729 step or maybe use the ElementHelper https : github.com tinkerpop blueprints blob 2.5.0 blueprints-core src main java com tinkerpop blueprints util ElementHelper.java L148 .",
"I am new to graph DB : .. . .. . Any help would be highly appreciated .",
"What happens if you create your graph all within the Gremlin Console",
"Calling toString on a graph element Vertex or Edge will not return a representation of the data held by that element .",
"I m doing this from the gremlin shell and haven t yet tried referencing the classes from eclipse .",
"However I m getting the following error : .. . .. . I ve already done an import of the package com.lambdazen.bitsy .",
"and the import worked .",
"How do I get this to work",
"Or should I write a groovy script with all these commands or can we write a gremlin script",
"There are a number of issues here .",
"Next you have to be a little careful with .",
"You can do one of two things : .. . .. . 1 .",
"2 .",
"Hello Stephen thanks for the reply .",
"The above steps worked .",
"I guess : well i just want to run some basic commands for now on the console .",
"I had created a BitsyDB with 4 vertices and 3 edges and stored them .",
"After i imported this DB i just wanted to check the same from the console but when i ran commands like",
"g.V.count it returned a 0 .",
"Also looks like when i loaded the new DB there was a error with the txB.txt 03 : 30 : 01.393 main WARN com.lambdazen.bitsy.store.LoadTask - Zapped file home ubuntu BitsyDB1 txB.txt to recover from error 03 : 30 : 01.393 main INFO com.lambdazen.bitsy.store.LoadTask - Recovery of home ubuntu BitsyDB1 txB.txt is complete bitsygraph home ubuntu BitsyDB1 @stephenmallette",
"Does everything work properly then",
"which seems to be working fine since i can retrieve the stored data within that thread .",
"I also have another class where i am trying to use gremlin to retrieve the vertices as below .",
"Could anyone tell me where i am wrong ."
]
}
|
{
"confidence": [
75.6915283203125,
67.63505554199219
],
"content": [
"Question : i have a java application which writes network state information into Bitsy . which seems to be working fine since i can retrieve the stored data within that thread . I also have another class where i am trying to use gremlin to retrieve the vertices as below . Although when i look at the Bitsy database files which are supposed to contain information like below for a vertex : .. . .. . Instead all i see is a list .. . .. . and so on . Could anyone tell me where i am wrong . btw i am using Bitsy 1.5.1 with gremlin-java-2.4.0.jar with eclipse-kepler . .. . Answer : Calling toString on a graph element Vertex or Edge will not return a representation of the data held by that element . What is shows is dependent on the Blueprints implementation but typically shows the identifier for the element . If you want all the properties you could use the map https : github.com tinkerpop gremlin blob 2.5.0 gremlin-java src main java com tinkerpop gremlin java GremlinFluentPipeline.java L729 step or maybe use the ElementHelper https : github.com tinkerpop blueprints blob 2.5.0 blueprints-core src main java com tinkerpop blueprints util ElementHelper.java L148 .",
"Question : I ve been trying to connect to a Bitsy graphDB which already contains some data from gremlin 2.5.0 groovy . I m doing this from the gremlin shell and haven t yet tried referencing the classes from eclipse . However I m getting the following error : .. . .. . I ve already done an import of the package com.lambdazen.bitsy . and the import worked . How do I get this to work Or should I write a groovy script with all these commands or can we write a gremlin script I am new to graph DB : .. . .. . Any help would be highly appreciated . .. . Answer : There are a number of issues here . First note that Bitsy is officially compatible with TinkerPop 2.4.0 not 2.5.0 so while it might work in the 2.5.0 Gremlin Console I would recommend going backward to 2.4.0 . Next you have to be a little careful with . imports as they aren t validated : .. . .. . Finally the reason your class can t be found is because Bitsy is not a TinkerPop maintained Blueprints implementation and therefore does not ship with the Gremlin distribution . You can do one of two things : .. . .. . 1 . Copy the Bitsy jar files to the Gremlin classpath - be sure to get all dependencies or it may not work properly . 2 . Use Grape to pull Bitsy in for your Gremlin Console session .. . .. . For the latter you can issue the following commands : Comment : Hello Stephen thanks for the reply . The above steps worked . I guess : well i just want to run some basic commands for now on the console . I had created a BitsyDB with 4 vertices and 3 edges and stored them . After i imported this DB i just wanted to check the same from the console but when i ran commands like Comment : g.V.count it returned a 0 . Also looks like when i loaded the new DB there was a error with the txB.txt 03 : 30 : 01.393 main WARN com.lambdazen.bitsy.store.LoadTask - Zapped file home ubuntu BitsyDB1 txB.txt to recover from error 03 : 30 : 01.393 main INFO com.lambdazen.bitsy.store.LoadTask - Recovery of home ubuntu BitsyDB1 txB.txt is complete bitsygraph home ubuntu BitsyDB1 @stephenmallette Comment : Is it possible you didn t shut down Bitsy properly when you first created it What happens if you create your graph all within the Gremlin Console Does everything work properly then"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
api
|
UNK_RELATION
|
escalante@server@65
|
escalante -- escalante is an free open-source scala application @placeholder based on the jboss application server 7 + .
|
{
"confidence": [
53.966819763183594,
53.6848030090332,
49.67811584472656,
47.89979553222656,
46.89896011352539,
46.83527755737305,
45.774497985839844,
45.36658477783203,
44.78935241699219,
44.600467681884766,
42.58594512939453,
42.58594512939453,
42.58594512939453,
41.92393112182617,
39.55460739135742,
39.55460739135742,
37.86107635498047,
37.512939453125,
37.512939453125,
37.512939453125,
36.4498176574707,
36.4498176574707,
35.910919189453125,
34.925514221191406,
32.74421691894531,
29.196849822998047,
25.23217010498047,
23.949127197265625,
22.07460594177246,
22.07460594177246,
21.90745735168457,
21.668426513671875,
19.792064666748047,
19.23676109313965,
18.721721649169922,
16.397600173950195,
15.772137641906738,
15.44853401184082,
15.44853401184082,
15.44853401184082,
15.44853401184082,
15.44853401184082,
15.44853401184082,
15.44853401184082,
15.44853401184082,
15.44853401184082,
15.44853401184082,
15.44853401184082,
15.44853401184082,
15.44853401184082,
15.44853401184082,
15.44853401184082,
15.44853401184082,
15.44853401184082,
15.44853401184082,
15.44853401184082,
15.44853401184082,
15.44853401184082,
15.44853401184082,
15.44853401184082,
15.44853401184082,
15.44853401184082,
15.44853401184082,
15.44853401184082,
15.44853401184082,
15.44853401184082,
15.44853401184082,
15.44853401184082,
15.44853401184082,
13.406864166259766,
13.406864166259766,
13.406864166259766,
13.406864166259766,
13.406864166259766,
13.406864166259766,
13.406864166259766,
13.406864166259766,
13.406864166259766,
13.406864166259766,
13.406864166259766,
13.406864166259766,
13.406864166259766,
13.406864166259766,
13.406864166259766,
13.406864166259766,
13.406864166259766,
13.406864166259766,
13.406864166259766,
10.429058074951172,
10.429058074951172,
10.429058074951172,
10.429058074951172,
10.429058074951172,
10.429058074951172,
10.429058074951172
],
"content": [
"this is the Escalante lead .",
"I ve never worked with the Escalante SBT https : github.com escalante sbt-escalante plugin so please excuse mistakes .",
"project build.properties .. . .. . project sbt-escalante.sbt I thought I d change the official .scala approach https : github.com escalante sbt-escalante set-up-escalante-sbt-plugin-in-your-project to .sbt .. . .. . build.sbt .. . .. . With the files in-place I could run escalante-version and hence assumed it worked fine .",
"In my last attempt I cloned an sbt-escalante example https : github.com arashi01 sbt-escalante-example but not even this is working .",
"That statement was based on comparisons I did with the base JBoss Application Server container deploying a standard Lift war versus deploying a Lift war the Escalante way with a minimal war .",
"When I run escalante-run I get a lot of JRebel exceptions and the JBoss application server starts but there s no class reloading .",
"Diego Escalante 0.3.0 is out now http : goo.gl fG0B6 with Scala 2.10 support .",
"I m also using sbt-escalante 0.2.0 which allows me to start a different application server than Jetty .",
"I m looking for container for my Lift web application deployed on OpenShift and I found Escalante .",
"On Escalante http : escalante.io site it s said http : escalante.io faq why deploy lift applications on escalante that Escalante optimises the size of the deployment and the memory consumption at runtime .",
"So is there anything that I missed or escalante is just not support newer liftweb framework",
"Have you tried posting on their public forums or on their escalante on freenode channel",
"I m trying to get escalante-sbt running but without luck so far .",
"I set escalanteVersion : 0.3.0-SNAPSHOT in build.sbt but after deleting .ivy2 cache io.escalante and reloading sbt I see that it is downloading downloading repository.jboss.org nexus content groups public io escalante http : repository.jboss.org nexus content groups public io escalante escalante-dist 0.2.0 escalante-dist-0.2.0.zip which I was hoping it would not happen I ll see if once it is done it works anyway or now .",
"I don t have enough points to create the escalante tag : sorry for using the sbt tag",
"Now it s pretty late here but tomorrow I ll try to actually run escalante from sbt but at least now it compiles",
"Maybe you need to add to github.com arashi01 sbt-escalante blob https : github.com arashi01 sbt-escalante blob 79ca36b13f62f0cb9e5b886a55936bc9e453b425 build.sbt the exclude option to exclude the wrong version see github.com harrah xsbt wiki Library-Management https : github.com harrah xsbt wiki Library-Management",
"The project lead for Escalante is on it and you will probably get some more people who have used both .",
"I would really like to get sbt-escalante working but I m out of ideas .",
"Yes I checked out the Escalante SBT plugin myself and compiled it but it didn t solve the dependency issue .",
"Diego I also haven t been able to reliably replicate the issue yet I get the error with sbt-escalante 0.1.0 but not with 0.1.1 .",
"I run escalante-run and I get the below error : .. . .. . Note that the xml file it tries to read is incomplete : .. . .. . End of file and this is the error :",
"Had the same issue as in this question https : stackoverflow.com questions 15351171 escalante-sbt-plugin-does-not-find-org-jboss-shrinkwrap-descriptorsshrinkwrap-d and nothing worked for me .",
"To do so you will need to remove the addSbtPlugin io.escalante.sbt sbt-escalante 0.1.1 line from your project build.sbt file and add a .scala plugin project definition file in your project project directory with something like the following : .. . .. . Sample project project Plugins.scala : .. . .. . A sample git project can be found here https : github.com arashi01 sbt-escalante-example",
"I ve upgraded Escalante to Scala 2.10 and in doing so I found some issues that could lead to a VerifyError runtime-error due to multiple commons-code jar files see issues.jboss.org browse ESC-18 http : issues.jboss.org browse ESC-18 .",
"It seems that adding the shrinkwrap-descriptors-spi dependency as a workaround for sbt 647 https : github.com sbt sbt issues 647 doesn t always work when using the published sbt-escalante binary from the maven repo however adding it as a remote git plugin project dependency seems to .",
"And it looks like some internals of the application server changed .",
"This version solves the Scala 2.10 issue you had .",
"I m using JBoss AS 7.x.incremental.667 and I posted my question at the JRebel forum .",
"The thread can be found here http : zeroturnaround.com forums topic jrebel-jboss-as-7-x-sbt-exceptions-and-no-class-reloading",
"I tried SBT 0.13.1 with Scala 2.10.3 .",
"So if you wanna use Scala 2.10 I d highly recommend using a 0.3.0-SNAPSHOT version .",
"Anything in the pipeline concerning this new JBoss version",
"Now I tried to integrate JRebel 5.2.2 to avoid application restarts .",
"it looks like a newer version of JBoss that haven t been tested with JRebel yet .",
"I suggest you report this to JRebel forums : zeroturnaround.com forums http : zeroturnaround.com forums Please tell what is the exact version of JBoss that you re using .",
"I ve tried the tutorial on the page Deploying Lift applications on OpenShift http : escalante.io news 2012 10 28 lift-on-openshift but I only got a blank page and it s source page is the content of the index.html which does not be rendered by the lift snippet .",
"I added this to the project plugin.sbt file : .. . .. . then to build.sbt .. . .. . and as I load sbt 0.12.1 I get : .. . .. . How can I solve this",
"Diego can you try a few things",
"First upgrade to SBT 0.12.2 I had some issues with 0.12.1 or 0.12 but cannot remember which.. . and try again .",
"Secondly try if adding a direct dependency for org.jboss.shrinkwrap.descriptors shrinkwrap-descriptors-spi 2.0.0-alpha-3 build.sbt file works .",
"For interest of the public this appears to be a bug in SBT Ivy which is resolving the wrong dependency .",
"See github.com sbt sbt issues 647 https : github.com sbt sbt issues 647 for full details .",
"sbt 0.12.2 did not fix it adding org.jboss.shrinkwrap.descriptors shrinkwrap-descriptors-spi 2.0.0-alpha-3 to build.sbt did not fix it either .",
"Diego I haven t been able to replicate the issue here so far on my side .",
"Mind building the SBT plugin on your side adding this dependency and see if it works",
"org.jboss.arquillian.config arquillian-config-impl-base 1.0.3.Final exclude org.jboss.shrinkwrap.descriptors shrinkwrap-descriptors-spi - If that doesn t work can you try adding a excludeAll with rules for both shrinkwrap-descriptors-spi and shrinkwrap-descriptors-api-base",
"Just wanted to confirm that the build.sbt file in which you added the org.jboss.shrinkwrap.descriptors shrinkwrap-descriptors-spi 2.0.0-alpha-3 dependency is located in project root project i.e in your sbt-plugin project definition and not your main build.sbt as it is a plugin dependency .",
"Just experienced this issue again .",
"Thanks",
"I ll be trying this later this week and come back and update .",
"Sorry guys for not replying trying to configure things properly to receive notifications on answers comments on this post .",
"Ali thanks for posting the workaround",
"I ll apply to the quickstarts in next update for SBT plugin version 0.2.0 .",
"@Diego let us know if this works for you :",
"@fmpwizard did you manage to try and see if it works for you",
"Sorry for the late testing the workaround works I tried changing the plugin git url to point to 0.1.2 and it also worked .",
"There s no SNAPSHOTs for this version uploaded yet but I m uploading one as we speak.. .",
"A 0.3.0-SNAPSHOT is now up .",
"Can you give it a go",
"Thanks",
"now I get : gist.github.com fmpwizard 5316092 https : gist.github.com fmpwizard 5316092",
"Diego apologies for the delay getting back .",
"I had other priorities that needed my attention last couple of weeks .",
"The ZIP error you got is that related to trying to unzip 0.3.0-SNAPSHOT",
"Did you manage to get around the issue where it was still downloading version 0.2.0",
"Let me know how that goes : .",
"it s all good now thanks",
"Wicked glad to hear that :",
"How it s compared to Jetty in memory usage",
"I would try posting this to the lift list groups.google.com forum forum liftweb https : groups.google.com forum forum liftweb .",
"We still have not compared with other containers such as Jetty .",
"The latter was more memory efficient .",
"We will do comparisons with Jetty as we near functionality completion but we re not at that stage yet .",
"I solved my problem with openshift s diy platform .",
"What is the solution",
"What is left to try",
"The following seemed to work for me .",
"Sorry didn t work for me .",
"Back to sbt.ResolveException : unresolved dependency : org.jboss.shrinkwrap.descriptors shrinkwrap-descriptors-api-base 1.0.3.Final : not found .",
"Trying sbt-escalante.git 0.1.2 still gives sbt.ResolveException : download failed : org.apache.maven.wagon wagon-provider-api 1.0 wagon-provider-api.jar",
"Can you check out the following thread",
"I m not experiencing the issue so I can t replicate - groups.google.com d msg liftweb H-WR48BojSc gL7QcEN0r48J https : groups.google.com d msg liftweb H-WR48BojSc gL7QcEN0r48J .",
"Can you add libraryDependencies + org.jboss.shrinkwrap.descriptors shrinkwrap-descriptors-api-base 2.0.0-alpha-5 to project sbt-escalante.sbt",
"It should be : lazy val plugins project in file .",
"dependsOn sbtEscalante settings libraryDependencies + org.jboss.shrinkwrap.descriptors shrinkwrap-descriptors-api-base 2.0.0-alpha-5 .",
"Added settings libraryDependencies + org.jboss.shrinkwrap.descriptors shrinkwrap-descriptors-api-base 2.0.0-alpha-5 like you said but it doesn t compile : sbt-escalante.sbt : 8 : error : not found : value settings settings libraryDependencies + org.jboss.shrinkwrap.descriptors shrinkwrap-descriptors-api-base 2.0.0-alpha-5 .",
"Without settings it compiles but gives the unresolved dependency : org.jboss.shrinkwrap.descriptors shrinkwrap-descriptors-api-base 1.0.3.Final : not found .",
"I m using SBT 0.13.2-M3 for Lift 2.6-M2 development .",
"There are so many exceptions that I just list two of them and hope someone has a clue how to fix it .",
"When you find a solution please post it here too .",
"So the fix is required on JRebel side .",
"@AntonArhipov Thanks good to know .",
"I ll wait for a fix then .",
"I guess the JRebel 5.x nightly-build will be my friend then ."
]
}
|
{
"confidence": [
80.55146789550781,
72.24700927734375,
69.45797729492188,
64.94892883300781,
61.17635726928711,
57.76581954956055
],
"content": [
"Question : I m looking for container for my Lift web application deployed on OpenShift and I found Escalante . On Escalante http : escalante.io site it s said http : escalante.io faq why deploy lift applications on escalante that Escalante optimises the size of the deployment and the memory consumption at runtime . How it s compared to Jetty in memory usage Comment : I would try posting this to the lift list groups.google.com forum forum liftweb https : groups.google.com forum forum liftweb . The project lead for Escalante is on it and you will probably get some more people who have used both . .. . Answer : this is the Escalante lead . We still have not compared with other containers such as Jetty . That statement was based on comparisons I did with the base JBoss Application Server container deploying a standard Lift war versus deploying a Lift war the Escalante way with a minimal war . The latter was more memory efficient . We will do comparisons with Jetty as we near functionality completion but we re not at that stage yet .",
"Question : I m trying to get escalante-sbt running but without luck so far . I tried SBT 0.13.1 with Scala 2.10.3 . Had the same issue as in this question https : stackoverflow.com questions 15351171 escalante-sbt-plugin-does-not-find-org-jboss-shrinkwrap-descriptorsshrinkwrap-d and nothing worked for me . In my last attempt I cloned an sbt-escalante example https : github.com arashi01 sbt-escalante-example but not even this is working . I would really like to get sbt-escalante working but I m out of ideas . What is left to try .. . Answer : I ve never worked with the Escalante SBT https : github.com escalante sbt-escalante plugin so please excuse mistakes . The following seemed to work for me . project build.properties .. . .. . project sbt-escalante.sbt I thought I d change the official .scala approach https : github.com escalante sbt-escalante set-up-escalante-sbt-plugin-in-your-project to .sbt .. . .. . build.sbt .. . .. . With the files in-place I could run escalante-version and hence assumed it worked fine . Comment : Sorry didn t work for me . Back to sbt.ResolveException : unresolved dependency : org.jboss.shrinkwrap.descriptors shrinkwrap-descriptors-api-base 1.0.3.Final : not found . Trying sbt-escalante.git 0.1.2 still gives sbt.ResolveException : download failed : org.apache.maven.wagon wagon-provider-api 1.0 wagon-provider-api.jar Comment : Can you check out the following thread I m not experiencing the issue so I can t replicate - groups.google.com d msg liftweb H-WR48BojSc gL7QcEN0r48J https : groups.google.com d msg liftweb H-WR48BojSc gL7QcEN0r48J . Comment : Yes I checked out the Escalante SBT plugin myself and compiled it but it didn t solve the dependency issue . Comment : Can you add libraryDependencies + org.jboss.shrinkwrap.descriptors shrinkwrap-descriptors-api-base 2.0.0-alpha-5 to project sbt-escalante.sbt It should be : lazy val plugins project in file . dependsOn sbtEscalante settings libraryDependencies + org.jboss.shrinkwrap.descriptors shrinkwrap-descriptors-api-base 2.0.0-alpha-5 . Comment : Added settings libraryDependencies + org.jboss.shrinkwrap.descriptors shrinkwrap-descriptors-api-base 2.0.0-alpha-5 like you said but it doesn t compile : sbt-escalante.sbt : 8 : error : not found : value settings settings libraryDependencies + org.jboss.shrinkwrap.descriptors shrinkwrap-descriptors-api-base 2.0.0-alpha-5 . Without settings it compiles but gives the unresolved dependency : org.jboss.shrinkwrap.descriptors shrinkwrap-descriptors-api-base 1.0.3.Final : not found .",
"Question : I run escalante-run and I get the below error : .. . .. . Note that the xml file it tries to read is incomplete : .. . .. . End of file and this is the error : Comment : I ve upgraded Escalante to Scala 2.10 and in doing so I found some issues that could lead to a VerifyError runtime-error due to multiple commons-code jar files see issues.jboss.org browse ESC-18 http : issues.jboss.org browse ESC-18 . So if you wanna use Scala 2.10 I d highly recommend using a 0.3.0-SNAPSHOT version . There s no SNAPSHOTs for this version uploaded yet but I m uploading one as we speak.. . Comment : A 0.3.0-SNAPSHOT is now up . Can you give it a go Comment : I set escalanteVersion : 0.3.0-SNAPSHOT in build.sbt but after deleting .ivy2 cache io.escalante and reloading sbt I see that it is downloading downloading repository.jboss.org nexus content groups public io escalante http : repository.jboss.org nexus content groups public io escalante escalante-dist 0.2.0 escalante-dist-0.2.0.zip which I was hoping it would not happen I ll see if once it is done it works anyway or now . Thanks Comment : now I get : gist.github.com fmpwizard 5316092 https : gist.github.com fmpwizard 5316092 Comment : Diego apologies for the delay getting back . I had other priorities that needed my attention last couple of weeks . The ZIP error you got is that related to trying to unzip 0.3.0-SNAPSHOT Did you manage to get around the issue where it was still downloading version 0.2.0 .. . Answer : Diego Escalante 0.3.0 is out now http : goo.gl fG0B6 with Scala 2.10 support . This version solves the Scala 2.10 issue you had . Let me know how that goes : . Comment : it s all good now thanks Comment : Wicked glad to hear that :",
"Question : null .. . Answer : I m using SBT 0.13.2-M3 for Lift 2.6-M2 development . I m also using sbt-escalante 0.2.0 which allows me to start a different application server than Jetty . Now I tried to integrate JRebel 5.2.2 to avoid application restarts . When I run escalante-run I get a lot of JRebel exceptions and the JBoss application server starts but there s no class reloading . There are so many exceptions that I just list two of them and hope someone has a clue how to fix it . Comment : I suggest you report this to JRebel forums : zeroturnaround.com forums http : zeroturnaround.com forums Please tell what is the exact version of JBoss that you re using . Comment : I m using JBoss AS 7.x.incremental.667 and I posted my question at the JRebel forum . The thread can be found here http : zeroturnaround.com forums topic jrebel-jboss-as-7-x-sbt-exceptions-and-no-class-reloading Comment : When you find a solution please post it here too . Thanks Comment : it looks like a newer version of JBoss that haven t been tested with JRebel yet . And it looks like some internals of the application server changed . So the fix is required on JRebel side . Comment : @AntonArhipov Thanks good to know . I ll wait for a fix then . Anything in the pipeline concerning this new JBoss version I guess the JRebel 5.x nightly-build will be my friend then .",
"Question : I added this to the project plugin.sbt file : .. . .. . then to build.sbt .. . .. . and as I load sbt 0.12.1 I get : .. . .. . How can I solve this I don t have enough points to create the escalante tag : sorry for using the sbt tag Comment : Diego can you try a few things First upgrade to SBT 0.12.2 I had some issues with 0.12.1 or 0.12 but cannot remember which.. . and try again . Secondly try if adding a direct dependency for org.jboss.shrinkwrap.descriptors shrinkwrap-descriptors-spi 2.0.0-alpha-3 build.sbt file works . Comment : For interest of the public this appears to be a bug in SBT Ivy which is resolving the wrong dependency . See github.com sbt sbt issues 647 https : github.com sbt sbt issues 647 for full details . Comment : sbt 0.12.2 did not fix it adding org.jboss.shrinkwrap.descriptors shrinkwrap-descriptors-spi 2.0.0-alpha-3 to build.sbt did not fix it either . Maybe you need to add to github.com arashi01 sbt-escalante blob https : github.com arashi01 sbt-escalante blob 79ca36b13f62f0cb9e5b886a55936bc9e453b425 build.sbt the exclude option to exclude the wrong version see github.com harrah xsbt wiki Library-Management https : github.com harrah xsbt wiki Library-Management Comment : Diego I haven t been able to replicate the issue here so far on my side . Mind building the SBT plugin on your side adding this dependency and see if it works org.jboss.arquillian.config arquillian-config-impl-base 1.0.3.Final exclude org.jboss.shrinkwrap.descriptors shrinkwrap-descriptors-spi - If that doesn t work can you try adding a excludeAll with rules for both shrinkwrap-descriptors-spi and shrinkwrap-descriptors-api-base Comment : Diego I also haven t been able to reliably replicate the issue yet I get the error with sbt-escalante 0.1.0 but not with 0.1.1 . Just wanted to confirm that the build.sbt file in which you added the org.jboss.shrinkwrap.descriptors shrinkwrap-descriptors-spi 2.0.0-alpha-3 dependency is located in project root project i.e in your sbt-plugin project definition and not your main build.sbt as it is a plugin dependency . .. . Answer : Just experienced this issue again . It seems that adding the shrinkwrap-descriptors-spi dependency as a workaround for sbt 647 https : github.com sbt sbt issues 647 doesn t always work when using the published sbt-escalante binary from the maven repo however adding it as a remote git plugin project dependency seems to . To do so you will need to remove the addSbtPlugin io.escalante.sbt sbt-escalante 0.1.1 line from your project build.sbt file and add a .scala plugin project definition file in your project project directory with something like the following : .. . .. . Sample project project Plugins.scala : .. . .. . A sample git project can be found here https : github.com arashi01 sbt-escalante-example Comment : Thanks I ll be trying this later this week and come back and update . Comment : Sorry guys for not replying trying to configure things properly to receive notifications on answers comments on this post . Ali thanks for posting the workaround I ll apply to the quickstarts in next update for SBT plugin version 0.2.0 . @Diego let us know if this works for you : Comment : @fmpwizard did you manage to try and see if it works for you Comment : Sorry for the late testing the workaround works I tried changing the plugin git url to point to 0.1.2 and it also worked . Thanks Now it s pretty late here but tomorrow I ll try to actually run escalante from sbt but at least now it compiles",
"Question : null .. . Answer : I ve tried the tutorial on the page Deploying Lift applications on OpenShift http : escalante.io news 2012 10 28 lift-on-openshift but I only got a blank page and it s source page is the content of the index.html which does not be rendered by the lift snippet . So is there anything that I missed or escalante is just not support newer liftweb framework Comment : Have you tried posting on their public forums or on their escalante on freenode channel Comment : I solved my problem with openshift s diy platform . Comment : What is the solution"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
server
|
UNK_RELATION
|
jquery-form-validator@html@159
|
jquery-form-validator -- jquery-form-validator by victor jonsson is a feature rich jquery plugin that makes it easy to validate user input while keeping your @placeholder markup clean from javascript code .
|
{
"confidence": [
117.79010772705078,
69.69001007080078,
67.71876525878906,
65.43024444580078,
63.793540954589844,
63.42176818847656,
63.152183532714844,
55.30259704589844,
55.30259704589844,
54.51915740966797,
53.85637283325195,
52.474021911621094,
51.12950134277344,
50.4725341796875,
48.83827209472656,
48.580101013183594,
48.565345764160156,
46.891876220703125,
46.8796272277832,
45.874515533447266,
45.48262023925781,
45.088104248046875,
44.83429718017578,
44.83429718017578,
43.843536376953125,
43.62335205078125,
43.43499755859375,
42.66316223144531,
41.73500061035156,
40.81013870239258,
39.313323974609375,
38.717735290527344,
38.3991584777832,
38.32632827758789,
38.26398468017578,
37.34886932373047,
37.26028823852539,
36.70618438720703,
36.689125061035156,
36.4564208984375,
36.400962829589844,
35.878997802734375,
35.45077133178711,
35.419677734375,
35.34929275512695,
35.330589294433594,
35.330589294433594,
35.13102722167969,
34.977447509765625,
34.773223876953125,
34.617942810058594,
34.53220748901367,
34.38430404663086,
34.21992492675781,
33.51719665527344,
32.74812316894531,
32.51737594604492,
32.26027297973633,
31.994644165039062,
31.991931915283203,
31.769603729248047,
31.424869537353516,
31.15915298461914,
30.747156143188477,
30.518905639648438,
30.403701782226562,
30.3765869140625,
30.010150909423828,
29.884855270385742,
29.677410125732422,
29.539443969726562,
29.09891128540039,
28.969388961791992,
28.816455841064453,
28.75238037109375,
28.701744079589844,
28.6951961517334,
28.53885269165039,
28.52671241760254,
28.375621795654297,
28.136611938476562,
28.034103393554688,
27.606807708740234,
27.597091674804688,
27.508991241455078,
27.34173583984375,
27.34173583984375,
27.34173583984375,
27.334217071533203,
27.287006378173828,
27.171916961669922,
26.883892059326172,
26.603199005126953,
26.537887573242188,
26.31822967529297,
26.28569793701172,
26.28569793701172,
25.977413177490234,
25.977413177490234,
25.93153953552246
],
"content": [
"The Form Validator for Victor Jonsson is not the jQuery Validate plugin .",
"your fiddle doesn t have resources e.g . jquery jquery-form-validator",
"So I have a form which I validate before submit using jquery-form-validator http : formvalidator.net plugin",
"I m trying to use jquery-form-validator http : www.formvalidator.net file-validators to validate a form that has multiple input fields and a mandatory file-upload .",
"I was researching for form validation after a time I have found jquery-form-validator plugin which will help me to validate .",
"I m using jQuery Form validator I created a custom validator to check if the input value already exists but It s not working .",
"I am using - victorjonsson jQuery-Form-Validator .. . .. . URL : https : github.com victorjonsson jQuery-Form-Validator .. . .. . I am validating a from and using toggleDisabled feature .",
"I wanted to use server-side validation by jQuery Form Validator http : www.formvalidator.net security-validators backend .",
"I have used Jquery Form validator http : www.formvalidator.net in my laravel application .",
"You can use the date validtator from Date-Module https : github.com victorjonsson jQuery-Form-Validator blob master src modules date.js and add a custom validator http : www.formvalidator.net custom-validators .",
"jquery form validation is a separate plugin yes",
"data-validation-req-params to data-validation-req-params .. . .. . reference : https : github.com victorjonsson jQuery-Form-Validator issues 453",
"I COPIED the reset function of the form-validator .",
"Here is my code of form link that is clicked by the user to submit a form : .. . .. . jquery code works fine : .. . .. . but when i am trying to validate a form using .validate it is not working .",
"Now the problem is every POC has Field Validator and i m using this Form Validator http : formvalidator.net .. . .. . 4 .",
"It looks like jQuery Validate needs to be called like form .validate or more precise selector but identifying only form .",
"This validator use the method reset of the form but I don t want clean the input data I just want remove the red borders and the error messages .",
".validate .. . validateOnBlur : false disable validation when input looses focus .. . errorMessagePosition : top Instead of element which is default .. . scrollToTopOnError : false Set this property to true if you have a long form .. . .. . .. . .. . script src http : ajax.googleapis.com ajax libs jquery 1.11.1 jquery.min.js script .. . link href https : raw.githubusercontent.com victorjonsson jQuery-Form-Validator master form-validator theme-default.css rel stylesheet .. . script src http : cdnjs.cloudflare.com ajax libs jquery-form-validator 2.2.8 jquery.form-validator.min.js script .. . link href https : maxcdn.bootstrapcdn.com bootstrap 3.3.5 css bootstrap.min.css rel stylesheet .. . form class form .. . div class form-group .. . input class form-control type text data-validation required .. . div .. . .. . div class form-group .. . textarea class form-control rows 2 data-validation required textarea .. . div .. . .. . div class form-group .. . button id submit type submit class btn btn-primary btn-lg btn-block Submit button .. . div .. . form",
"http : www.formvalidator.net configuration setup .. . .. . Reset form using jQuery container form .get 0 .reset .. . .. . Thanks",
".validate .. . form : frmSample .. . validateOnBlur : true enable validation when input looses focus .. . scrollToTopOnError : true Set this property to true if you have a long form .. . borderColorOnError : rgb 167 3 0 .. . borderColorOnSuccess : a94442 .. . .. . .. . .. . script src https : ajax.googleapis.com ajax libs jquery 2.1.1 jquery.min.js script .. . script src cdnjs.cloudflare.com ajax libs jquery-form-validator 2.2.43 jquery.form-validator.min.js script .. . form id frmSample .. . p .. . Password at least 8 characters .. . input name pass confirmation data-validation length data-validation-length min8 .. . br .. . Confirm password .. . input name pass data-validation confirmation .. . p .. . form",
"Change .validate options to .validate modules : security options .. . .. . In your example your code will look like : .. . .. . HTML .. . .. . JavaScript .. . .. . See the working fiddle http : jsfiddle.net GuyT f1jsyef7 .. . .. . .. . .. . Update .. . .. . You have to use the module security because the form validator plugin is created with separate modules eg .",
"I guess you need to move up the jquery library : .. . .. . Because the jquery.form-validator.min.js file is written to use it with jQuery you need to have jquery loaded before your validation plugin file .",
"I am using this jquery form valdiation http : formvalidator.net to validate my form but if I have an AJAX call to submit the data then the validation is ignored .",
"I m using formvalidation.io an extension of jQuery form validation to validate my form and am having trouble with fields that have the type number .",
"I see no validate method in the jquery docs .",
"In jquery form validation the keyup is not working mozilla but working fine in chrome .",
"Try looking at this : stackoverflow.com questions 5147438 http : stackoverflow.com questions 5147438 match-two-fields-with-jquery-validate-plugin",
"I m using jquery-2.2.2 .",
"I am using jQuery-FormValidator http : formvalidator.net configuration styling plugin to validate form on client-side but whatever the suggestion they have given in the above link-to add a callback functions are not firing whereas proper errors will be displayed while trying to submit .",
"Is there some way I could do this with jQuery form validation",
"FULL Jquery formvalidation code :",
"Maybe have to add that form and jQuery are in php file which is called in other mother file and structure is something like this : .. . .. . p.s .",
"ok and now your jquery post function",
"I haven t used this Form Validator before so I might be going out on a limb here .",
"Controller : .. . .. . jQuery Validation :",
"I m using a custom jQuery validation script as a custom Drupal.behavoir with a Drupal Contact Form on a Drupal 8 site which works fine if the user is not logged in however when logged in the script will fire three times on submit .",
"I want to reset the validations of my form without to clean the data form.reset .",
".. . return false Will stop the submission of the form .. . .. . onElementValidate : function valid el form errorMess .. . console.log Input + el.attr name + is + valid",
"Isn t that snippet only demonstrating the code for validating the input field on the form",
"Woops well in my code it s before the validator when I was making the snippet I guess I added it after .",
"script .. . .validate .. . form : frmSlide .. . modules : file .. . validateOnBlur : false .. . errorMessagePosition : top Instead of element which is default .. . scrollToTopOnError : false Set this property to true if you have a long form .. . onError : function form .. . alert Failed",
"https : jsfiddle.net 03ehx9ns .. . .. . .. . .validate .. . modules : date .. . .. . .. . .formUtils.addValidator .. . name : older18 .. . validatorFunction : function val el conf .. . var requiredAge 18 .. . var dateFormat yyyy-mm-dd .. . if el.valAttr format .. . dateFormat el.valAttr format .. . .. . else if typeof conf.dateFormat undefined .. . dateFormat conf.dateFormat .. . .. . .. . var inputDate .formUtils.parseDate val dateFormat .. . if inputDate .. . return false .. . .. . .. . var d new Date .. . var currentYear d.getFullYear .. . var year inputDate 0 .. . var month inputDate 1 .. . var day inputDate 2 .. . .. . if year currentYear - requiredAge .. . var currentMonth d.getMonth + 1 .. . if month currentMonth .. . var currentDay d.getDate .. . return day currentDay .. . .. . else .. . return month currentMonth .. . .. . .. . else .. . return year currentYear - requiredAge year currentYear - 124 we can not live for ever yet.. . .. . .. . .. . errorMessage : You need to be older then 18 .. . errorMessageKey : badDate .. . .. . .. . .. . script src https : ajax.googleapis.com ajax libs jquery 1.10.2 jquery.min.js script .. . script src https : cdnjs.cloudflare.com ajax libs jquery-form-validator 2.3.26 jquery.form-validator.min.js script .. . .. . form action id date-form .. . p .. . Birth date .. . input name .. . data-validation older18 .. . data-validation-help yyyy-mm-dd Not allowing dates in.. . .. . p .. . p .. . Time .. . input name data-validation time data-validation-help HH : mm .. . p .. . p .. . input type submit .. . p .. . form",
"I m using jquery validation .",
"The following snippet is from their website : .. . .. . .. . php .. . json json encode array user user- get ID .. . .. . .. . p .. . strong E-mail : strong .. . input type email .. . name check-email .. . data-validation server .. . data-validation-url validate-form-input.php .. . data-validation-param-name email .. . data-validation-req-params php echo json .. . p .. . .. . Can anyone show me how to get the user ID in validate-form-input.php as per the code shown above",
"Here s the code for the validator I m using on the check boxes .",
"We can solve this with .when and .then functionality of jquery as below :",
"Try to use jquery it will work in each browser",
"My current code is : .. . .. . Form : .. . .. . jQuery : .. . .. . products add process.php : .. . .. . I put alert Select image and then understand that image name is empty and maybe somewhere have to put some code to say that I want to send DATA TYPE .",
"and .. . .. . jquery.form-validator.js : 1276 Uncaught Error : Using undefined validator validate confirmation .",
"Form validate the input every time I press a key even on tab to get the new field .",
"Just use the form id to validate the form .. . .. . and in the input field add the attribute .. . .. . data-rule-required true .. . .. . and if you want custom messages just add another attribute .. . .. . data-msg-required Your message",
"I am using a online blog form validation which is done in jQuery The problem I have with this file is when I reuse the input code for a different id the span alert is not showing up .",
"I am using Jquery FormValidator http : www.formvalidator.net date-validators birthdate attribute .",
"I have spin.js running great when a user hits the submit button on my form but it is also running when the form has errors ie .",
"I am facing a problem to validate a form onclick event .",
".. . .. . onSuccess : function form .. . alert ok",
"Also have you referenced jquery jquery.validate and jquery.validate.unobtrusive",
"So When i make them hidden and if they are blank those fields throw validation Err Msg Which i want to ignore How to do i achieve .. . .. . How do i Ignore Hidden Fields with this Form Validator http : formvalidator.net .. . .. . I tired this but still not working .. . .. . .validate.setDefaults ignore : input type text : hidden .. . .. . I got the solution .. . .. . .formUtils.defaultConfig ignore input type text : hidden",
"stackoverflow.com questions 11232310 http : stackoverflow.com questions 11232310 how-can-i-use-jquery-validation-with-the-chosen-plugin",
"Console through the following error : - .. . .. . jquery.form-validator.js : 1276 Uncaught Error : Using undefined validator validate strength .",
"Use can refer their documentation here http : formvalidation.io examples showing-message-custom-area for custom error message area .. . .. . Or you may use this code : .. . .. . You may try this code in jQuery validation plugin code of every field .",
".. . submitHandler : function form .. . form.submit .. . .. . .. . .. . next1 next2 .click function e .. . e.preventDefault .. . if signForm .valid .. . this .attr href .show .. . this .closest .tab .hide .. . .. . .. . .. . .. . .. . second-form .. . third-form .. . display : none .. . .. . .. . .. . script type text javascript src http : code.jquery.com jquery-1.11.1.js script .. . script type text javascript src http : cdnjs.cloudflare.com ajax libs jquery-validate 1.12.0 jquery.validate.js script .. . script type text javascript src http : cdnjs.cloudflare.com ajax libs jquery-validate 1.12.0 additional-methods.js script .. . .. . div id signup-form .. . div id row .. . form id signForm .. . div id first-form class tab .. . fieldset id body .. . fieldset .. . label for name Name label .. . input type text name user name id user name .. . fieldset .. . fieldset .. . label for mobile Mobile label .. . input type text name mobile id mobile .. . fieldset .. . a class next id next1 href second-form span Next span a .. . fieldset .. . .. . div .. . div id second-form class tab .. . fieldset .. . label for email Email label .. . input type text name user email id user email .. . fieldset .. . fieldset .. . label for password Password label .. . input type password name pass word id pass word .. . fieldset .. . a class next id next2 href third-form span Next span a .. . div .. . div id third-form class tab .. . fieldset .. . label for city City label .. . input type text name user city id user city .. . fieldset .. . fieldset .. . label for college College label .. . input type text name college id college .. . fieldset .. . fieldset .. . label for branch Branch label .. . input type text name branch id branch .. . fieldset .. . input type submit id signup value Sign Up .. . div .. . form .. . div .. . div",
"The same with the second-form until all the input elements in second-form are valid the third-form must be inactive and must be active only when all the input elements in second-form are valid .",
"I m using bValidator for form validation .",
".. . .. . else .. . alert Pls select only images .. . .. . script .. . .. . .. . html lang en .. . .. . head .. . meta charset utf-8 .. . meta http-equiv X-UA-Compatible content IE edge .. . meta name viewport content width device-width initial-scale 1 .. . meta name description content .. . .. . title title .. . link rel stylesheet type text css href http : fonts.googleapis.com css family Aguafina+Script .. . link rel stylesheet href https : maxcdn.bootstrapcdn.com bootstrap 3.3.6 css bootstrap.min.css integrity sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7 crossorigin anonymous .. . link rel stylesheet href css theme.min.css .. . link rel stylesheet href css styles.css .. . -- IE10 viewport hack for Surface desktop Windows 8 bug -- .. . link rel stylesheet href css ie10-viewport-bug-workaround.css .. . link rel stylesheet href https : maxcdn.bootstrapcdn.com font-awesome 4.5.0 css font-awesome.min.css .. . link rel stylesheet href netdna.bootstrapcdn.com font-awesome 3.1.1 css font-awesome.css .. . link rel stylesheet href cdn.rawgit.com Eonasdan bootstrap-datetimepicker e8bddc60e73c1ec2475f827be36e1957af72e2ea build css bootstrap-datetimepicker.css .. . link rel stylesheet href cdnjs.cloudflare.com ajax libs jquery-form-validator 2.2.8 theme-default.min.css .. . link rel stylesheet href css typeaheadjs.css .. . link rel stylesheet href https : cdn.datatables.net 1.10.11 css dataTables.bootstrap.min.css .. . script src ajax.googleapis.com ajax libs jquery 1.10.2 jquery.min.js script .. . script src https : maxcdn.bootstrapcdn.com bootstrap 3.3.6 js bootstrap.min.js integrity sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS crossorigin anonymous script .. . script src https : cdnjs.cloudflare.com ajax libs jquery-form-validator 2.2.8 jquery.form-validator.min.js script .. . head .. . div class container .. . div class row .. . div class col-sm-6 col-sm-offset-3 .. . form action php echo SERVER PHP SELF method post enctype multipart form-data class form-horizontal id frmSlide .. . .. . div class form-group .. . label class col-sm-4 control-label for imgfile Image file label .. . div class col-sm-8 .. . input-type-file id imgfile data-validation required ratio mime size data-validation-allowing jpg png gif .. . div .. . div .. . div class form-group .. . div class col-sm-8 col-md-offset-4 id image-holder .. . div .. . div .. . div class form-group .. . label class col-sm-4 control-label for seq Sequence label .. . div class col-sm-8 .. . input class form-control server name f seq id f seq data-validation number data-validation-allowing range 1 4 type text value placeholder Enter 1-4 .. . div .. . div .. . div class form-group .. . div class col-sm-offset-4 col-sm-8 .. . button name btnUpd id btnUpd type submit class clsUpd btn btn-primary i class fa fa-floppy-o i nbsp Update button .. . div .. . div .. . .. . form .. . div .. . div .. . div .. . .. . html .. . .. . Can anyone shed me light on how to fix it",
"So I am using formvalidator.net s jquery validation but I am having a problem moving the error messages shown how to here http : formvalidator.net index.html configuration position .",
"How can I have spin.js wait until the form is validated",
"I have used validation.min.js plugin for validating the form .. . .. . I am trying to get the code where initially first only the div first-form must be active and the remaining two divs second-form and third-form must be inactive and when the next is clicked in div first-form it must check for the validation of all the input elements in first-form and if all the elements are valid then only the second div i.e second-form must be active .",
"From the FormValidation.io Docs : - .. . .. . When setting options via HTML attributes remember to enable the validator by setting data-fv-numeric true .",
"I try to add to form enctype multipart form-data but won t work .",
"Please notice that on my main page i have a create call that creates a new instance and it works just fine with the form validation and the ajax post so it can t be some required jQuery or any other script .",
"disable all the form elements",
"Form fields are generated dynamically from a json file and loaded into an angularJS view on the fly .",
"This way your form would submit asynchronously and you d still prevent the normal submission process from taking place .",
"I have build a Form which have Multiple Point of Contact POC .. . So a User can create POC Multiple and when he edits it he has a option to remove as well .",
"enter image description here http : i.stack.imgur.com ipYyY.png .. . .. . Which is constructed with the following HTML .. . .. . pretty basic stuff I currently have jquery form validation embedded into my application which looks like this : .. . .. . I have removed all the fields besides this one .",
"It is possible that your HTML form action attribute has a value .",
"Note : I am currently using the form-validator.js plug in for validation but am open to suggestions .",
"I want to show the error for email in this .. . .. . label for user generated true class error label .. . .. . and is there any form validation for php also",
"My understanding is there is an option to pass additional parameter to the server in form of JSON .",
"I have to chose to create a new object from the form or to select an existant object from the grid To be able to select an existant object from the grid I disabled the validation from the form like this : .. . .. . And then to make my validation work when creating a new object from the form I used a fuction to tests if form proprities are empty or not like this : .. . .. . Every thing is doing right and I get my object correctly but when I open my firefox console I have an error message like this : .. . .. . TypeError : validator is undefined settings validator.settings .. . .. . I didn t know what is the cause of this error",
"Form validation is not working but same code is running in html and form validation also works i have uploaded all static resources please suggest me what changes in code are required .",
"I am using formValidator from FormValidator.net http : formvalidator.net security-validators and I have a situation where I need to validate password and compare password fields and according to plugin this is how we it can be done .",
"Seems there is Submit button in your HTML form",
"Employee Number Employee name .. . is Form if user Enters Value of any one field .. . it is okay . . i have a Query for DB search in only one coloum filed search .. . so i want to get HTML FORM RESULT of only one value . . if user enters two FORM FIELDS VALUES . . form wont send any thing .. .",
"I am using form validation in my application .",
"Form gets submitted multiple times only .",
"Can you show me the HTML form",
"The code .. . .. . The fix .. . .. . PHP .. . .. . JAVASCRIPT .. . .. . Hope this helps .",
"This is my form .",
"But in this example the jquery UI tabs are used instead I do not want to use tabs .",
"You could do something like .. . .. . .. . jQuery function .. . var validator signForm .validate .. . rules : .. . user name : required .. . user email : .. . required : true .. . email : true .. . .. . mobile : .. . required : true .. . digits : true .. . maxlength : 10 .. . minlength : 10 .. . .. . pass word : .. . required : true .. . .. . user city : .. . required : true .. . .. . college : .. . required : true .. . .. . branch : .. . required : true .. . .. . .. . messages : .. . user name : Please enter name .",
"Here is my code : .. . .. . Please let me know how to prevent multiple time form submission on pressing enter key .",
"Please assume that i have a correct form tag pointing to save the textbox1 even if it has no value .",
"see validate-input.php on the page you provided",
"to do the form post",
"Either the form is validated or not .",
"It looks like validation script is subscribed to the submit event of the comment-form on the page .",
"I am using a form but it does not contain any button or submit event .",
"here is the Javascript code .. . .. . here is the html code"
]
}
|
{
"confidence": [
98.89608764648438,
81.19735717773438,
80.65413665771484,
75.70585632324219,
74.6624755859375,
74.34611511230469,
73.41232299804688,
72.25019836425781,
70.66523742675781,
62.90047836303711,
61.81819152832031,
60.95753860473633,
60.87968063354492,
57.525611877441406,
57.445281982421875,
56.90056610107422,
56.405609130859375,
56.01044845581055,
55.9181022644043,
55.00217056274414
],
"content": [
"Question : null .. . Answer : 1 . I have build a Form which have Multiple Point of Contact POC .. . So a User can create POC Multiple and when he edits it he has a option to remove as well . 2 . when the user remove POC its actually Hidden its not removed because on server-side its status need to be updated and Set to InActive .. . .. . 3 . Now the problem is every POC has Field Validator and i m using this Form Validator http : formvalidator.net .. . .. . 4 . So When i make them hidden and if they are blank those fields throw validation Err Msg Which i want to ignore How to do i achieve .. . .. . How do i Ignore Hidden Fields with this Form Validator http : formvalidator.net .. . .. . I tired this but still not working .. . .. . .validate.setDefaults ignore : input type text : hidden .. . .. . I got the solution .. . .. . .formUtils.defaultConfig ignore input type text : hidden Comment : In order to get the correct help be sure to use the tag for the correct plugin . The Form Validator for Victor Jonsson is not the jQuery Validate plugin . Edited thanks .",
"Question : So I am using formvalidator.net s jquery validation but I am having a problem moving the error messages shown how to here http : formvalidator.net index.html configuration position . I have followed it and it does not work I have been trying to fix it for a while now and I cannot get it to work . My code is below . If it works there should be an error box combining the two errors above the forms like the below . Like this http : i.stack.imgur.com JceD1.png .. . .. . I might be doing something incredibly stupid but I am stuck . Note : I tried using the snippet but it doesn t work . .validate .. . validateOnBlur : false disable validation when input looses focus .. . errorMessagePosition : top Instead of element which is default .. . scrollToTopOnError : false Set this property to true if you have a long form .. . .. . .. . .. . script src http : ajax.googleapis.com ajax libs jquery 1.11.1 jquery.min.js script .. . link href https : raw.githubusercontent.com victorjonsson jQuery-Form-Validator master form-validator theme-default.css rel stylesheet .. . script src http : cdnjs.cloudflare.com ajax libs jquery-form-validator 2.2.8 jquery.form-validator.min.js script .. . link href https : maxcdn.bootstrapcdn.com bootstrap 3.3.5 css bootstrap.min.css rel stylesheet .. . form class form .. . div class form-group .. . input class form-control type text data-validation required .. . div .. . .. . div class form-group .. . textarea class form-control rows 2 data-validation required textarea .. . div .. . .. . div class form-group .. . button id submit type submit class btn btn-primary btn-lg btn-block Submit button .. . div .. . form .. . Answer : I guess you need to move up the jquery library : .. . .. . Because the jquery.form-validator.min.js file is written to use it with jQuery you need to have jquery loaded before your validation plugin file . Comment : Woops well in my code it s before the validator when I was making the snippet I guess I added it after . My main question still stands .",
"Question : I am using - victorjonsson jQuery-Form-Validator .. . .. . URL : https : github.com victorjonsson jQuery-Form-Validator .. . .. . I am validating a from and using toggleDisabled feature . Form validate the input every time I press a key even on tab to get the new field . On tab both previous and new fields get validated . Is this possible to validate the field only on blur mean any property to attach . Code I am using : .. . Answer : Use the option validateOnBlur : true",
"Question : I want to reset the validations of my form without to clean the data form.reset . I am using FormValidator http : www.formvalidator.net . This validator use the method reset of the form but I don t want clean the input data I just want remove the red borders and the error messages . http : www.formvalidator.net configuration setup .. . .. . Reset form using jQuery container form .get 0 .reset .. . .. . Thanks .. . Answer : I COPIED the reset function of the form-validator . This code was emergency and can be improved",
"Question : I was researching for form validation after a time I have found jquery-form-validator plugin which will help me to validate . but now I am trying to find out how to change error position . As now all the errors are showing in front of the field name . I want to show the error for email in this .. . .. . label for user generated true class error label .. . .. . and is there any form validation for php also .. . Answer : Use can refer their documentation here http : formvalidation.io examples showing-message-custom-area for custom error message area .. . .. . Or you may use this code : .. . .. . You may try this code in jQuery validation plugin code of every field .",
"Question : I am using formValidator from FormValidator.net http : formvalidator.net security-validators and I have a situation where I need to validate password and compare password fields and according to plugin this is how we it can be done . and since I am using their latest version of plugin I also tried what they have suggested how to do it latest version 2.2.1 as below : .. . .. . But still it is not comparing the password at all . Although I can say that minimum value comparision for password is happening properly . Have anyone worked on this plugin . Is there any other way to do this .validate .. . form : frmSample .. . validateOnBlur : true enable validation when input looses focus .. . scrollToTopOnError : true Set this property to true if you have a long form .. . borderColorOnError : rgb 167 3 0 .. . borderColorOnSuccess : a94442 .. . .. . .. . .. . script src https : ajax.googleapis.com ajax libs jquery 2.1.1 jquery.min.js script .. . script src cdnjs.cloudflare.com ajax libs jquery-form-validator 2.2.43 jquery.form-validator.min.js script .. . form id frmSample .. . p .. . Password at least 8 characters .. . input name pass confirmation data-validation length data-validation-length min8 .. . br .. . Confirm password .. . input name pass data-validation confirmation .. . p .. . form Comment : Try looking at this : stackoverflow.com questions 5147438 http : stackoverflow.com questions 5147438 match-two-fields-with-jquery-validate-plugin Comment : That is using different plugin @DinoMyte .. . Answer : You have to load the security module . Change .validate options to .validate modules : security options .. . .. . In your example your code will look like : .. . .. . HTML .. . .. . JavaScript .. . .. . See the working fiddle http : jsfiddle.net GuyT f1jsyef7 .. . .. . .. . .. . Update .. . .. . You have to use the module security because the form validator plugin is created with separate modules eg . location file swedish uk and you have to load the required module . If you want to use the uk module you have to use modules : uk and so on . Comment : That s awesome Will definitely accept this once I test in my application but before that can you please let me know why this security module Any idea on this I haven t found any description regarding this. . :",
"Question : null .. . Answer : I have been working on this issue for a day and tried various solutions but none of them seem to be working . Here the validation is : if the user can t leave the description blank . jsfiddle link is here https : jsfiddle.net 528p4mvw . Where am I going wrong with the validation Comment : your fiddle doesn t have resources e.g . jquery jquery-form-validator Comment : @hoffmanc Have updated it. . Comment : jquery form validation is a separate plugin yes Comment : @hoffmanc No. . It is not a separate plugin. . Comment : I see no validate method in the jquery docs .",
"Question : I was researching for form validation after a time I have found jquery-form-validator plugin which will help me to validate . but now I am trying to find out how to change error position . As now all the errors are showing in front of the field name . I want to show the error for email in this .. . .. . label for user generated true class error label .. . .. . and is there any form validation for php also .. . Answer : Use the attribute data-validation-error-msg-container to point out the location of an error message for a certain input .. . .. . You have some other alternatives as well when it comes to this . You can read about it on http : formvalidator.net configuration position",
"Question : I am using Jquery FormValidator http : www.formvalidator.net date-validators birthdate attribute . But .. . .. . It has been set that it only allows past dates and dates that is not older than 120 years . I just want one more validation that is it should also not allow age less than 18 yrs . How could i acheive that .. . Answer : You can use the date validtator from Date-Module https : github.com victorjonsson jQuery-Form-Validator blob master src modules date.js and add a custom validator http : www.formvalidator.net custom-validators . I just added the line var requiredAge 18 and added the var to the validation . https : jsfiddle.net 03ehx9ns .. . .. . .. . .validate .. . modules : date .. . .. . .. . .formUtils.addValidator .. . name : older18 .. . validatorFunction : function val el conf .. . var requiredAge 18 .. . var dateFormat yyyy-mm-dd .. . if el.valAttr format .. . dateFormat el.valAttr format .. . .. . else if typeof conf.dateFormat undefined .. . dateFormat conf.dateFormat .. . .. . .. . var inputDate .formUtils.parseDate val dateFormat .. . if inputDate .. . return false .. . .. . .. . var d new Date .. . var currentYear d.getFullYear .. . var year inputDate 0 .. . var month inputDate 1 .. . var day inputDate 2 .. . .. . if year currentYear - requiredAge .. . var currentMonth d.getMonth + 1 .. . if month currentMonth .. . var currentDay d.getDate .. . return day currentDay .. . .. . else .. . return month currentMonth .. . .. . .. . else .. . return year currentYear - requiredAge year currentYear - 124 we can not live for ever yet.. . .. . .. . .. . errorMessage : You need to be older then 18 .. . errorMessageKey : badDate .. . .. . .. . .. . script src https : ajax.googleapis.com ajax libs jquery 1.10.2 jquery.min.js script .. . script src https : cdnjs.cloudflare.com ajax libs jquery-form-validator 2.3.26 jquery.form-validator.min.js script .. . .. . form action id date-form .. . p .. . Birth date .. . input name .. . data-validation older18 .. . data-validation-help yyyy-mm-dd Not allowing dates in.. . .. . p .. . p .. . Time .. . input name data-validation time data-validation-help HH : mm .. . p .. . p .. . input type submit .. . p .. . form",
"Question : Hey guys I have a problem with one plugin . I am using this jquery form valdiation http : formvalidator.net to validate my form but if I have an AJAX call to submit the data then the validation is ignored . I tried setting a global variable and making a control statement at the AJAX call to stop of submitting it but when I did that the validation worked but it can t submit the data . Validation .. . .. . AJAX Submit Data : .. . Answer : I haven t used this Form Validator before so I might be going out on a limb here . But I m looking through the documentation and I see nothing on support for AJAX forms . Instead of attaching your click event to the submitComment element you could instead run your ajax logic inside of your Validator s onSuccess callback then return false at the end . This way your form would submit asynchronously and you d still prevent the normal submission process from taking place .",
"Question : I wanted to use server-side validation by jQuery Form Validator http : www.formvalidator.net security-validators backend . My understanding is there is an option to pass additional parameter to the server in form of JSON . The following snippet is from their website : .. . .. . .. . php .. . json json encode array user user- get ID .. . .. . .. . p .. . strong E-mail : strong .. . input type email .. . name check-email .. . data-validation server .. . data-validation-url validate-form-input.php .. . data-validation-param-name email .. . data-validation-req-params php echo json .. . p .. . .. . Can anyone show me how to get the user ID in validate-form-input.php as per the code shown above Thanks . Comment : see validate-input.php on the page you provided Comment : Isn t that snippet only demonstrating the code for validating the input field on the form Correct me from wrong there is an option to pass additional parm using data-validation-req-params I don t know how to get the value passed from this . Comment : var-dump your GET variable you should see the additional parameters there Comment : I dumped POST data to a log file and it shows a : 1 : s : 9 : post data a : 2 : s : 4 : user s : 1 : 1 s : 5 : email s : 20 : [email protected] How do I get the value of 1 after user Comment : I figured it out . Just simply get the value in POST . .. . Answer : I simply get it from POST .",
"Question : I m trying to use jquery-form-validator http : www.formvalidator.net file-validators to validate a form that has multiple input fields and a mandatory file-upload . For brevity I reduced 1 text input field and 1 file-upload field on my sample . The problem is every time a file is selected for upload then the validation on other field will not function . script .. . .validate .. . form : frmSlide .. . modules : file .. . validateOnBlur : false .. . errorMessagePosition : top Instead of element which is default .. . scrollToTopOnError : false Set this property to true if you have a long form .. . onError : function form .. . alert Failed .. . .. . onSuccess : function form .. . alert ok .. . return false Will stop the submission of the form .. . .. . onElementValidate : function valid el form errorMess .. . console.log Input + el.attr name + is + valid VALID : NOT VALID .. . .. . .. . .. . imgfile .on change function .. . var imgPath this 0 .value .. . var extn imgPath.substring imgPath.lastIndexOf . + 1 .toLowerCase .. . if extn gif extn png extn jpg extn jpeg .. . if typeof FileReader undefined .. . var image holder image-holder .. . image holder.empty .. . var reader new FileReader .. . reader.onload function e .. . img .. . src : e.target.result .. . class : thumb-image img-thumbnail .. . .appendTo image holder .. . .. . image holder.show .. . reader.readAsDataURL this 0 .files 0 .. . else .. . alert This browser does not support FileReader . .. . .. . else .. . alert Pls select only images .. . .. . script .. . .. . .. . html lang en .. . .. . head .. . meta charset utf-8 .. . meta http-equiv X-UA-Compatible content IE edge .. . meta name viewport content width device-width initial-scale 1 .. . meta name description content .. . .. . title title .. . link rel stylesheet type text css href http : fonts.googleapis.com css family Aguafina+Script .. . link rel stylesheet href https : maxcdn.bootstrapcdn.com bootstrap 3.3.6 css bootstrap.min.css integrity sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7 crossorigin anonymous .. . link rel stylesheet href css theme.min.css .. . link rel stylesheet href css styles.css .. . -- IE10 viewport hack for Surface desktop Windows 8 bug -- .. . link rel stylesheet href css ie10-viewport-bug-workaround.css .. . link rel stylesheet href https : maxcdn.bootstrapcdn.com font-awesome 4.5.0 css font-awesome.min.css .. . link rel stylesheet href netdna.bootstrapcdn.com font-awesome 3.1.1 css font-awesome.css .. . link rel stylesheet href cdn.rawgit.com Eonasdan bootstrap-datetimepicker e8bddc60e73c1ec2475f827be36e1957af72e2ea build css bootstrap-datetimepicker.css .. . link rel stylesheet href cdnjs.cloudflare.com ajax libs jquery-form-validator 2.2.8 theme-default.min.css .. . link rel stylesheet href css typeaheadjs.css .. . link rel stylesheet href https : cdn.datatables.net 1.10.11 css dataTables.bootstrap.min.css .. . script src ajax.googleapis.com ajax libs jquery 1.10.2 jquery.min.js script .. . script src https : maxcdn.bootstrapcdn.com bootstrap 3.3.6 js bootstrap.min.js integrity sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS crossorigin anonymous script .. . script src https : cdnjs.cloudflare.com ajax libs jquery-form-validator 2.2.8 jquery.form-validator.min.js script .. . head .. . div class container .. . div class row .. . div class col-sm-6 col-sm-offset-3 .. . form action php echo SERVER PHP SELF method post enctype multipart form-data class form-horizontal id frmSlide .. . .. . div class form-group .. . label class col-sm-4 control-label for imgfile Image file label .. . div class col-sm-8 .. . input-type-file id imgfile data-validation required ratio mime size data-validation-allowing jpg png gif .. . div .. . div .. . div class form-group .. . div class col-sm-8 col-md-offset-4 id image-holder .. . div .. . div .. . div class form-group .. . label class col-sm-4 control-label for seq Sequence label .. . div class col-sm-8 .. . input class form-control server name f seq id f seq data-validation number data-validation-allowing range 1 4 type text value placeholder Enter 1-4 .. . div .. . div .. . div class form-group .. . div class col-sm-offset-4 col-sm-8 .. . button name btnUpd id btnUpd type submit class clsUpd btn btn-primary i class fa fa-floppy-o i nbsp Update button .. . div .. . div .. . .. . form .. . div .. . div .. . div .. . .. . html .. . .. . Can anyone shed me light on how to fix it Thanks . .. . Answer : Just change the ratio validation to data-validation-ratio 1 : 1 or any ratio you want instead of ratio in the data-validation . Working fiddle here - https : jsfiddle.net Sanjeevi s9o7273r Comment : Thanks a lot . So the documentation is wrong or not updated Comment : where did you see it I just found it here - formvalidator.net file-validators dimension http : www.formvalidator.net file-validators dimension",
"Question : null .. . Answer : I have used Jquery Form validator http : www.formvalidator.net in my laravel application . But validation on password and password confirmation is not working . Console through the following error : - .. . .. . jquery.form-validator.js : 1276 Uncaught Error : Using undefined validator validate strength . Maybe you have forgotten to load the module that validate strength belongs-to and .. . .. . jquery.form-validator.js : 1276 Uncaught Error : Using undefined validator validate confirmation . Maybe you have forgotten to load the module that validate confirmation belongs-to Following is my HTML Code from view-source .. . .. . and my js code",
"Question : I m using formvalidation.io an extension of jQuery form validation to validate my form and am having trouble with fields that have the type number . I want to use the type so that the number keys are presented to the user on mobile-devices . The validation on the field is very simple : .. . .. . However it s the default validation of the number type field that causes the problem . The field will accept : 1.00 1 2.00 etc . But will not accept any decimals : 0.50 1.20 2.30 etc . The default validation Please enter a valid number is called Comment : Have you thought of using regex to solve this issue .. . Answer : Thats because the default HTML5 validation type number doesnt allow decimals without a step https : www.w3.org TR 2012 WD-html5-20121025 common-input-element-attributes.html attr-input-step specified . From the FormValidation.io Docs : - .. . .. . When setting options via HTML attributes remember to enable the validator by setting data-fv-numeric true . .. . You don t need to do that when .. . .. . i using HTML 5 type number attribute .. . .. . ii and the step attribute must be specified which its value is not an integer .. . .. . Try this : - Comment : Excellent thank you",
"Question : This is my form . I have divided it into 3 divs .. . .. . These are the validations for my code that I have written . I have used validation.min.js plugin for validating the form .. . .. . I am trying to get the code where initially first only the div first-form must be active and the remaining two divs second-form and third-form must be inactive and when the next is clicked in div first-form it must check for the validation of all the input elements in first-form and if all the elements are valid then only the second div i.e second-form must be active . The same with the second-form until all the input elements in second-form are valid the third-form must be inactive and must be active only when all the input elements in second-form are valid . When I am trying to search for solution I found http : jsfiddle.net c2y6r 1 . But in this example the jquery UI tabs are used instead I do not want to use tabs . How can I do this with divs instead of tabs .. . Answer : You could do something like .. . .. . .. . jQuery function .. . var validator signForm .validate .. . rules : .. . user name : required .. . user email : .. . required : true .. . email : true .. . .. . mobile : .. . required : true .. . digits : true .. . maxlength : 10 .. . minlength : 10 .. . .. . pass word : .. . required : true .. . .. . user city : .. . required : true .. . .. . college : .. . required : true .. . .. . branch : .. . required : true .. . .. . .. . messages : .. . user name : Please enter name . .. . user email : .. . required : please enter email .. . email : please enter valid email .. . .. . mobile : .. . required : please enter mobile number .. . email : please enter valid mobile number .. . maxlength : mobile number contains 10 digits .. . minlength : max 10 digits allowed .. . .. . pass word : Please enter password . .. . user city : Please enter user city . .. . college : Please enter college . .. . branch : Please enter branch . .. . submitHandler : function form .. . form.submit .. . .. . .. . .. . next1 next2 .click function e .. . e.preventDefault .. . if signForm .valid .. . this .attr href .show .. . this .closest .tab .hide .. . .. . .. . .. . .. . .. . second-form .. . third-form .. . display : none .. . .. . .. . .. . script type text javascript src http : code.jquery.com jquery-1.11.1.js script .. . script type text javascript src http : cdnjs.cloudflare.com ajax libs jquery-validate 1.12.0 jquery.validate.js script .. . script type text javascript src http : cdnjs.cloudflare.com ajax libs jquery-validate 1.12.0 additional-methods.js script .. . .. . div id signup-form .. . div id row .. . form id signForm .. . div id first-form class tab .. . fieldset id body .. . fieldset .. . label for name Name label .. . input type text name user name id user name .. . fieldset .. . fieldset .. . label for mobile Mobile label .. . input type text name mobile id mobile .. . fieldset .. . a class next id next1 href second-form span Next span a .. . fieldset .. . .. . div .. . div id second-form class tab .. . fieldset .. . label for email Email label .. . input type text name user email id user email .. . fieldset .. . fieldset .. . label for password Password label .. . input type password name pass word id pass word .. . fieldset .. . a class next id next2 href third-form span Next span a .. . div .. . div id third-form class tab .. . fieldset .. . label for city City label .. . input type text name user city id user city .. . fieldset .. . fieldset .. . label for college College label .. . input type text name college id college .. . fieldset .. . fieldset .. . label for branch Branch label .. . input type text name branch id branch .. . fieldset .. . input type submit id signup value Sign Up .. . div .. . form .. . div .. . div Comment : jsfiddle.net arunpjohny zh8g3qat 1 http : jsfiddle.net arunpjohny zh8g3qat 1 Comment : This is fine . But the divs must not be hidden . All three divs are visible but only one div is active at a time the remaining two divs are deactivated or to say simply until the current div input fields are valid one should not be able to perform any activity on the next div .",
"Question : I have a bootstrap-modal containing two radio-button : the first one contain a form and the second contain a kendo-grid . I have to chose to create a new object from the form or to select an existant object from the grid To be able to select an existant object from the grid I disabled the validation from the form like this : .. . .. . And then to make my validation work when creating a new object from the form I used a fuction to tests if form proprities are empty or not like this : .. . .. . Every thing is doing right and I get my object correctly but when I open my firefox console I have an error message like this : .. . .. . TypeError : validator is undefined settings validator.settings .. . .. . I didn t know what is the cause of this error Please help me . Comment : Have you set ClientValidationEnabled and UnobtrusiveJavaScriptEnabled to true in the appSettings section of web.config Also have you referenced jquery jquery.validate and jquery.validate.unobtrusive Comment : @Andy Nichols yes i have set ClientValidationEnabled and UnobtrusiveJavaScriptEnabled to true in the appSettings section of web.config and for the referenced jquery i have put section Scripts script src Scripts jquery.validate.js script script src Scripts jquery.validate.unobtrusive.js script script src js libs jquery.validate.js type text javascript script but even that the error is displaying .. . Answer : I had this error when my validating element was not a form . It looks like jQuery Validate needs to be called like form .validate or more precise selector but identifying only form .",
"Question : So I have a form which I validate before submit using jquery-form-validator http : formvalidator.net plugin But the problem here is few lines written on success is not getting executed when it goes step by step . However they work fine if executed in console or executed with debugger . Really a wiered behavior Any workaround to come over from this JS .. . .. . On validation success it calls the Controller method through ajax but without executing first 2 lines . UPDATE : Button btnContactUs is a bootstrap button which has .button functionality to show loading text . Comment : afaik .button is nothing - use .text loading Comment : Also what is line 2 supposed to do disable all the form elements Comment : can you try with asyn : false in your ajax call Comment : @Darren Sweeney. . Sorry Forgot to mention It s a bootstrap button where you have .button functionality to show loading text and yea line 2 will not disable but just adds a read only property to all form elements and just for UI purpose I ve some CSS defined for that disabled class Comment : I think your onSuccess method s return false is executing before your inner ajax success callback can run . When you put a debugger the ajax success callback event occurs and your code runs fine . .. . Answer : Your onSuccess method s return false is executing before your inner ajax success callback can run . When you put a debugger the ajax success callback event occurs and your code runs fine . We can solve this with .when and .then functionality of jquery as below : Comment : Added the answer now you can provide your solution Comment : Thanks for the answer @waqar :",
"Question : I m getting this error when I try to set multiple parameters .. . .. . SyntaxError : JSON.parse : end of data while reading object contents at line 1 column 2 of the JSON data .. . .. . I m following the instructions in the formvalidator.net http : www.formvalidator.net security-validators backend . I m using jquery-2.2.2 . Here s my code .. . .. . The error : .. . .. . enter image description here http : i.stack.imgur.com IIPFJ.png .. . .. . Thank you so much in advance for answering Comment : I accidentally hit the enterbutton . I already edited it . Comment : Ok . Just FYI It s better for us and a lot easier for you to just copy+paste your code in to the question instead of taking a screenshot and cropping it . I ve updated that for you . Comment : Thank you for doing that i m havving a hard time to paste it so i just took a screen shot . .. . Answer : Change the double quote to single quote . data-validation-req-params to data-validation-req-params .. . .. . reference : https : github.com victorjonsson jQuery-Form-Validator issues 453",
"Question : I am using jQuery-FormValidator http : formvalidator.net configuration styling plugin to validate form on client-side but whatever the suggestion they have given in the above link-to add a callback functions are not firing whereas proper errors will be displayed while trying to submit . What else I need to add to below code to make those events work Rendered HTML .. . Answer : Ok . This is how it should have been :",
"Question : I am facing a problem to validate a form onclick event . I am using a form but it does not contain any button or submit event . instead of a button i use a so how can i manage .valide when the user clicks on a a a Here is my code of form link that is clicked by the user to submit a form : .. . .. . jquery code works fine : .. . .. . but when i am trying to validate a form using .validate it is not working . Here code for validation : .. . Answer : Just use the form id to validate the form .. . .. . and in the input field add the attribute .. . .. . data-rule-required true .. . .. . and if you want custom messages just add another attribute .. . .. . data-msg-required Your message"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
html
|
UNK_RELATION
|
cleartype@implementation@39
|
cleartype -- cleartype is microsoft s @placeholder of subpixel rendering technology in rendering text in a font system .
|
{
"confidence": [
54.91584777832031,
51.898414611816406,
49.93115234375,
49.93115234375,
48.443641662597656,
47.90012741088867,
47.49834442138672,
47.49834442138672,
47.49834442138672,
47.477989196777344,
47.477989196777344,
47.379737854003906,
46.94542694091797,
46.10462188720703,
45.574188232421875,
45.06678009033203,
44.25757598876953,
44.060386657714844,
44.014259338378906,
43.56621170043945,
43.455909729003906,
43.141334533691406,
43.062095642089844,
43.022743225097656,
43.01158142089844,
42.410560607910156,
42.40178680419922,
42.291099548339844,
41.852210998535156,
41.346656799316406,
41.346656799316406,
41.040733337402344,
41.01301574707031,
40.79808807373047,
40.79808807373047,
40.79808807373047,
40.79808807373047,
40.39802551269531,
39.73418426513672,
39.73418426513672,
39.73418426513672,
39.14021301269531,
39.14021301269531,
38.45907211303711,
38.39300537109375,
38.285667419433594,
38.07630920410156,
38.07630920410156,
38.07630920410156,
37.95108413696289,
37.8988151550293,
37.57244110107422,
37.3284912109375,
37.08916091918945,
36.913665771484375,
36.913665771484375,
36.913665771484375,
36.913665771484375,
36.913665771484375,
36.913665771484375,
36.913665771484375,
36.897239685058594,
36.80119323730469,
36.80119323730469,
36.80119323730469,
36.80119323730469,
36.64190673828125,
35.84976577758789,
35.84976577758789,
35.84976577758789,
35.84976577758789,
35.84976577758789,
35.84976577758789,
35.84976577758789,
35.814048767089844,
35.814048767089844,
35.590309143066406,
35.51093673706055,
35.481319427490234,
35.481319427490234,
35.287498474121094,
35.06519317626953,
35.06519317626953,
34.86635208129883,
34.65502166748047,
34.57465362548828,
34.57465362548828,
34.55848693847656,
34.44703674316406,
34.41741943359375,
34.41741943359375,
33.89768981933594,
33.89768981933594,
33.89768981933594,
33.89768981933594,
33.89768981933594
],
"content": [
"They say the third text should use ClearType but may show wrong rendering .",
"Try turning off ClearType in Windows in case this is some weird subpixel rendering problem .",
"My question is is the letter a always the same for the same font and same font-size within ClearType rendering",
"Setting the font rendering to AntiAliasGridFit might look better than ClearType at larger font sizes .",
"I know that the glass effect is to blame since disabling it reenables the ClearType rendering .",
"Is it possible to render a font using TBitmap32.TextOut method with MS ClearType technology",
"Why has the displayed GUI different font style rendering with graphics.drawString and a default JLabel with activated cleartype",
"It might or it might not depending upon the font the size and which version of ClearType is in use and which application-settings are applied for rendering .",
"Segoe UI 48 http : imgur.com UjlUM0X.jpg .. . .. . However rendering with font-size 72 makes ClearType disappear : .. . .. .",
"I know that WPF disables ClearType text-rendering if it is in doubt whether the background is fully opaque .",
"Is there a way to definitely finally force WPF to use ClearType text-rendering in some place",
"What makes ClearType special and so colorful is that it uses sub-pixel rendering .",
"You should get the Cleartype Tuner or Adjust Cleartype Text or something .",
"There is no visual difference between software and hardware sub-pixel ClearType rendering .",
"Another quote from MSDN : .. . .. . You can use the SetTextAntialiasMode method to change the text antialias mode back to D2D1 TEXT ANTIALIAS MODE CLEARTYPE but rendering ClearType text to a transparent surface can create unpredictable results .",
"However a jQuery plug-in http : allcreatives.net 2009 12 05 jquery-plugin-ie-font-face-cleartype-fix was developed to improve font rendering when ClearType is ENABLED but the plug-in only works in Internet Explorer .",
"ClearType font rendering is used in all IE9 document modes sub-pixel positioning is used only in IE9 s default standards mode .",
"Sub-pixel font rendering like ClearType http : www.microsoft.com typography cleartypeinfo.mspx dramatically improves font display resolution and improves screen readability .",
"I do not understand the settings in the cleartype text tuner .",
"Is it possible to have font hinting and or ClearType under these circumstances",
"There s the RenderOptions.ClearTypeHint attached property that can be used to assure WPF that it s safe to use ClearType rendering in a certain subtree .",
"Is it possible to disable Cleartype for certain windows",
"enter image description here http : i.stack.imgur.com sDxAB.png .. . .. . ClearType enabled text is colorful -- but that blurry text is not because it does not use ClearType -- it uses gray sub-pixel anti-aliasing and that s not how ClearType works : http : en.wikipedia.org wiki ClearType .. . .. . The question is : how do I enable ClearType for this text",
"If you have access to the DrawingContext and are doing the low-level text-rendering yourself you can do a DrawRectangle behind the text with a fill and ClearType gets reenabled .",
"search for cleartype .",
"How do i draw ClearType text on glass",
"http : en.wikipedia.org wiki ClearType",
"Getting rid of cleartype and font smoothing in IE9 2 .",
"Using the provided RenderOptions.ClearTypeHint Enabled allows you to designate child elements to reenable ClearType rendering from that point in the tree .",
"On my PC any ClearType-less text is mess .",
"Then draw normal text on top of it which will get ClearType .",
"So the new WPF 4 text-rendering looks great but enabling the aero-glass effect on a window requires that you change the background to transparent which of course disables ClearType rendering .",
"To answer all the ClearType enthusiasts--I like ClearType too .",
"Windows Cleartype was the problem .",
"http : en.wikipedia.org wiki ClearType",
"Consolas always uses ClearType .",
"Then you essentially disable cleartype .",
"For example a thread on TypeKit s support site http : getsatisfaction.com typekit topics typekit fonts rendering horribly on windows based systems seems to point to font rendering problems when ClearType is DISABLED .",
"Is this simply a ClearType problem",
"ClearType is a user setting on the browser .",
"There is no CSS solution to disable cleartype .",
"How can I turn ClearType on",
"Does cleartype have something to do with this",
"Windows on ARM will not support ClearType .",
"silly question - are you using a font with ClearType support in Sublime",
"To answer your question directly : .. . .. . ClearType font rendering is used in all IE9 document modes sub-pixel positioning is used only in IE9 s default standards mode .",
"The DropShadowEffect object cannot work with ClearType .",
"ClearType blends the foreground and background pixels .",
"Don t use ClearType anti-aliasing .",
"If you like ClearType then you re going to hate what IE does when it tries to use ClearType in these situations...your text looks chunky fat and ugly .",
"And when I ran it on Windows 7 the code no longer works due to Cleartype .",
"Whether ClearType helps or hurts seems to be totally dependent on the font s being used and what kind of hinting is built into them .",
"Does WinRT provides an option to fall back to software ClearType font rendering as Direct2D do via Direct2D and GDI Interoperability or we will be stuck with somewhat blurry hardware font anti-aliasing only",
"Problem is that when IE tries to use ClearType on some specific elements it looks worse than if you had ClearType disabled .",
"ClearType does not function on glass and you cannot use it .",
"Is there a way to enable both ClearType and filters in Internet Explorer",
"Is there a way to enable both ClearType and filters in Internet Explorer",
"Looks something like cleartype not being set .",
"the first line is rendered with Grayscale and the second is rendered with ClearType .",
"I d expect the grayscale and cleartype renderings to be consistent .",
"I have ClearType on as you maybe understand at this point",
"Can the IE control s cleartype usage and font-size be programmatically controlled",
"I think it has to do with Cleartype .",
"By the way which ClearType are you referring to",
"Windows8 Desktop will still have ClearType .",
"With ClearType turned off there is really no hope .",
"Even native system fonts look bad with ClearType off .",
"It s blurry only because ClearType is not used .",
"This is how it looks like in Firefox when shadow AND ClearType : .. . .. .",
": It s blurry because ClearType is not being used .",
"As a result ClearType is disabled when using these effects .",
"Firefox however uses ClearType and everything looks sharp .",
"Consider the reverse - what if a website forced cleartype to be on",
"Yeah you leave my ClearType alone",
"Notes : .. . .. . It doesn t do it for me in Linux since there is no ClearType it only happens when I enable ClearType on Windows .",
"Second now that ClearType is disabled Windows will fall back to a non-cleartype anti-aliasing solution .",
"Using GDI+ to draw text on glass : .. . .. . You ll notice that the ClearType enabled text draws very poorly on glass : .. . .. .",
"I recently migrated to using MahApps.Metro for my window and when I m on my Login Screen it flickers between cleartype and non-cleartype every few seconds .. . .. .",
"http : image.free.in.th z ie yqbsg.png .. . .. . I was wondering that why ClearType font looks so ugly on bright bg",
"To workaround this we decided to override the OS Setting and always for ClearType smoothing to be on when Consolas is the editor font .",
"I m currently trying to add the feature that is discussed here : http : blog.bmn.name 2008 03 jquery-fadeinfadeout-ie-cleartype-glitch .. . .. . A glitch in IE7 when fading with the .fadeIn and .fadeOut in jQuery IE drops the windows Cleartype rendering which results in very ugly text .",
"Quoting from the thread above : .. . .. . What is left is the font smoothing aka sub-pixel rendering and that is the blurring effect you still see after turning cleartype off .",
"So given all of that background information and prior research my question is : .. . .. . What s the best way compromise to ensure decent font rendering for modern browsers on all platforms regardless of Windows ClearType settings",
"Making things worse if you disable ClearType in the OS in some cases IE will fall back to DirectWrite s default non-cleartype anti-aliasing which is even fuzzier than ClearType .",
"I would like the font to be rendered using ClearType but I seem to unable to do that when font-size is larger than 48 points .",
"I installed IE9 but it is impossible to turn off ClearType .",
"In Windows on ARM WinRT ClearType is globally disabled .",
"Some sources : .. . .. . http : blogs.msdn.com b ie archive 2006 08 31 730887.aspx .. . IE is losing ClearType http : stackoverflow.com questions 411058 ie-is-losing-cleartype .. . Correcting IE Cleartype Filter Problem when Animating Opacity of Text with jQuery http : stackoverflow.com questions 4563982 correcting-ie-cleartype-filter-problem-when-animating-opacity-of-text-with-jquery",
"Check out older questions on ClearType especially stackoverflow.com questions 5676768 http : stackoverflow.com questions 5676768 enable-disable-cleartype-in-windows7",
"Question : .. . .. . Is there a way to check if a given font is one of Microsoft s ClearType-optimized fonts http : www.microsoft.com typography ClearTypeFonts.mspx",
"You can have both an MS CSS filter on an element and still enable ClearType on the font within .",
"It seems that it is impossible to turn ClearType back on after applying a filter e.g .",
"enter image description here http : i.stack.imgur.com WRJzX.png .. . .. . ClearType is here .",
"but that doesn t explain the difference between the two Grayscale ClearType renderings .",
"Actually ClearType can be disabled but you need an extension to do it .",
"Aliased is really nasty and Grayscale seems like it s exactly the same as ClearType"
]
}
|
{
"confidence": [
68.13404846191406,
67.01258850097656,
66.23300170898438,
65.99088287353516,
64.8519058227539,
64.53516387939453,
64.20863342285156,
63.598060607910156,
63.50352096557617,
62.57157897949219,
62.440494537353516,
61.507633209228516,
60.22679138183594,
60.13559341430664,
59.430747985839844,
59.0744743347168,
58.610801696777344,
57.72774124145508,
56.94342041015625
],
"content": [
"Question : It s well documented e.g . here http : connect.microsoft.com IE feedback details 598107 cleartype-is-always-used-even-when-disabled-in-ie-options-and-window-7 that IE9 ignores the OS-wide settings for font smoothing aka anti-aliasing . Even if font-smoothing and ClearType are disabled in Windows IE still shows anti-aliased fonts which some users struggle to read especially at small font sizes . How can I disable all font anti-aliasing ClearType or otherwise in IE9 More details : .. . .. . Our company builds a web application which uses a lot of small fonts . With the release of IE9 some of our users have complained that IE9 s default anti-aliasing makes our small fonts fuzzy or blurry . So we need to help our users who ve installed IE9 and who want to turn off anti-aliasing . Also personally I have trouble reading small anti-aliased fonts so I d like a solution for my own use even for sites I don t control . In IE8 I could uncheck the Always use ClearType for HTML and then disable ClearType in the OS and IE8 would show all fonts aliased . But in IE9 this option is missing . After some research about the problem here s what I ve learned : the core issue is that IE relies on DirectWrite for text-rendering and does not support any of the newer rendering options which would draw text without anti-aliasing and respect the user s OS-wide default choices . Making things worse if you disable ClearType in the OS in some cases IE will fall back to DirectWrite s default non-cleartype anti-aliasing which is even fuzzier than ClearType . Comment : IE9 isn t a WPF app . Comment : @BoltClock might want to check that out you d be surprised . I think ManagedSpy shows it . Comment : @SilverbackNet : All I see are rumors.. . Comment : A patch has been released by Microsoft to fix the font s in IE9 on Windows.. . support.microsoft.com kb 2545698 http : support.microsoft.com kb 2545698 Comment : @David : the patch doesn t work here are folks who confirm this : social.technet.microsoft.com Forums en ieitprocurrentver thread http : social.technet.microsoft.com Forums en ieitprocurrentver thread 01c447b1-5c78-4d2f-9968-6eeabc04a68b .. . Answer : To answer your question directly : .. . .. . ClearType font rendering is used in all IE9 document modes sub-pixel positioning is used only in IE9 s default standards mode . IE9 s compatibility modes Quirks 7 and 8 use whole-pixel text metrics . .. . .. . So try switching your doctype to use Quirks mode http : en.wikipedia.org wiki Quirks mode : .. . .. . The other thing to consider is to try avoid point based font sizes http : www.hanselman.com blog TheUltimateGuideOfFiveThingsForNewIE9UsersWhoFearChange.aspx . .. . .. . Important information regarding fonts blurriness and rendering in IE9 .. . .. . IE 9 text renders very poorly is there a workaround http : stackoverflow.com questions 5558773 ie-9-text-renders-very-poorly-is-there-a-workaround 5639736 .. . .. . MSDN sources : .. . .. . Sub-pixel Fonts in IE9 - blogs.msdn.com b ie archive 2010 11 03 sub-pixel-fonts-in-ie9.aspx http : blogs.msdn.com b ie archive 2010 11 03 sub-pixel-fonts-in-ie9.aspx .. . IE9 s blurry font text - www.hanselman.com blog TheUltimateGuideOfFiveThingsForNewIE9UsersWhoFearChange.aspx http : www.hanselman.com blog TheUltimateGuideOfFiveThingsForNewIE9UsersWhoFearChange.aspx .. . Defining Document Compatibility http : msdn.microsoft.com en-us library cc288325 28VS.85 29.aspx .. . Documents Mode http : msdn.microsoft.com en-us library ff955379 28v VS.85 29.aspx",
"Question : null .. . Answer : I m trying to render large size font characters to a bitmap using GDI+ for later offline use as a bitmap font for drawing text using Direct3D on Windows Phone to be precise . I would like the font to be rendered using ClearType but I seem to unable to do that when font-size is larger than 48 points . Here s the code I m using : .. . .. . When rendered using font-size 48 it looks like this : .. . .. . Segoe UI 48 http : imgur.com UjlUM0X.jpg .. . .. . However rendering with font-size 72 makes ClearType disappear : .. . .. . Segoe UI 72 http : imgur.com ouu30qC.jpg .. . .. . Why is this the case I know TextRenderingHint.ClearTypeGridFit is a hint and not an order but can I somehow force it to use ClearType all the time Comment : Setting the font rendering to AntiAliasGridFit might look better than ClearType at larger font sizes . Comment : That s what I ended up doing though I still wonder why ClearType refuses to work . Comment : Different fonts switch over at different sizes . How do you know when to use AntiAliasGridFit",
"Question : First some background information . It seems that using the CSS3 @font-face rule can interact in unexpected and undesired ways with ClearType font renderingv in any browser on any version of Windows XP and above . I first documented this as a Google Font Directory bug http : code.google.com p googlefontdirectory issues detail id 44 when I ran into it . Further research seems to yield conflicting information having ClearType enabled or disabled can either help or hurt how a @font-face font renders in any web browser in Windows . Whether ClearType helps or hurts seems to be totally dependent on the font s being used and what kind of hinting is built into them . For example a thread on TypeKit s support site http : getsatisfaction.com typekit topics typekit fonts rendering horribly on windows based systems seems to point to font rendering problems when ClearType is DISABLED . However a jQuery plug-in http : allcreatives.net 2009 12 05 jquery-plugin-ie-font-face-cleartype-fix was developed to improve font rendering when ClearType is ENABLED but the plug-in only works in Internet Explorer . Interestingly the font used on the plug-in s demo pages does render poorly when ClearType is enabled but when it s disabled the two demo pages render identically correctly . So given all of that background information and prior research my question is : .. . .. . What s the best way compromise to ensure decent font rendering for modern browsers on all platforms regardless of Windows ClearType settings .. . .. . My first idea was to use stylesheets that include the @font-face fonts by default . JavaScript could detect the user s OS and if Windows is detected could programmatically modify stylesheet classes to use font-families that don t include the @font-face fonts so that system-native fallback fonts are used . I realized later that someone else also thought of this http : blog.costan.us 2011 02 quick-fix-for-ugly-font-rendering-in.html . It s a hacky and inelegant solution though . Ideally I want my web fonts to be usable regardless of the platform without relying on something like sIFR or Cufon . Does anyone have pointers or better ideas Comment : I m suffering from the same illness . No cure found yet.. . : Comment : Same question fixes here http : stackoverflow.com q 11487427 1114320 and I ve written a blog post with lot s of screenshots and solutions here http : www.dev-metal.com fix-ugly-font-rendering-google-chrome .. . Answer : This is a big issue and is an official bug in Google Chrome since July 2012 . In August 2013 this seems to be fixed in MOST cases . However there re still examples where fonts look edgy and pixelated . Solution : .. . .. . Give the element a decent text-stroke : .. . .. . More info : .. . .. . I ve written a big blog article about this topic including a lot of screenshots and 4 different solutions to fix the issue : Have a look here : .. . .. . How to fix the ugly font rendering in Google Chrome http : www.dev-metal.com fix-ugly-font-rendering-google-chrome Comment : +1 for excellent blog post",
"Question : Using GDI+ to draw text on glass : .. . .. . You ll notice that the ClearType enabled text draws very poorly on glass : .. . .. . alt text http : i.stack.imgur.com r0oKz.png .. . .. . But with glass disabled the text of course draw fine : .. . .. . alt text http : i.stack.imgur.com urfkf.png .. . .. . By way of comparison here is Anti-alias font smoothing : .. . .. . alt text http : i.stack.imgur.com ilQOy.png .. . .. . And here is no font smoothing : .. . .. . alt text http : i.stack.imgur.com vcaoo.png .. . .. . Note : No font smoothing looks better than it really does because StackOverflow resizes the images on your monitor . How do i draw ClearType text on glass Notes .. . .. . Win32 native .. . not .NET i.e . native .. . not Winforms i.e . native .. . GDI+ i.e . native .. . .. . .. . .. . What Mark is suggesting is that you cannot honor the user s preferences for text-rendering i.e . SystemDefault . ClearType does not function on glass and you cannot use it . In other words if you re rendering on glass you must override the text-rendering with : .. . .. . Otherwise you should leave the TextRenderingHint at it s default TextRenderingHintSystemDefault . See also .. . .. . Aero : How to draw solid colors on glass http : stackoverflow.com questions 4258295 aero-how-to-draw-solid-colors-on-glass .. . Windows Aero : What color to paint to make glass appear http : stackoverflow.com questions 1870139 windows-aero-what-color-to-paint-to-make-glass-appear .. . WPF : Extending glass into client area disables ClearType entirely https : connect.microsoft.com VisualStudio feedback details 502846 wpf-extending-glass-into-client-area-disables-cleartype-entirely wa wsignin1.0 .. . Answer : The problem is inherent to the way drawing is performed . All of your text is being drawn on a black background then composited onto a glass background the semi-transparent font smoothing is being combined with black to make near-black . Comment : The answer you re saying is you cannot you must force anti-alias font smoothing . Accepted .",
"Question : First some background information . It seems that using the CSS3 @font-face rule can interact in unexpected and undesired ways with ClearType font renderingv in any browser on any version of Windows XP and above . I first documented this as a Google Font Directory bug http : code.google.com p googlefontdirectory issues detail id 44 when I ran into it . Further research seems to yield conflicting information having ClearType enabled or disabled can either help or hurt how a @font-face font renders in any web browser in Windows . Whether ClearType helps or hurts seems to be totally dependent on the font s being used and what kind of hinting is built into them . For example a thread on TypeKit s support site http : getsatisfaction.com typekit topics typekit fonts rendering horribly on windows based systems seems to point to font rendering problems when ClearType is DISABLED . However a jQuery plug-in http : allcreatives.net 2009 12 05 jquery-plugin-ie-font-face-cleartype-fix was developed to improve font rendering when ClearType is ENABLED but the plug-in only works in Internet Explorer . Interestingly the font used on the plug-in s demo pages does render poorly when ClearType is enabled but when it s disabled the two demo pages render identically correctly . So given all of that background information and prior research my question is : .. . .. . What s the best way compromise to ensure decent font rendering for modern browsers on all platforms regardless of Windows ClearType settings .. . .. . My first idea was to use stylesheets that include the @font-face fonts by default . JavaScript could detect the user s OS and if Windows is detected could programmatically modify stylesheet classes to use font-families that don t include the @font-face fonts so that system-native fallback fonts are used . I realized later that someone else also thought of this http : blog.costan.us 2011 02 quick-fix-for-ugly-font-rendering-in.html . It s a hacky and inelegant solution though . Ideally I want my web fonts to be usable regardless of the platform without relying on something like sIFR or Cufon . Does anyone have pointers or better ideas Comment : I m suffering from the same illness . No cure found yet.. . : Comment : Same question fixes here http : stackoverflow.com q 11487427 1114320 and I ve written a blog post with lot s of screenshots and solutions here http : www.dev-metal.com fix-ugly-font-rendering-google-chrome .. . Answer : A similar question here : Font-face embedded fonts look fuzzy in Windows 7 browsers http : stackoverflow.com questions 2858560 font-face-embedded-fonts-look-fuzzy-in-windows-7-browsers got an answer that solved the same issue for me . The fontsquirrel font generator http : www.fontsquirrel.com fontface generator optimizes fonts and adds them with hinting rendering info that helps the windows font rendering engine render them better . It also generates smaller files which will download faster .",
"Question : It s well documented e.g . here http : connect.microsoft.com IE feedback details 598107 cleartype-is-always-used-even-when-disabled-in-ie-options-and-window-7 that IE9 ignores the OS-wide settings for font smoothing aka anti-aliasing . Even if font-smoothing and ClearType are disabled in Windows IE still shows anti-aliased fonts which some users struggle to read especially at small font sizes . How can I disable all font anti-aliasing ClearType or otherwise in IE9 More details : .. . .. . Our company builds a web application which uses a lot of small fonts . With the release of IE9 some of our users have complained that IE9 s default anti-aliasing makes our small fonts fuzzy or blurry . So we need to help our users who ve installed IE9 and who want to turn off anti-aliasing . Also personally I have trouble reading small anti-aliased fonts so I d like a solution for my own use even for sites I don t control . In IE8 I could uncheck the Always use ClearType for HTML and then disable ClearType in the OS and IE8 would show all fonts aliased . But in IE9 this option is missing . After some research about the problem here s what I ve learned : the core issue is that IE relies on DirectWrite for text-rendering and does not support any of the newer rendering options which would draw text without anti-aliasing and respect the user s OS-wide default choices . Making things worse if you disable ClearType in the OS in some cases IE will fall back to DirectWrite s default non-cleartype anti-aliasing which is even fuzzier than ClearType . Comment : IE9 isn t a WPF app . Comment : @BoltClock might want to check that out you d be surprised . I think ManagedSpy shows it . Comment : @SilverbackNet : All I see are rumors.. . Comment : A patch has been released by Microsoft to fix the font s in IE9 on Windows.. . support.microsoft.com kb 2545698 http : support.microsoft.com kb 2545698 Comment : @David : the patch doesn t work here are folks who confirm this : social.technet.microsoft.com Forums en ieitprocurrentver thread http : social.technet.microsoft.com Forums en ieitprocurrentver thread 01c447b1-5c78-4d2f-9968-6eeabc04a68b .. . Answer : The info here solves two problems : 1 . Getting rid of cleartype and font smoothing in IE9 2 . Getting rid of cleartype and font smoothing when IE10 is installed or installs itself automatically .. . .. . I had done a registery hack to turn off cleartype in IE9 : HKEY CURRENT USER Software Microsoft Internet Explorer Main UseClearType no and used a little piece of freeware to get rid of font smoothing in IE9 : https : softwareninjas.kilnhg.com Repo Open-Source Group DWrite-dll-Wrapper .. . .. . Then IE10 automatically installed itself and the blurry type was back . I tried uninstalling IE 10 which wasn t through the add remove programs interface but rather through the installed updates interface--removing the IE10 update . That ostensibly took me back to IE9 but the blurry type remained in spite of the fact that no was still the answer for cleartype in the registry and the two .dll files were still in my IE program folder . So I decided to uninstall IE9 and reinstall it . That also involved going through the installed updates interface and removing the IE9 update . I rebooted and expected to have to reinstall the program but my IE icon was still there . When I clicked it IE9 opened with nice sharp type .",
"Question : First some background information . It seems that using the CSS3 @font-face rule can interact in unexpected and undesired ways with ClearType font renderingv in any browser on any version of Windows XP and above . I first documented this as a Google Font Directory bug http : code.google.com p googlefontdirectory issues detail id 44 when I ran into it . Further research seems to yield conflicting information having ClearType enabled or disabled can either help or hurt how a @font-face font renders in any web browser in Windows . Whether ClearType helps or hurts seems to be totally dependent on the font s being used and what kind of hinting is built into them . For example a thread on TypeKit s support site http : getsatisfaction.com typekit topics typekit fonts rendering horribly on windows based systems seems to point to font rendering problems when ClearType is DISABLED . However a jQuery plug-in http : allcreatives.net 2009 12 05 jquery-plugin-ie-font-face-cleartype-fix was developed to improve font rendering when ClearType is ENABLED but the plug-in only works in Internet Explorer . Interestingly the font used on the plug-in s demo pages does render poorly when ClearType is enabled but when it s disabled the two demo pages render identically correctly . So given all of that background information and prior research my question is : .. . .. . What s the best way compromise to ensure decent font rendering for modern browsers on all platforms regardless of Windows ClearType settings .. . .. . My first idea was to use stylesheets that include the @font-face fonts by default . JavaScript could detect the user s OS and if Windows is detected could programmatically modify stylesheet classes to use font-families that don t include the @font-face fonts so that system-native fallback fonts are used . I realized later that someone else also thought of this http : blog.costan.us 2011 02 quick-fix-for-ugly-font-rendering-in.html . It s a hacky and inelegant solution though . Ideally I want my web fonts to be usable regardless of the platform without relying on something like sIFR or Cufon . Does anyone have pointers or better ideas Comment : I m suffering from the same illness . No cure found yet.. . : Comment : Same question fixes here http : stackoverflow.com q 11487427 1114320 and I ve written a blog post with lot s of screenshots and solutions here http : www.dev-metal.com fix-ugly-font-rendering-google-chrome .. . Answer : Check out this article about pretty much the same thing : .. . .. . IE7 8 font smoothing : http : allcreatives.net 2009 12 05 smoother-font-face-embedding-in-ie-7-8 .. . .. . There s a lot in the comments about it too . I ve been looking for similar supports lately without much joy . I had to use Cufon on one project cause the client wanted a very particular font . Sometimes sIFR and Cufon are the only solutions but honestly I d stay away from sIFR . Hope this helps . Comment : I find that ClearType makes all my custom fonts look like crap no matter what browser even non-IE browsers . Comment : I m having the same issue as BoltClock . I linked to another allcreatives.net page in my original post . Although there are some hacks for making IE behave I m curious about solutions for other browsers in Windows .",
"Question : null .. . Answer : I know that WPF disables ClearType text-rendering if it is in doubt whether the background is fully opaque . There s the RenderOptions.ClearTypeHint attached property that can be used to assure WPF that it s safe to use ClearType rendering in a certain subtree . This is what I used on my popup with an opaque background and a shadow around it . But it has no effect . The text always shows up with greyscale smoothing . I tried the official documentation http : msdn.microsoft.com de-de library system.windows.media.renderoptions.cleartypehint 28v vs.110 29.aspx of this property and its example in Kaxaml . They say the third text should use ClearType but may show wrong rendering . But it s wrong The third text is also just greyscale . Also when inspecting the default control template for a ComboBox popup they don t do anything else but it works fine in their control . I want the same rendering performance in my customised popup control . Is there a way to definitely finally force WPF to use ClearType text-rendering in some place I don t like its stupid smartness that prevents the right things from happening because they might be unsafe but really are not .",
"Question : It s well documented e.g . here http : connect.microsoft.com IE feedback details 598107 cleartype-is-always-used-even-when-disabled-in-ie-options-and-window-7 that IE9 ignores the OS-wide settings for font smoothing aka anti-aliasing . Even if font-smoothing and ClearType are disabled in Windows IE still shows anti-aliased fonts which some users struggle to read especially at small font sizes . How can I disable all font anti-aliasing ClearType or otherwise in IE9 More details : .. . .. . Our company builds a web application which uses a lot of small fonts . With the release of IE9 some of our users have complained that IE9 s default anti-aliasing makes our small fonts fuzzy or blurry . So we need to help our users who ve installed IE9 and who want to turn off anti-aliasing . Also personally I have trouble reading small anti-aliased fonts so I d like a solution for my own use even for sites I don t control . In IE8 I could uncheck the Always use ClearType for HTML and then disable ClearType in the OS and IE8 would show all fonts aliased . But in IE9 this option is missing . After some research about the problem here s what I ve learned : the core issue is that IE relies on DirectWrite for text-rendering and does not support any of the newer rendering options which would draw text without anti-aliasing and respect the user s OS-wide default choices . Making things worse if you disable ClearType in the OS in some cases IE will fall back to DirectWrite s default non-cleartype anti-aliasing which is even fuzzier than ClearType . Comment : IE9 isn t a WPF app . Comment : @BoltClock might want to check that out you d be surprised . I think ManagedSpy shows it . Comment : @SilverbackNet : All I see are rumors.. . Comment : A patch has been released by Microsoft to fix the font s in IE9 on Windows.. . support.microsoft.com kb 2545698 http : support.microsoft.com kb 2545698 Comment : @David : the patch doesn t work here are folks who confirm this : social.technet.microsoft.com Forums en ieitprocurrentver thread http : social.technet.microsoft.com Forums en ieitprocurrentver thread 01c447b1-5c78-4d2f-9968-6eeabc04a68b .. . Answer : After a few days of searching I found an MSDN Forums thread http : social.technet.microsoft.com Forums en ieitprocurrentver thread 01c447b1-5c78-4d2f-9968-6eeabc04a68b which pointed me to a solution here : http : www.softwareninjas.ca dwrite-dll-wrapper .. . .. . Follow the instructions on that page and you ll remove anti-aliasing from IE9 at least the 32-bit version of IE which is the default IE even on 64-bit Windows 7 . I ve tested it so far on a Win7 x64 laptop and it worked flawlessly . Big thanks to Olivier Dagenais who built this . Here s a technical summary of how his solution works . It s a two-step process . First you need to disable ClearType in IE via a registry key . This is the same setting which was available in previous versions of IE but it was removed from the IE UI because it stopped working in IE9 . Second now that ClearType is disabled Windows will fall back to a non-cleartype anti-aliasing solution . Now that fallback anti-alising also needs to be disabled . Quoting from the thread above : .. . .. . What is left is the font smoothing aka sub-pixel rendering and that is the blurring effect you still see after turning cleartype off . .. . In case you were wondering there is a way to turn that off too . .. . The method i used to turn off the sub-pixel wonder is to build a simple wrapper for dwrite.dll which intercepts and forwards calls to the real dwrite.dll disabling font smoothing in the process . .. . You can download it from : http : www.softwareninjas.ca dwrite-dll-wrapper .. . .. . You can find the code at https : softwareninjas.kilnhg.com Repo Open-Source Group DWrite-dll-Wrapper .. . .. . This was a pretty cool hack . Probably somewhat brittle across windows and DirectX releases but will do the trick for now until Microsoft gets their act together to fix the underlying can t disable anti-aliasing problem in IE itself . It also works for apps which use the IE WebBrowser control aka MSHTML so you can control anti-aliasing on an app-by-app basis . It also works for the HTML Help viewer . Note that the text quality in IE9 standards mode isn t ideal . Specifically small fonts sometimes have letters sometimes run together without the usual one-pixel space between them . If you render the same page in compatibility-mode or your site uses a non-strict DTD or other non-standards-enforcing DTD then it looks fine . So there s an additional step for some sites if they want the best aliased text-rendering : just view a site in compatibility-mode by pressing the compatibility button in IE s toolbar . Comment : A patch has been released by Microsoft to fix the font s in IE9 on Windows.. . support.microsoft.com kb 2545698 http : support.microsoft.com kb 2545698 Comment : @David : that patch doesn t have any effect as far as this bug",
"Question : Does WinRT provides an option to fall back to software ClearType font rendering as Direct2D do via Direct2D and GDI Interoperability or we will be stuck with somewhat blurry hardware font anti-aliasing only Comment : No GDI in WinRT DirectWrite is it . High DPI panels for everyone yahoo . Comment : @Hans DirectWrite still has the option to fall back to GDI classic antialiasing but I don t think that s exposed in Windows.UI.Xaml . Comment : Pavel is probably right . Comment : There is no visual difference between software and hardware sub-pixel ClearType rendering . I think perhaps you are referring to regular gray-scale smoothing vs ClearType . Comment : This might be useful : stackoverflow.com questions 8612266 http : stackoverflow.com questions 8612266 why-cant-directx-directwrite-direct2d-text-rendering-be-as-sharp-as-gdi 8663198 8663198 .. . Answer : No . Windows on ARM will not support ClearType . This is by design . Instead Windows on ARM tablets will be required to have a high DPI . http : www.istartedsomething.com 20120303 cleartype-takes-a-back-seat-for-windows-8-metro Comment : Which is stupid because for the first many years 99 of all Windows 8 Metro users will be on the desktop and they ll have to suffer for this stupidity . Comment : I wasn t commenting on whether it was a good idea merely that it is by design . Note that Windows on ARM is tablet only . Windows8 Desktop will still have ClearType . Comment : Oh I know . I m just venting . I m not sure I understood your comment correctly going by Zheng s article Metro apps on Windows 8 PCs will also not have ClearType no Comment : In Windows8 on the desktop the start screen and all metro apps will not have ClearType but desktop applications will . In Windows on ARM WinRT ClearType is globally disabled .",
"Question : So the new WPF 4 text-rendering looks great but enabling the aero-glass effect on a window requires that you change the background to transparent which of course disables ClearType rendering . Using the provided RenderOptions.ClearTypeHint Enabled allows you to designate child elements to reenable ClearType rendering from that point in the tree . I ve found a few other topics that talk about doing this for the ScrollViewer used internally inside RichTextBox and FlowDocumentScrollViewer and creating a custom style does indeed fix it so that my FlowDocument gets ClearType rendering again . However this only applies to top level paragraphs in the FlowDocument . If I add floaters or figures or a table any text inside them is inexplicably grayscale again . I know that the glass effect is to blame since disabling it reenables the ClearType rendering . I looked through the visual tree with Snoop but both the main content which renders properly and the sub-content which is grayscale have similar element hierarchies without anything to which I can attach RenderOptions.ClearTypeHint . Has anyone run into this problem Is there a workaround or a solution I checked Connect but there isn t any bug filed about this . It s quite an annoying problem . Comment : so you still have not found out a better way to do this I m kinda lost with this one and your accepted solution seems cumbersome . .. . Answer : After doing a lot more research and comparing the way different controls work on and off of aero-glass I ve found a few answers . The TextBox control doesn t work properly either but portions of FlowDocument and things like TextBlock do which prompted me to explore why . After digging around in reflector for a while I found that when using the advanced text formatting APIs to get text and render it onto a drawing context the RenderOption flags essentially go ignored since the drawing system knows from the root visual the window that transparency was enabled . Once that happens all the RenderOptions flags in the world aren t going to get ClearType back . I did happen to stumble on a work-around though . If you have access to the DrawingContext and are doing the low-level text-rendering yourself you can do a DrawRectangle behind the text with a fill and ClearType gets reenabled . I assume that this is the only way for the renderer to be sure that it has a proper background to draw on . So in summary you need to do your own text drawing and additionally you need to explicitly draw a background using the same DrawingContext behind your text in order for ClearType to get rendered properly . Comment : can you show some example code",
"Question : I have a grid with this template and styles in WPF XAML : .. . .. . The DropShadowEffect I have when you select a grid row seems to make the text-rendering blurry gray anti-aliasing : .. . .. . enter image description here http : i.stack.imgur.com MN3Kp.png .. . .. . When I remove the drop shadow effect it looks clear because it now uses ClearType and not gray sub-pixel anti-aliasing : .. . .. . enter image description here http : i.stack.imgur.com D4AzF.png .. . .. . I have tried applying RenderOptions.ClearTypeHint Enabled to the ContentPresenter as seen above but it does not help . How do I force WPF to render the text that gets displayed with drop shadow effect to retain Cleartype anti-aliasing instead of that ugly blurry gray sub-pixel anti-aliasing Some believe it s blurry because of the drop shadow -- this is not true . It s blurry only because ClearType is not used . This is how it looks like in Firefox when shadow AND ClearType : .. . .. . enter image description here http : i.stack.imgur.com sDxAB.png .. . .. . ClearType enabled text is colorful -- but that blurry text is not because it does not use ClearType -- it uses gray sub-pixel anti-aliasing and that s not how ClearType works : http : en.wikipedia.org wiki ClearType .. . .. . The question is : how do I enable ClearType for this text Comment : To my eyes it looks blurry because of the drop-shadow effect not because of the anti-aliasing style . Comment : @CodyGray Sorry but you are wrong . : It s blurry because ClearType is not being used . Comment : Hmm.. . Can you tell me what s wrong with my answer Comment : Pedantry : I wanted to point out that the text shadow rendering is just standard anti-aliasing like that used on Mac and Linux OS . There s nothing sub-pixel about it . What makes ClearType special and so colorful is that it uses sub-pixel rendering . .. . Answer : What about combining the two ideas . Draw the text with DropShadowEffect and overlay it with the same text drawn without effect like shown in the third line here : .. . .. . text http : i.stack.imgur.com LuZbK.png .. . .. . Still not perfect and i find it a little bold . But perhaps something you could live with . The XAML :",
"Question : I am developing some OCR software for small on-screen fonts . The fonts are rendered in the browser . I notice that they are rendered with ClearType onto the screen and the letters in the words seem to be the same no matter where they are located on-screen although I have not checked many cases just some common cases . For example in the following image the letter a is repeated twice once at the beginning and nice later 3rd from the end . The letter a looks exactly the same pixel for pixel . My question is is the letter a always the same for the same font and same font-size within ClearType rendering Does the same apply for all letters within the same font enter image description here http : i.stack.imgur.com WRJzX.png .. . .. . ClearType is here . http : en.wikipedia.org wiki ClearType .. . Answer : It might or it might not depending upon the font the size and which version of ClearType is in use and which application-settings are applied for rendering . Microsoft s http : msdn.microsoft.com en-us library ms749295 28v vs.85 29.aspx explanation of ClearType gets into this somewhat and even shows an example where you can observe a case where two instances of a character do not render the same see elle on the right both the e and l render differently in the second instance . This has to do with the use of fractional advance widths which get resolved to the nearest 1 64th of a pixel . Thus you could potentially end up with many different instances of a single character though as you can see the differences are fairly subtle . In short : I would not write anything that depends on any two instances of a character ending up exactly the same . They will be pretty similar but not identical .",
"Question : I have a grid with this template and styles in WPF XAML : .. . .. . The DropShadowEffect I have when you select a grid row seems to make the text-rendering blurry gray anti-aliasing : .. . .. . enter image description here http : i.stack.imgur.com MN3Kp.png .. . .. . When I remove the drop shadow effect it looks clear because it now uses ClearType and not gray sub-pixel anti-aliasing : .. . .. . enter image description here http : i.stack.imgur.com D4AzF.png .. . .. . I have tried applying RenderOptions.ClearTypeHint Enabled to the ContentPresenter as seen above but it does not help . How do I force WPF to render the text that gets displayed with drop shadow effect to retain Cleartype anti-aliasing instead of that ugly blurry gray sub-pixel anti-aliasing Some believe it s blurry because of the drop shadow -- this is not true . It s blurry only because ClearType is not used . This is how it looks like in Firefox when shadow AND ClearType : .. . .. . enter image description here http : i.stack.imgur.com sDxAB.png .. . .. . ClearType enabled text is colorful -- but that blurry text is not because it does not use ClearType -- it uses gray sub-pixel anti-aliasing and that s not how ClearType works : http : en.wikipedia.org wiki ClearType .. . .. . The question is : how do I enable ClearType for this text Comment : To my eyes it looks blurry because of the drop-shadow effect not because of the anti-aliasing style . Comment : @CodyGray Sorry but you are wrong . : It s blurry because ClearType is not being used . Comment : Hmm.. . Can you tell me what s wrong with my answer Comment : Pedantry : I wanted to point out that the text shadow rendering is just standard anti-aliasing like that used on Mac and Linux OS . There s nothing sub-pixel about it . What makes ClearType special and so colorful is that it uses sub-pixel rendering . .. . Answer : The reason this doesn t work and the reason you won t be able to get it to work has to do with ClearType s sensitivity to what it s rendering on top of . For ClearType to look correct it essentially needs to do per-component alpha blending . That is a separate alpha value for red green and blue normally alpha applies to all 3 . What this means is that ClearType absolutely must be rendered into a bitmap that is already opaque all alpha values are 255 you ll notice that window title bars still have ClearType but they use some super secret tricks to do this . The next step to understanding this is that WPF effects first render into an off-screen bitmap and are then combined with what s beneath in this case solid white or maybe blue if it s selected . So the text is first rendered into a clear transparent bitmap . Since it has no idea what will eventually be below it it must render using grayscale instead of ClearType . Then the effect is applied to that bitmap . Then the bitmap is drawn to where you expect it to be on-screen and there s no chance of getting ClearType even if it s on top of a solid color with no transparency . As a possible workaround try using 2 copies of the text . First apply the effect to the lower version of the text by lower I mean it should have a lower Z-index value and that is the case if it is first in the XAML . Then draw normal text on top of it which will get ClearType . I think this will work but I haven t tried it and you ll probably have to experiment until you get the desired visual outcome . Comment : so I guess this explains why even a Border object with a dropshadow breaks text inside . although it doesn t always which is weird",
"Question : I have a grid with this template and styles in WPF XAML : .. . .. . The DropShadowEffect I have when you select a grid row seems to make the text-rendering blurry gray anti-aliasing : .. . .. . enter image description here http : i.stack.imgur.com MN3Kp.png .. . .. . When I remove the drop shadow effect it looks clear because it now uses ClearType and not gray sub-pixel anti-aliasing : .. . .. . enter image description here http : i.stack.imgur.com D4AzF.png .. . .. . I have tried applying RenderOptions.ClearTypeHint Enabled to the ContentPresenter as seen above but it does not help . How do I force WPF to render the text that gets displayed with drop shadow effect to retain Cleartype anti-aliasing instead of that ugly blurry gray sub-pixel anti-aliasing Some believe it s blurry because of the drop shadow -- this is not true . It s blurry only because ClearType is not used . This is how it looks like in Firefox when shadow AND ClearType : .. . .. . enter image description here http : i.stack.imgur.com sDxAB.png .. . .. . ClearType enabled text is colorful -- but that blurry text is not because it does not use ClearType -- it uses gray sub-pixel anti-aliasing and that s not how ClearType works : http : en.wikipedia.org wiki ClearType .. . .. . The question is : how do I enable ClearType for this text Comment : To my eyes it looks blurry because of the drop-shadow effect not because of the anti-aliasing style . Comment : @CodyGray Sorry but you are wrong . : It s blurry because ClearType is not being used . Comment : Hmm.. . Can you tell me what s wrong with my answer Comment : Pedantry : I wanted to point out that the text shadow rendering is just standard anti-aliasing like that used on Mac and Linux OS . There s nothing sub-pixel about it . What makes ClearType special and so colorful is that it uses sub-pixel rendering . .. . Answer : The DropShadowEffect object cannot work with ClearType . This is stated on the MSDN page How to : Create Text with a Shadow http : msdn.microsoft.com en-us library ms748273.aspx : .. . .. . These shadow effects do not go through the Windows Presentation Foundation WPF text-rendering pipeline . As a result ClearType is disabled when using these effects . After all DropShadowEffect is a bitmap effect not a text effect . Comment : So are you saying I can t achieve a simple thing such as text shadow in WPF Something we have in web browsers in CSS text-shadow : 1px 1px 1px 000 Are you sure there s no way around this Comment : @rFactor : I don t know of any alternative way of producing a text shadow in WPF . But somebody else might . Firefox has probably implemented a graphics engine specifically tailored for HTML and CSS . They could have implement the effect by first drawing the shadow using a blur bitmap effect on the text and then drawing the text a second time with ClearType enabled . Comment : Can you think of any workaround Comment : @rFactor : a probable workaround here is to render the text twice once in black slightly offset from the other . Comment : @KentBoogaart how would this go exactly I ll give you a warm hug if this works .",
"Question : I have a grid with this template and styles in WPF XAML : .. . .. . The DropShadowEffect I have when you select a grid row seems to make the text-rendering blurry gray anti-aliasing : .. . .. . enter image description here http : i.stack.imgur.com MN3Kp.png .. . .. . When I remove the drop shadow effect it looks clear because it now uses ClearType and not gray sub-pixel anti-aliasing : .. . .. . enter image description here http : i.stack.imgur.com D4AzF.png .. . .. . I have tried applying RenderOptions.ClearTypeHint Enabled to the ContentPresenter as seen above but it does not help . How do I force WPF to render the text that gets displayed with drop shadow effect to retain Cleartype anti-aliasing instead of that ugly blurry gray sub-pixel anti-aliasing Some believe it s blurry because of the drop shadow -- this is not true . It s blurry only because ClearType is not used . This is how it looks like in Firefox when shadow AND ClearType : .. . .. . enter image description here http : i.stack.imgur.com sDxAB.png .. . .. . ClearType enabled text is colorful -- but that blurry text is not because it does not use ClearType -- it uses gray sub-pixel anti-aliasing and that s not how ClearType works : http : en.wikipedia.org wiki ClearType .. . .. . The question is : how do I enable ClearType for this text Comment : To my eyes it looks blurry because of the drop-shadow effect not because of the anti-aliasing style . Comment : @CodyGray Sorry but you are wrong . : It s blurry because ClearType is not being used . Comment : Hmm.. . Can you tell me what s wrong with my answer Comment : Pedantry : I wanted to point out that the text shadow rendering is just standard anti-aliasing like that used on Mac and Linux OS . There s nothing sub-pixel about it . What makes ClearType special and so colorful is that it uses sub-pixel rendering . .. . Answer : To achieve a similar result without using an effect you can render the text twice once slightly offset from the other : .. . .. . This yields the desired result : .. . .. . enter image description here http : i.stack.imgur.com wMcMB.png .. . .. . enter image description here http : i.stack.imgur.com ZwWTf.png .. . .. . You could also encapsulate this into a control called ShadowTextBlock perhaps so that you don t have to go repeating yourself everywhere . Comment : I think it looks rather jaggy any way to make it crisp and smooth And how do you do this with ContentPresenter as you can t duplicate it Comment : @rFactor : try playing with the colors . A gray instead of black would reduce the contrast . Comment : No matter how I try to adjust it it always looks bad . This is an example how good it can look Try Firefox : jsfiddle.net kaisellgren 2YEer 1 http : jsfiddle.net kaisellgren 2YEer 1",
"Question : I just got VS 2010 beta 1 but the text in the text-editor is thin ie not anti aliased smoothed or cleartyped . It s hard to read . Is there a setting to adjust it similar to the one in the OS . Comment : Related : stackoverflow.com questions 574738 http : stackoverflow.com questions 574738 why-does-consolas-in-visual-studio-look-bold 574752 .. . Answer : The Microsoft H4X0RS decided to force users to adopt ClearType when using Consolas font http : blogs.msdn.com b visualstudio archive 2010 03 15 visual-studio-2010-text-clarity-cleartype-and-aliased-fonts.aspx scroll down until you see the heading Consolas always uses ClearType .. . .. . The way to fix this is to install the Text Sharp extension http : visualstudiogallery.msdn.microsoft.com 7aafa2ea-8c54-4da8-922e-d26bf018514d yes you read right you need to install an extension to turn off BlurType -- ie to have your system-wide setting of no anti-aliasing applied .. . .. . How the people who did this got away with it I ll never know . Comment : Aliased is really nasty and Grayscale seems like it s exactly the same as ClearType Any suggestions for a combination with a different font",
"Question : I have a grid with this template and styles in WPF XAML : .. . .. . The DropShadowEffect I have when you select a grid row seems to make the text-rendering blurry gray anti-aliasing : .. . .. . enter image description here http : i.stack.imgur.com MN3Kp.png .. . .. . When I remove the drop shadow effect it looks clear because it now uses ClearType and not gray sub-pixel anti-aliasing : .. . .. . enter image description here http : i.stack.imgur.com D4AzF.png .. . .. . I have tried applying RenderOptions.ClearTypeHint Enabled to the ContentPresenter as seen above but it does not help . How do I force WPF to render the text that gets displayed with drop shadow effect to retain Cleartype anti-aliasing instead of that ugly blurry gray sub-pixel anti-aliasing Some believe it s blurry because of the drop shadow -- this is not true . It s blurry only because ClearType is not used . This is how it looks like in Firefox when shadow AND ClearType : .. . .. . enter image description here http : i.stack.imgur.com sDxAB.png .. . .. . ClearType enabled text is colorful -- but that blurry text is not because it does not use ClearType -- it uses gray sub-pixel anti-aliasing and that s not how ClearType works : http : en.wikipedia.org wiki ClearType .. . .. . The question is : how do I enable ClearType for this text Comment : To my eyes it looks blurry because of the drop-shadow effect not because of the anti-aliasing style . Comment : @CodyGray Sorry but you are wrong . : It s blurry because ClearType is not being used . Comment : Hmm.. . Can you tell me what s wrong with my answer Comment : Pedantry : I wanted to point out that the text shadow rendering is just standard anti-aliasing like that used on Mac and Linux OS . There s nothing sub-pixel about it . What makes ClearType special and so colorful is that it uses sub-pixel rendering . .. . Answer : How about setting TextOptions.TextFormattingMode to Display as well as RenderOptions.BitmapScalingMode to NearestNeighbor The latter is new in WPF 3.5 SP1 and I normally use it to remove the blur . : .. . .. . Below is how it looks like . enter image description here http : i.stack.imgur.com UYQsz.png .. . .. . And this is how it looks like in FireFox . enter image description here http : i.stack.imgur.com 3r1H6.png Comment : Still slightly blurry although better . I ve come to conclusion that there s no solution . Workarounds look slightly better or worse depending on monitor and probably something else too . Comment : Really From the screenshots above the first one just looks crystal clear to me.. . I even tried a few monitors good and bad ones they all look pretty clear.. . Comment : This is how it looks after direct copy and paste : d.pr i 29CC http : d.pr i 29CC both in your screenshot and mine ClearType is not activated . For some reason on your computer it ClearType-less resulted in better quality . On my PC any ClearType-less text is mess . Firefox however uses ClearType and everything looks sharp . I chose the answer that said it s not possible because I ve come to the conclusion that it s not possible with WPF 4 . I ll hope this changes . Comment : I see I wonder what monitor you are using Comment : Here s a screenshot : d.pr i QXsL http : d.pr i QXsL the weird fuzziness goes away as soon as I take away the effect .",
"Question : So the new WPF 4 text-rendering looks great but enabling the aero-glass effect on a window requires that you change the background to transparent which of course disables ClearType rendering . Using the provided RenderOptions.ClearTypeHint Enabled allows you to designate child elements to reenable ClearType rendering from that point in the tree . I ve found a few other topics that talk about doing this for the ScrollViewer used internally inside RichTextBox and FlowDocumentScrollViewer and creating a custom style does indeed fix it so that my FlowDocument gets ClearType rendering again . However this only applies to top level paragraphs in the FlowDocument . If I add floaters or figures or a table any text inside them is inexplicably grayscale again . I know that the glass effect is to blame since disabling it reenables the ClearType rendering . I looked through the visual tree with Snoop but both the main content which renders properly and the sub-content which is grayscale have similar element hierarchies without anything to which I can attach RenderOptions.ClearTypeHint . Has anyone run into this problem Is there a workaround or a solution I checked Connect but there isn t any bug filed about this . It s quite an annoying problem . Comment : so you still have not found out a better way to do this I m kinda lost with this one and your accepted solution seems cumbersome . .. . Answer : I know this could get tedious but have you tried setting general styles like so : Comment : It doesn t work . The internal flow document renderer ignores the attribute ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
implementation
|
UNK_RELATION
|
bmp@raster@129
|
bmp -- the bmp file-format also known as bitmap image file or device independent bitmap dib file-format or simply a bitmap is a @placeholder graphics image file-format used to store bitmap digital images independently of the display device such as a graphics adapter especially on microsoft windows and os 2 operating systems .
|
{
"confidence": [
86.12165069580078,
80.03732299804688,
76.83309173583984,
73.67424774169922,
71.80430603027344,
70.9488525390625,
70.56636047363281,
69.25629425048828,
67.14437866210938,
66.52046966552734,
66.52046966552734,
66.20075988769531,
65.69477844238281,
64.93580627441406,
63.4692497253418,
62.702274322509766,
62.060001373291016,
60.73109817504883,
60.003074645996094,
59.7704963684082,
59.7704963684082,
59.446346282958984,
58.90070724487305,
58.868656158447266,
58.09708023071289,
57.64487838745117,
57.64487838745117,
57.57596206665039,
57.136478424072266,
56.889060974121094,
56.82172775268555,
56.7327880859375,
56.6207160949707,
56.57371139526367,
55.88328170776367,
55.793094635009766,
55.42351531982422,
55.30210494995117,
54.97736740112305,
54.87552261352539,
54.46179962158203,
54.38163375854492,
54.01676559448242,
53.41822052001953,
53.21256637573242,
52.865455627441406,
52.672176361083984,
52.672176361083984,
52.63003921508789,
52.208011627197266,
51.98146057128906,
51.962242126464844,
51.9276008605957,
51.73008346557617,
51.316314697265625,
51.224185943603516,
51.224185943603516,
51.224185943603516,
51.224185943603516,
51.224185943603516,
51.173221588134766,
50.94938278198242,
50.9058952331543,
50.79723358154297,
50.605045318603516,
50.605045318603516,
50.605045318603516,
50.55561065673828,
50.533470153808594,
50.533470153808594,
49.93195724487305,
49.84981918334961,
49.84981918334961,
49.84981918334961,
49.77717590332031,
49.463958740234375,
49.27597427368164,
49.27597427368164,
49.21099090576172,
49.187034606933594,
49.112274169921875,
49.109981536865234,
48.889217376708984,
48.85466384887695,
48.734703063964844,
48.493133544921875,
48.46646499633789,
48.315372467041016,
47.820045471191406,
47.820045471191406,
47.717769622802734,
47.71576690673828,
47.406673431396484,
46.988094329833984,
46.988094329833984,
46.830039978027344,
46.78931427001953,
46.747581481933594,
46.44607162475586
],
"content": [
"I m trying to make a program to read data from a bitmap file .bmp Windows file-format 8bit .",
"I have a Bitmap in memory and I need to save it in a bmp file using the bmp file-format http : en.wikipedia.org wiki BMP file-format .",
"BMP is a very simple image file-format .",
"Bitmap-File Structures .. . .. . Each bitmap file contains a bitmap-file header a bitmap-information header a color table and an array of bytes that defines the bitmap bits .",
"But it returns a Bitmap which you can later on save to a file in any format... .",
"Also the image is a bmp file",
"Have a look at this : stackoverflow.com questions 18585427 http : stackoverflow.com questions 18585427 creating-bmp-image-file-from-bitmap-class",
"A 24-bits bitmap .bmp image has a header of 54 bytes .",
"How can I use ZPL II to print a bitmap BMP image",
"The BMP file-format is way too complex .",
"You need to study the BMP file-format .",
"After got to the data offset which you will find in the bitmap headers and read the pixels line by line make care about the padding in bmp file-format .",
"Just load .gif in Bitmap and save it in .bmp .",
"This assumes your native endianness is the same as Windows the originator of the BMP file-format .",
"A BMP file contains a header which describes the format of the data and the dimensions of the image followed by the image data .",
"I have a bitmap file test3.bmp which I can view and edit with every image viewer I have tested with .",
"I am trying to apply DCT discrete cosine transformation compression on a bmp bitmap file .",
"If you need to read a bitmap file use a library .",
"The BMP file-format is well explained on its Wikipedia page .",
"The file remains locked until you dispose of the bitmap .",
"Somehow these bitmap files are put into a gigantic .cpp file .",
"If that doesn t help you might try loading the raw bmp data creating a Bitmap with the format you want and copying the data into the Bitmap manually I m not familiar with C Bitmaps but there should be some way of accessing the data .",
"Canvas is picturebox and the loaded image is bitmap .",
"To start with this check the example of 2x2 bitmap image at http : en.wikipedia.org wiki BMP 5Ffile 5Fformat .",
"To fix just load a bitmap file from disk into your hBitmap and select this bitmap into your hdcMem .",
"You likely want to use a bitmap format that supports lossless-compression such as PNG .",
"Edit : .. . .. . As noted by iinspectable in the comments the bitmap format can be complex .",
"I had the same problem but by reading BMP file-format description I wrote a function that reads a .BMP file and stores it into a array .",
"I have written a primitive Bitmap Writer that prepares a bitmap header calculates a data section and write it as binary file .",
"Original BMP Image http : i.stack.imgur.com LJbV6.png .. . .. . Original BMP File .",
"I want to save the image in a compressed format such as png or jpg but the library only seems to save in bitmap .",
"If the above image saved in BMP file with 54 bytes of header size what is the total size of that BMP file",
"this is a bitmap .",
"The BMP format is very complicated .",
"Then in the paint routine .. . .. . Copy the bitmap data into the DIBSection s bitmap data using the alpha channel byte to blend the bitmap image with the background colour .",
"The bitmap file-format https : msdn.microsoft.com en-us library dd183391.aspx is way too complex to write your own parser .",
"The interface is a touchscreen and all the graphics for this screen are bitmap files in a particular directory .",
"How can I convert a BITMAP in byte array format to JPEG format using .net-2.0",
"Currently I m trying to export a SAS graph to a .bmp image format .",
"Is there any software out there that can convert a bitmap into a WMF file",
"The BMP format is relatively simple .",
"I also wanted textures so I did some research on the Bitmap file-format and wrote a struct for the main header and another for the DIB header info header .",
"I have a fingerprint image which is captured in BMP format .",
"The library supports both the BMP and the PCX format and also converting images from one format to another .",
"FILE34 which is 20544 byte is what I end up with when I stripp the file after changing it back to pcx-format and then to bmp-format .",
"I am using following code to convert BMP Image to GRF format .",
"For more info see BMP file-format https : en.wikipedia.org wiki BMP file-format on Wikipedia .",
"I recommend reading about the BMP file-format https : en.wikipedia.org wiki BMP file-format first .",
"I want to read the RGB values for each pixel from a .bmp file so I can convert the bmp into a format suitable for GBA GameBoy Advance .",
"ImageIO.read imageFile is returning null when the image is a bmp file",
"It has BMP format support out-of-the-box .",
"Are there two images because the alignment in the BMP file is off",
"This is NOT a monochromatic bitmap .",
"For the format of the bmp header take a look here http : en.wikipedia.org wiki BMP 5Ffile 5Fformat BMP 5Ffile 5Fheader",
"The way I usually do this is via a DIBSection - a device independent bitmap that you can modify the pixels of directly .",
"Short version .. . .. . Because the bmp file-format specifies rows must perfectly fit in a 32bits memory cells .",
"To find out more info about the bmp file-format check out this wikipedia page http : en.wikipedia.org wiki BMP file-format .",
"I need to how feasible is this to write a function in java to read a ppm file and convert it to jpg or bmp format .",
"I know BMP is a simple file-format for which I could write my own loader but I would rather not .",
"I m not familiar with the BMP file-format but wouldn t you need to read in the header information first",
"Apparently the file should be a headerless bmp file .",
"So what s happening in your case is this : .. . .. . 1 . you re reading your original BMP file from MS Paint and MS Paint is able to read that file because it happens to be a BMP format that MS Paint understands .",
"If the binary date is in BMP format and you file-put-contents directly to disk then you view the file directly -- and it s corrupted -- then the only answer is the original binary-data isn t in BMP format .",
"See wikipedia page of .bmp file-format which provides lots of information about the structure of the file and should help you to parse it .",
"I achieved a .bmp file but it is unreadeable .",
"The links for the BMP file cannot work .",
"Load and parse the BMP file yourself .",
"First file : .. . .. . Second file : .. . .. . Settings file : .. . .. . My bmp look like that : .. . .. .",
"JPEG is a bit steep but the BMP format is delightfully simple .",
"Study the header of the BMP to understand more about the format .",
"How are you accessing the bitmap",
"To scale bitmap image 3times bigger I implemented this code and found holes .",
"I am reading in a 24 bpp bitmap image in Python .",
"I only need to handle one bitmap image at a time .",
"the file-format could be compressed .",
"I have read a lot about BMP file-format structure but I still cannot get what is the real meaning of the fields biXPelsPermeter and biYPelsPermeter .",
"@HansPassant the ability to have a negative height is a feature added well after the bitmap format was popularized .",
"Then you read DIBSECTION structure for bitmap size format pointer to pixel data etc .",
"I ve created a BitMap class that works for bmp files that have 24 bits per pixel .",
"Possible duplicate of BMP File line padding issue http : stackoverflow.com questions 29440672 bmp-file-line-padding-issue",
"1 second of googling with bmp file-format : en.wikipedia.org wiki BMP file-format http : en.wikipedia.org wiki BMP file-format",
"I have a weird thing in BMP GRAPHICS files .",
"I am working with a Monochrome Bitmap image 1 bit per pixel .",
"I m trying to load a bmp file for reusing it in opengl .",
"could somebody explain to me why in 24-bit rgb bitmap file I have to add a padding which size depends on width of image",
"A BMP file consists of 3 structures .",
"biXPelsPermeter Specifies the horizontal print resolution in pixels per meter of the target device for the bitmap .",
"I can t know exactly your sample because I can t know the input bitmap format to get the bits from.. .",
"I then save the bitmap .",
"I created the bitmap with transparency .",
"Save Bitmap using the Save method .",
"I need to convert images to 2-bit per pixel grayscale BMP format .",
"How to know the content of every bytes in BMP file",
"To load a stand-alone resource icon cursor or bitmap file for example c : myimage.bmp set this parameter to NULL .",
"So in this case it would be 54 bytes 14 bytes for the file header and 40 for the bitmap header",
"I would like to load a BMP file do some operations on it in memory and output a new BMP file using C++ on Windows Win32 native .",
"First the image data really is written as a long strip of data this might make sense if the output device is a printer but isn t common in a graphical file-format .",
"The bmp file created by this example works fine with the image viewer packaged with my Windows 8.1 .",
"I doubt there s no such thing as a headerless BMP file ."
]
}
|
{
"confidence": [
105.97279357910156,
104.67393493652344,
102.76425170898438,
100.1422119140625,
100.07077026367188,
97.73990631103516,
96.33699798583984,
95.01680755615234,
94.71670532226562,
94.38893127441406,
94.28776550292969,
93.35308074951172,
92.46649169921875,
91.42514038085938,
90.12258911132812,
89.9566879272461,
89.16658020019531,
88.62664794921875,
87.835693359375
],
"content": [
"Question : Why are BMP images stored upside down and zero-padded so they are four-byte aligned Comment : possible duplicate of Why must stride in the System.Drawing.Bitmap constructor be a multiple of 4 http : stackoverflow.com questions 2185944 why-must-stride-in-the-system-drawing-bitmap-constructor-be-a-multiple-of-4 Comment : support.microsoft.com kb q81498 http : support.microsoft.com kb q81498 claims the upsidedownness is an artifact of being backwards compatible with Presentation Manager which means it s something that IBM did for OS 2 . Comment : They are upside-down for compatibility with OS 2 Presentation Manager . It can actually be either top line first bitmaps have a negative height . Comment : @HansPassant the ability to have a negative height is a feature added well after the bitmap format was popularized . Comment : Guys settle the negative height argument this BMP browser drop-in png jpg universal uncompressed replacement library ain t gonna write itself .. . Answer : Here s a quote from Petzold : .. . .. . So in DIBs the bottom row of the image is the first row of the file and the top row of the image is the last row in the file . This is called a bottom-up organization . Because this organization is counterintuitive you may ask why it s done this way . .. . Well it all goes back to the OS 2 Presentation Manager . Someone at IBM decided that all coordinate-systems in PM including those for windows graphics and bitmaps should be consistent . This provoked a debate : Most people including programmers who have worked with full-screen text programming or windowing environments think in terms of vertical coordinates that increase going down the screen . However hardcore computer graphics programmers approach the video display from a perspective that originates in the mathematics of analytic geometry . This involves a rectangular or Cartesian coordinate system where increasing vertical coordinates go up in space . .. . In short the mathematicians won . Everything in PM was saddled with a bottom-left origin including window coordinates . And that s how DIBs came to be this way . Source : Charles Petzold Programming for Windows 5th Edition Chapter 15 . Comment : Interesting that they kept this representation for DIBs but changed it for window coordinates reintroducing the inconsistency .",
"Question : I have a Bitmap in memory and I need to save it in a bmp file using the bmp file-format http : en.wikipedia.org wiki BMP file-format . Is there any way to do it on Android I read a lot of post suggesting to use the png format - which is loss-less - but that s not what I need : I really need the bmp format . I already have some code to save it in jpeg or png using the Bitmap.compress http : developer.android.com reference android graphics Bitmap.html compress 28android.graphics.Bitmap.CompressFormat 20int 20java.io.OutputStream 29 method : Comment : Have a look at this : stackoverflow.com questions 18585427 http : stackoverflow.com questions 18585427 creating-bmp-image-file-from-bitmap-class Comment : @Francescoverheye : thanks . this link seems interesting : github.com ultrakain AndroidBitmapUtil blob master src com https : github.com ultrakain AndroidBitmapUtil blob master src com ultrasonic android image bitmap util AndroidBmpUtil.java Comment : it s nice and easy to use good luck .. . Answer : I m answering my own question .. . .. . Here is my current solution . It is derived from this source : https : github.com ultrakain AndroidBitmapUtil thanks to ultrakain and @Francescoverheye .. . .. . I just fix a little bug in computation of the dummy bytes that must be added to each row so that the length of each row in bytes is a multiple of 4 as required by the bmp format specifications . I also made some changes to improve the performances . Comment : Thank God and YOU that you needed to do the same thing I needed to do . Your code works like a charm . Your ROCK Comment : Can you please tell me what are the changes required to get 8bit bmp file rather than 24bit bmp",
"Question : I m writing code in C++ on Windows and I m trying to extract the pixel values of a grayscale bmp . I don t care about keeping any of the metadata and just want to store the pixel values in a char array . I haven t been able to find a standard or typical way of doing this manually so I m wondering if there s perhaps a simple library that people use to load bitmaps into memory . Thanks in advance .. . Answer : You have 2 good options : .. . .. . 1 . Load and parse the BMP file yourself . BMP files start with a BITMAPFILEHADER followed by a BITMAPINFOHEADER followed by 0 or more RGBQUAD s palette entry . Offset to pixel data is in BITMAPFILEHADER but you should check BITMAPINFOHEADER to make sure the image format is what you expect support . 2 . Call LoadImage API with LR CREATEDIBSECTION flag it will return a handle to a DIB section . Next you call GetObject passing in the returned handle and a pointer to a DIBSECTION structure . Then you read DIBSECTION structure for bitmap size format pointer to pixel data etc . Option 2 is better if you re on Windows because presumably LoadImage checks for invalid file formats for you and can load more than just BMP files . When accessing Windows BMP pixels remember lines are always DWORD-aligned . Comment : Thanks for the info",
"Question : I have a Bitmap in memory and I need to save it in a bmp file using the bmp file-format http : en.wikipedia.org wiki BMP file-format . Is there any way to do it on Android I read a lot of post suggesting to use the png format - which is loss-less - but that s not what I need : I really need the bmp format . I already have some code to save it in jpeg or png using the Bitmap.compress http : developer.android.com reference android graphics Bitmap.html compress 28android.graphics.Bitmap.CompressFormat 20int 20java.io.OutputStream 29 method : Comment : Have a look at this : stackoverflow.com questions 18585427 http : stackoverflow.com questions 18585427 creating-bmp-image-file-from-bitmap-class Comment : @Francescoverheye : thanks . this link seems interesting : github.com ultrakain AndroidBitmapUtil blob master src com https : github.com ultrakain AndroidBitmapUtil blob master src com ultrasonic android image bitmap util AndroidBmpUtil.java Comment : it s nice and easy to use good luck .. . Answer : Note the code above is very slow . I ve found that to optimize the code above it s necessary to make a byte array to store all the data before you put it . Of course I was working in Xamarin C so maybe that s why . Anyway here s my Xamarin code in case anyone has the same problem . To use it here s the calling code : Comment : I m surprised that calling Array.Resize in the loop is faster than the original implementation I m not C expert . Suggestion : initialize final with it s target size before the loop . Comment : It wasn t Array.Resize that made it faster . The problem was all the .Put calls to the buffer . Changing those put calls to building up an array made the code take 2 seconds where as it was taking 13 seconds before . Comment : ok . my suggestion remains valid if you need to improve performance a little more . the java version don t have the same problem with the put Comment : Hey Ben75 . I m having a problem with this code . The file that s generated from the code looks perfect with the code as is . However when I print it . It s skewed . But when I change the BYTE PER PIXEL 4 instead of 3 it now reverses where the printing looks right on a O Neil spooler printer but the image is skewed the same amount . Have any ideas Comment : skewed image is probably caused by a wrong number of dummy bytes per row remember that bmp format requires that number of bytes per row is a multiple of 4 . If you change the number of byte per pixels then the computation of required dummy bytes can be broken",
"Question : I have a weird thing in BMP GRAPHICS files . I create them with FULLSHOT 9 screen-capture software just mouse click+drag a rectangle on the screen and save-as .bmp FILE . When i watch the file in the binary editor i can see a pixel being use for a loooong time as expected . So you see something like this : .. . .. . editor shows 8 hex numbers per row Pixel 3 hex numbers like ED ED ED .. . .. . 0x00002f0 ---- some offset from start of file long past header part of bmp file after which i only expect a long sequence of pixels not some extra information .. . .. . But then suddenly you see a block of regular like Pixel 3 hex numbers but not repeating numbers .. . .. . i made the newline after each group of 3 for clarity... . the binary editor shows 8 hex numbers in a row .. . .. . i suspect these are not actual pixels but some information Then often you see a weird 0 alone . then the information part continues.. . .. . .. . and stops and a new looooong repetition of pixels . PROBLEM : These blocks of information disturb me from collecting all the actual pixels . If i knew what they were i could tell the program to skip them . QUESTION 1 : What could the meaning of this information part be QUESTION 2 : Is the zero really a terminator PS I have measured the difference between the reoccurring zero s and it usually is a multiple of with of the bitmap in different .bmp files i created and examined . .. . Answer : All the information you need is at Wikipedia on the BMP Format http : en.wikipedia.org wiki BMP file-format . 0x00002f0 ---- some offset from start of file long past header part of bmp file after which i only expect a long sequence of pixels not some extra information .. . .. . You don t mention at what position you find this value but that is probably the start of the raw pixel data : .. . .. . Bitmap File Header .. . .. . . . .. . .. . 000Ah 4 bytes the offset i.e . starting address of the byte where the bitmap image data pixel array can be found . Q1 . The information is from the looks of it just a palette . It is not required for a true color bitmap to contain an explicit palette but then again it may have one . Theoretically this would be an optimized 8-bit palette for the same image but I wouldn t count on it . The part you show is a simple list of grays . Q2 . Those zeroes may be DWORD line padding . They occur at multiples of bitmap width because each line in your image occupies in fact a multiple of the bitmap width bytes -- 3 times for RGB 4 times for RGBA . Only at the end of the line zeroes are inserted to make sure the next line starts at a DWORD boundary .",
"Question : I could need some help to figure out how to feed the proc below . I need to write a monochrome BMP file . The code below its from : How to Save monochrome Image as bmp in windows C++ https : codxtra.wordpress.com 2013 03 07 how-to-save-monochrome-image-as-bmp-in-windows-c looks like to be able to do this . I m now stuck on how to convert a std : : bitset or preferably boost : : dynamic bitset into this byte format . All of my attempts so far failed I wasn t able to write something like an 8x8 checker pattern into the BMP . The proc creates the BMP and it is readable by Photoshop but the content is a mess . So any suggestions how to solve this are appreciated -edit- .. . .. . an naive approach of mine was something like this .. . Answer : I have something very similiar.. . .. . .. . This approach DOES NOT treat the padding of the BMP format . So You can only make bitmaps with width multiple of 4 . This is NOT a monochromatic bitmap . It s a RGB format but you can tune it easily . This is NOT an exactly answer to you but for sure may be useful for you . Enjoy it . In this sample we want a white bitmap with a single black pixel at position X 2 Y 2 . The BMP format constiders that Y grows up from bottom to top . If you have a bitmap width a pixel per bit the real monochromatic bitmap you can test the bits and fill the imageData . To test a bit in a byte do like myByte position 1 where position is the bit you wanna test from 0 to 7 . Comment : Thanks for reply but whit this code my exact problem remains : how to fill the byte array Whats the representation of the color WHITE and BLACK inside the bitmap expressed as byte type I tried values like 0 0x00 1 0xff - everything failed . Can you create an byte example for a 4x4 b w checker pattern for your code Comment : sure.. . hold on - Comment : In my sample every 3 bytes represents RGB channels.. . if I set them as R G B we get a monochromatic image . I can t know exactly your sample because I can t know the input bitmap format to get the bits from.. . But basically This is what you need . Comment : Ok but what is an exact value for R G B in your case byte rgb 16 rgb 0 .. . Comment : You mean the pixel position I can show it to you.. . hold on",
"Question : sorry if this question is silly i m just starting with C .. . .. . I have an image in disk which I know the path . The image is 20000x10000 aprox in size and around 400MB in size i know this looking at the image .. . .. . I need to load it in the code and resize it since the progam dies if I try to put in a picture box 400m of image but if I do .. . .. . But when I do Bitmap b0 new Bitmap pathImage it just dies since 20000x10000x32 it s too much for my poor memory . The problem is that if not specified c just uses as pixel format Format32bppArgb but I want Format1bppIndexed and the only way i ve found to change the format is with the constructor .. . .. . Bitmap int width int height int stride PixelFormat format IntPtr scan0 .. . .. . But for this constructor I need to know the size of the image which in the code I don t know because it dies before the code can get it and know the size.. . I m lost . Any ideas EDIT : Doing this int width .. . .. . I get the size of the image I cannot load and can create a bitmap with the pixelformat and size that i wanted BUT everyway I try to upload it doesn t work it still crashes on me . I ve tried using graphics .draw tiff.. . and tiff.getThumbnail new size.. . and it just dies on me . It targets x86 and the .Net 3.5 since those are the requirements of the client.. . .. . .. . Any ideas Comment : You are completely on the wrong track with this . There s just no conceivable reason left to not run this kind of code on a 64-bit operating-system . Change the Platform target setting to AnyCPU . Comment : The program uses some dlls and exes that are for x86 so i was compiling for 32 bits not my choice my boss choice but I had not though it may be because of that . Thanks for the recommendation anyway Comment : maybe the problem isn t the Memory it self take a look at this question http : stackoverflow.com questions 3911568 wpf-out-of-memory-exception-when-loading-large-amount-of-bitmaps-in-single-insta Comment : You were right now it loads the pictures . Please submit it as an aswer and i will accept it .. . Answer : If FileStream works to open the file you might want to give some of the other constructors of Bitmap a try in particular Bitmap Stream http : msdn.microsoft.com en-us library z7ha67kw 28v vs.110 29.aspx . If that doesn t help you might try loading the raw bmp data creating a Bitmap with the format you want and copying the data into the Bitmap manually I m not familiar with C Bitmaps but there should be some way of accessing the data . Hope this helps . Comment : it was loading the images but after the second one it still gave me out-of-memory exception I tried what WiiMaxx said and it works now",
"Question : In my algorithm i need create information output . I must to write boolean matrix in bmp file . It must be monocromic image where pixel is white if matrix on such element is true . Main problem is bmp header and how to write this . Comment : You can check qdbmp.sourceforge.net http : qdbmp.sourceforge.net for implementation details : . Comment : Maybe of use to visitors Googling similar concepts is my almost related question and answer here : stackoverflow.com questions 17918978 http : stackoverflow.com questions 17918978 plot-an-array-into-bitmap-in-c-c-for-thermal-printer .. . Answer : Without the use of any other library you can look at the BMP file-format https : web.archive.org web 20080912171714 http : www.fortunecity.com skyscraper windows 364 bmpffrmt.html . I ve implemented it in the past and it can be done without too much work . Bitmap-File Structures .. . .. . Each bitmap file contains a bitmap-file header a bitmap-information header a color table and an array of bytes that defines the bitmap bits . The file has the following form : .. . .. . BITMAPFILEHEADER bmfh .. . BITMAPINFOHEADER bmih .. . RGBQUAD aColors .. . BYTE aBitmapBits .. . .. . .. . see the file-format for more details Comment : Thanks . It seems too good description . Comment : Remember to write everything out little-endian if your processor isn t x86 . Comment : I have x86 thanks . Comment : I m sorry but linking to external sites is pretty unhelpful when they dry up and disappear . Comment : The link is broken here https : web.archive.org web 20080912171714 http : www.fortunecity.com skyscraper windows 364 bmpffrmt.html is an Archive.org s copy of the original url .",
"Question : I have read a lot about BMP file-format structure but I still cannot get what is the real meaning of the fields biXPelsPermeter and biYPelsPermeter . I mean in practical way how is it used or how it can be utilized . Any example or experience Thanks a lot .. . Answer : biXPelsPermeter Specifies the horizontal print resolution in pixels per meter of the target device for the bitmap . biYPelsPermeter Specifies the vertical print resolution . Its not very important . You can leave them on 2835 its not going to ruin the image . 72 DPI 39.3701 inches per meter yields 2834.6472",
"Question : I am using following code to convert BMP Image to GRF format . However there is an extra vertical line drawn at the end of the converted GRF file even though there is no such line in the BMP file . Other than that the size and everything is Ok . It seems the last pixel hex value of each row is not correct in the GRF file . Original BMP Image http : i.stack.imgur.com LJbV6.png .. . .. . Original BMP File . Converted GRF FIle http : i.stack.imgur.com 4FP1H.jpg .. . .. . Converted GRF FIle .. . Answer : Marshal.Copy ptr pixels 0 width .. . .. . The Bitmap is not byte aligned . So in this case-when you copy the data in it is filling in the left over bits as black . the bitmap is 154 bytes wide which creates 19 full bytes and 2 left over pixels . So the remaining 6 pixels are black . In the end you need to use bitmaps with widths that are divisible by eight or make sure the end of the data copy from the bitmap to pixels x accounts for the remaining bytes .",
"Question : my code to save bmp format : .. . .. . ImgResult.Save dlgSavePicture.FileName System.Drawing.Imaging.ImageFormat.Bmp .. . .. . I have tried the code and the output is a 512x512 bmp image with 1 megabyte size .. . .. . if i use ms paint to create a 515x512 bmp image the size is 768kb .. . .. . i have tried to open the image and resave as bmp and the size still 1MB .. . .. . can a 512x512 bmp image-size upto 1mb in 512x512 or there are something wrong with my code Comment : Quick back of the envelope calculation : 512 x 512 x 32 bits per pixel 1048576 bytes so even with no optimisation 10MB is far too much something s gone wrong somewhere.. . Comment : i am sorry the image is 1mb 1.048.630bytes not 10mb so if i use this code System.Drawing.Imaging.ImageFormat.Bmp it will automatically save a 32bit bmp .. . Answer : BMP is a very simple image file-format . Just a little header that describes the image-size pixel format resolution color table followed by a blob of pixel data . Technically it can be compressed with RLE but encoders don t bother anymore . The pixel data depends on the pixel format ancient ones are 1bpp 4bpp and 8bpp they require a color table . 16bpp can happen unusual normal ones are 24bpp RGB and 32bpp ARGB . In other words 3 or 4 bytes per pixel . So yes 512 x 512 x 4 1 megabyte . MSPaint is pretty explicit about the pixel format it uses . It is a very simple painting program without support for alpha blending effects . So uses 24bpp no alpha 512 x 512 x 3 786 kilobytes . You could use Paint.NET to create 32bpp BMPs . Which one you get in your own program depends on how you created the Bitmap object . The simple version uses the same pixel format as the video adapter . On all modern machines that s 32bpp . 16bpp can happen it is very unusual . If you want another format then you have to use the Bitmap constructor https : msdn.microsoft.com en-us library 3z132tat 28v vs.110 29.aspx that takes a PixelFormat argument . There s otherwise a pretty good reason to do this the default pixel format is not usually the most optimal one . The best one by a factor of 10 is the format that matches the pixel format of the video adapter exactly . Choice is between 32bppArgb and 32bppPArgb . The P means pre-multiplied the alpha value is applied to the RGB values up front . Argb is most efficient if you do a lot of drawing into the bitmap yourself with Graphics.FromImage . PArgb is most efficient for painting the pixel data can be blitted to the video frame buffer directly without having to be converted . Ten times faster . You usually care about painting speed the most visible artifact of a program . If you care about image file size then there is no better choice than PNG . It compresses the pixel data with LZW compression typical compression rates are 50 or better . JPEG is a decent choice as well much higher compression rates but it is lossy . It achieves high rates by throwing away image details . Suitable for photos in general images without text or line art that don t otherwise have to be compressed multiple times .",
"Question : How can I read the color value of 24bit BMP images at all the pixel h w in C or C++ on Windows better without any 3rd party library . I got Dev-C++ .. . A working code will be really appreciated as I ve never worked on Image reading have come to SO after Googling if you can google better than me plz provide a link . Comment : 1 second of googling with bmp file-format : en.wikipedia.org wiki BMP file-format http : en.wikipedia.org wiki BMP file-format .. . Answer : You have to read the bitmap header first . After got to the data offset which you will find in the bitmap headers and read the pixels line by line make care about the padding in bmp file-format . take a look on msdn http : msdn.microsoft.com en-us library aa452883.aspx .. . .. . http : msdn.microsoft.com en-us library windows desktop dd318229 v vs.85 .aspx Comment : I m using C C++ not VC++ thnx for your help :",
"Question : I have a BMP file which I know is 32bpp and contains alpha information . Whenever I use the System.Drawing.Bitmap class s constructor or FromFile it loads it as 32bppRgb instead of 32bppArgb . Is there a way to keep the alpha information I know BMP is a simple file-format for which I could write my own loader but I would rather not . It seems like there should be an option somewhere . Comment : This is somewhat related . Perhaps it will help you stackoverflow.com questions 10658994 http : stackoverflow.com questions 10658994 using-graphics-drawimage-to-draw-image-with-transparency-alpha-channel Comment : Loading bmps with alpha channels doesn t appear to be supported . See this thread : social.msdn.microsoft.com Forums vstudio en-US http : social.msdn.microsoft.com Forums vstudio en-US 2f81979d-30f0-4a41-9c5e-ff49c28ab814 loading-image-from-32-bits-bitmap-file forum csharpgeneral . Comment : You can not load.bmp formats supporting alpha . Comment : It supports alpha for PNG files - are you constrained to using only BMP or do you have the potential to switch formats Comment : Thank you for the replies . I had read the GIF transparency article before posting . The other article was quite enlightening . I am not constrained to BMP I was trying to support both PNG and BMP . I have put BMP support on hold until I can load them manually . Thanks for the help . .. . Answer : Unfortunately GDI+ does not support alpha channels in BMP files . Here s the relevant note in the docs https : msdn.microsoft.com en-us library stf701f5 28v vs.110 29.aspx : .. . .. . The Image class does not support alpha transparency in bitmaps . To enable alpha transparency use PNG images with 32 bits per pixel . Your best bet is to either convert the file to a format that supports transparency like PNG in a separate program that supports BMP alpha or write your own code to do it .",
"Question : I want to read the RGB values for each pixel from a .bmp file so I can convert the bmp into a format suitable for GBA GameBoy Advance . I need to get just the RGB for each pixel and then write this information to a file . I am trying to use the windows.h structures : .. . .. . but I only need RGB struct . So let s say I read in.bmp : .. . .. . Is this correct How do I write only the RGB information to a file Comment : What is the purpose of the reserved byte in the RGB struct .. . Answer : If you are on windows you can use the LoadBitmap http : msdn.microsoft.com en-us library dd145033 28VS.85 29.aspx function from win32 .. . .. . then given the handle convert it to a DIB bitmap and get to the pixels that way",
"Question : I m trying to make a program to read data from a bitmap file .bmp Windows file-format 8bit . Right now I m stuck on reading the headers before the image data . I used the specifications for bmp that I found here http : www.dragonwins.com domains getteched bmp bmpfileformat.htm to make these structs to hold the file header info header and image data of the bmp : .. . .. . I can t really see anything wrong with these unless my source for the specification is wrong but I ve looked elsewhere and it seems to me ok . I m using the following code to test that it gets parsed correctly : .. . .. . Unfortunately when I run this I get a wrong result : .. . .. . According to that link unused1 and 2 should be always 0 . Also the width and height are completely wrong it s a 16x16 image . it seems that there is some sort of alignment issue going on with the structures . Does anyone have any experience with this I don t want to use any image bitmap libraries I want to do all this myself . Thanks for your help Comment : If you re reading directly into those structs check the padding on the struct to make sure you re aligning the data in the file with the layout of the struct . See here http : stackoverflow.com questions 17255104 how-can-i-read-a-bmp-file-and-access-its-header-info-via-a-struct-pointer-withou rq 1 Comment : Ugh that was stupid . Thanks .. . Answer : Yup I forgot to pack the structs . This fixes things . Oops :",
"Question : How can I use ZPL II to print a bitmap BMP image I used DY to download the BMP to the printer : .. . .. . I am using PHP to send raw data to the printer so variables are coming from that script . Using the printer s diagnostic utility I verified that the file was successfully downloaded using that command . I was also able to print that BMP file using TSPL a different printer language that this particular printer also supports in addtion to ZPL so I know that the BMP was written correctly . I tried using the following code to then print the BMP : .. . .. . But it only spits out a blank label . What am I doing wrong Comment : Hope you don t mind my necroposting here -- I ran into a similar problem recently and here is a PHP script I created for converting other image-formats to ZPL graphics BMP is not supported since GD2 is used but it works with other formats such as PNG or GIF : github.com pbosakov image2zpl https : github.com pbosakov image2zpl .. . Answer : Here is the link-to download the Zebra Setup Utilities : .. . .. . https : www.zebra.com us en support-downloads eula.-227178c9720c025483893483886ea54dde80fe8dccd74087deac0002665121f1b906a97e0267e4c60078aef6cd4a559.html .. . .. . Once I launched the app I pressed the Install New Printer button and installed a random printer . After installing the printer select the printer and press the Download Fonts and Graphics button . This will install the ZebraDesigner Fonts and Graphics Downloader . You can use this utility to convert bitmaps to zebra bitmaps . I am following these directions now . I ll let you know if it works . https : km.zebra.com kb index page content id SO7892 https : km.zebra.com kb index page content id SO7892 .. . .. . The software works but I still can t convert a .bmp to an actual ZPL bitmap .",
"Question : i got a question for reading an bmp image . How can i get the pixel value R G B values in an bmp image Can anyone help me using the C programming language .. . Answer : You need to study the BMP file-format . It is easier to read uncompressed 24-bit BMP files . They just contain a header at the beginning and RGB values of each pixel . To start with this check the example of 2x2 bitmap image at http : en.wikipedia.org wiki BMP 5Ffile 5Fformat . Follow the below steps . 1 . Create the 2x2 BMP image shown on Wikipedia . 2 . Open the file in binary mode using your C program . 3 . Seek to byte position 54 . 4 . Read 3 bytes . The bytes would be 0 0 and 255 respectively . Not sure whether the order is RGB . I had done this long back and I think the order is not RGB . Just verify this . As simple as that Study the header of the BMP to understand more about the format .",
"Question : I have a bitmap file test3.bmp which I can view and edit with every image viewer I have tested with . That said I cannot read it into my Java application . If I edit the BMP in MS Paint save it undo the change and save it test3 resaved.bmp I have the same image but with a different file size . The different file sizes do not concern me.. . what does is that my application can read the re-saved file . Could anyone enlighten me on why one image works with my code but the other does not Images files : .. . .. . test3.bmp https : docs.google.com leaf id 0B8Ufd7Rk6dvHODM0OTk5ODEtMWEzMC00YzA1LTliMjQtZmNmNTdkNDA2YWIz hl en US .. . .. . test3 resaved.bmp https : docs.google.com leaf id 0B8Ufd7Rk6dvHMjk3NGIyOWEtNjk2MS00MmRkLThkYjktMDFmNTNlZmFhMGNk hl en US .. . .. . Here is a minimal test application : Comment : there a LOT of different types of BMP files . Probably that your MS Paint can read the original format but is using others BMP headers encoding when saving back the file . I know for sure that Java definitely cannot read all the various BMP files out there few BMP readers can . It just happen to be that Java supports that particular kind of BMP that MS Paint outputs . Why BMP If you want lossless would PNG be an option Comment : same problem here as Roman B . .. . The links for the BMP file cannot work . You could hexdump the headers the beginning of both files and add the result to your question but to me anyway the issue is precisely what I described above : - .. . Answer : There s some example code here http : www.java2s.com Code Java 2D-Graphics-GUI ListAllreaderandwriterformatssupportedbyImageIO.htm that will enumerate supported image-formats by your JDK . BMP is supported by the advanced image toolkit http : www.oracle.com technetwork java release-jai-imageio-1-0-01-140367.html but I know that it also has things in it that are now supported by the base JDK too . So if its supported by both then maybe the JAI support is more comprehensive . That seems unlikely though as it doesn t make much sense . OTOH it was Sun . If you re using JDK 6 you can definitely do PNG which is more portable can you convert your images IIRC MS Paint will save a png . Comment : the image-formats claimed to be supported by the ImageIO reader s are highly misleading as explained in my lenghty answer : If BMP was really supported the OP could open his image using ImageIO just as he can open it from MS Paint . This is not the case .",
"Question : I need a working android code to print pdf files into bmp . The code which I had is able to print but the text is so blurry and shrinked that it is very difficult to read.The device used to print is small with a paper width of 384 . the printed text should be clear to read . Comment : What is the source format Letter A4 Because then this just won t work this way because the PDF has already an exactly defined format and if you just shrink it of course the text will be blurry . You would need a more dedicated way to extract text from the PDF and print it in a different format . Comment : Actually I want to print it on a device with a paper width of 384 only.its a very small device.so is there any other way to get the pdf to print as BMP in a readable format .. . Answer : Here you re compressing the image to 1 10 of the original quality : .. . .. . Why not try either removing the line or adjusting the compression to a much higher value say 90 edit .. . .. . If that s not the case then I can give you some advice to debug it . I m wondering whether it s your loading or saving code that s causing the small blurry sizes so if I were you I would place a debug breakpoint on the line that reads .. . .. . Then in the list of variables you ll be able to find bitmapPdfPage in Android Studio and view the bitmap itself . If the bitmap is small and blurry here then maybe update the question with the knowledge that it s the loading code that is incorrect . If it s large and you can read the text then the converse is true and you know that it s the bitmap saving code that s at fault . Comment : yeah.sorry for my mistake . It was 100 before . But i tried changing the code and forgot to change back . Suppose if it is 100 then how can i achieve printing with a perfect readable text . Comment : @Krishna13 I ve added some debug help could you try it and update me with the results Comment : hi.yes i tried that and unable to get the correct output . same as before . the printed image is not readable except the heading ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
raster
|
UNK_RELATION
|
winscp-net -- the winscp .net-assembly winscpnet.dll is a .net wrapper around winscp s scripting interface 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 @placeholder such as powershell and sql-server integration services ssis .
|
{
"confidence": [
90.962158203125,
90.04744720458984,
88.73088836669922,
88.2218017578125,
87.89886474609375,
87.08657836914062,
84.95631408691406,
83.86158752441406,
83.56297302246094,
83.29867553710938,
83.28756713867188,
82.80335998535156,
82.555419921875,
82.555419921875,
81.89302062988281,
80.74347686767578,
79.70732116699219,
79.18362426757812,
78.04640197753906,
76.8210678100586,
76.71404266357422,
75.91891479492188,
74.59121704101562,
74.32061767578125,
73.75778198242188,
72.96405029296875,
72.66197204589844,
70.36628723144531,
69.17839050292969,
68.19477844238281,
66.39878845214844,
65.70699310302734,
65.15013885498047,
64.46958923339844,
64.46958923339844,
63.063472747802734,
62.79964065551758,
62.79964065551758,
62.79964065551758,
62.79964065551758,
59.55132293701172,
59.54082489013672,
58.443668365478516,
58.2392578125,
58.02179718017578,
57.65314865112305,
56.699119567871094,
56.596092224121094,
56.0930290222168,
56.0930290222168,
56.0930290222168,
55.305782318115234,
55.305782318115234,
55.1798095703125,
54.775367736816406,
54.76892852783203,
54.07927322387695,
53.63582992553711,
53.2880744934082,
52.955543518066406,
52.826908111572266,
52.651458740234375,
52.544612884521484,
52.04728317260742,
51.64466857910156,
51.28559112548828,
51.28559112548828,
51.28559112548828,
51.1924934387207,
50.81434631347656,
49.6906623840332,
49.237823486328125,
48.66651153564453,
48.12920379638672,
48.12920379638672,
48.12920379638672,
48.12920379638672,
48.12920379638672,
48.12920379638672,
47.89957046508789,
46.27849578857422,
45.84492874145508,
45.52365493774414,
45.52365493774414,
45.52365493774414,
45.36281967163086,
44.49227523803711,
44.062255859375,
43.853702545166016,
43.853702545166016,
43.853702545166016,
43.853702545166016,
43.853702545166016,
43.853702545166016,
43.64932632446289,
43.54743957519531,
43.50568389892578,
43.489288330078125,
43.35976791381836
],
"content": [
"Not only with WinSCP .NET assembly but in general .",
"I m using WinSCP .NET assembly to upload files .",
"I am downloading files from FTP using WinSCP .NET library .",
"I am using WinSCP .NET assembly to transfer files by FTP .",
"Is there a way to do that with WinSCP .NET assembly",
"The WinSCP .NET assembly always behaves like the Allow SCP fallback is unchecked .",
"How to do it in WinSCP .NET assembly using RemoteFileInfo",
"I am using WinSCP .NET Assembly in PowerShell for file synchronization with a SFTP server .",
"I have a script that calls the WinSCP .NET assembly .",
"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 .",
"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 the .NET Assembly that WinSCP provides .",
"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 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 .",
"I have problem with WinSCP .NET assembly NuGet plugin executing on Azure .",
"Related to Using WinSCP .NET Assembly from WSH-hosted Active Scripting Languages https : winscp.net eng docs library com wsh jscript .",
"I am using WinSCP to write to connect a SQL Server to an SFTP server .",
"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 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 .",
"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 .",
"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 .",
"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 .",
"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 .",
"WinSCP is amazing .",
"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 .",
"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 .",
"WinSCP version 5.5.5",
"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 .",
"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 new to WinSCP .",
"Imports are WinSCP as well .",
"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 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 .",
"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 .",
"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 .",
"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 .",
"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 .",
"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 a task to do SFTP in a .net program .",
"2 an example of the method you implemented mapping the library class to the winscp interface .",
"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 .",
"not good i thought there is option in wscp net to be able to show remote picture .",
"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",
"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 .",
"I have recently registered the WinSCPnet.dll using .NET Framework C : Windows Microsoft.NET Framework64 v2.0.50727 .",
"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 .",
"So you have to tell WinSCP to download the files to the directory by appending a backslash : C : bla .",
"The DLL is probably a .NET assembly import the generated TLB .",
"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 .",
"I was installed WinSCP yesterday and i have actuall version .",
"This has nothing to do with client WinSCP as it cannot even know it s a junction .",
"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 .",
"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 .",
"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 .. . .. .",
"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 .",
".. . .. . Append session logs both from .NET assembly and GUI to get better answer ."
]
}
|
{
"confidence": [
124.0437240600586,
121.60704040527344,
116.68974304199219,
113.91621398925781,
110.962646484375,
110.14324951171875,
109.74478149414062,
105.84381103515625,
104.8180923461914,
104.11087799072266,
102.70509338378906,
99.27605438232422,
95.58045959472656,
94.81852722167969,
93.61272430419922,
93.60906982421875,
92.62291717529297,
91.6549072265625,
91.10098266601562,
90.8888931274414
],
"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 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 : 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 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 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 m trying to use a 3rd party DLL WinSCP .NET assembly in Dolphin 6.1b2 . I ve registered the DLL and generated a TypeLib in Windows 7 . In Dolphin I successfully used the component wizard to generate the interfaces but when I try to register the control and TypeLib I get errors . On the registering the control I get .. . .. . WinSCPnet.dll was loaded but DllRegisterServer entry-point could not be found . Does anyone have any idea why it s failing I have also asked the author of the DLL and he s leaning toward a Dolphin problem since the registration worked in Windows . .. . Answer : The DLL is probably a .NET assembly import the generated TLB . Downloaded : https : winscp.net download winscp577automation.zip .. . .. . Unpacked registered as per included readme automation.txt . 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 . Opened workspace imported the WinSCP Constants Pool converted start of the C example https : winscp.net eng docs library example : .. . .. . Got working object back .. . .. . .. . EDIT : Your WinSCP forums notion in order to use it within dolphin you need to have its tools register the dll and tlib is wrong you are doing too much importing for this case anyways in ordinary cases this might not matter . Normally import EITHER .DLL if it s COM .dll with embedded type info OR the .TLB . So if there is .TLB I d go for .TLB otherwise try my luck with .DLL . Sadly for some standard COM interfaces Microsoft never made typelibs available so it s even worse there use C C++ or create structs interface tables by hand . Edit 2 - further questions : .. . .. . 1 can you explain the relationship between the typelib and the library class which i create i.e . dolphin tutorial in help .. . .. . Dolphin creates smalltalk classes to mirror the COM types structures . You use these to instantiate COM types from Smalltalk call their methods pass them and also primitive-types such as strings integers .. . as arguments and get Smalltalk types for returned values Dolphin does all the conversions for you so you can +- forget you are calling foreign code . 2 an example of the method you implemented mapping the library class to the winscp interface . I implemented nothing I just used the generated wrapper in background WinSCP COM object - SessionOptions - got created and had some properties set . basically i just said : .. . .. . Just look at WinSCP Automation documentation examples and then convert it to smalltalk-speak and hopefully it should auto-magically work - . 3 where are the smalltalk methods protocol : hostName : etc defined i searched the image and they are not there . how did you know to use those method names Since SessionOptions represented by PREFIX SessionOptions class in Dolphin is an IDispatch interface subclass of IDispatch in Dolphin all the method calls are dynamic in nature . You just do the right things catch possible failures at necessary granularity and it will just work tm . Smalltalk sibbling is the doesNotUnderstand : aMessage method . Comment : PS : I m not gonna subscripbe to WinSCP forums where you also asked if it s this post it there .. . Comment : miroslav i followed your instructions and example and did get back a valid instance . thanks Comment : miroslav 1 can you explain the relationship between the typelib and the library class which i create i.e . dolphin tutorial in help 2 an example of the method you implemented mapping the library class to the winscp interface .",
"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 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 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 : I am using WinSCP .NET Assembly in PowerShell for file synchronization with a SFTP server . I am using the following code for synchronization : .. . http : winscp.net eng docs library session synchronizedirectories powershell .. . .. . Problem is when this script sync files through upload to SFTP it generates error although it actually uploads the file . The script gets terminated immediately with the following error : .. . .. . Upload of C : FileSync files test2.txt succeeded .. . .. . Permissions of Reports test2.txt kept with their defaults .. . .. . Setting timestamp of Reports test2.txt failed : .. . WinSCP.SessionRemoteException : Upload of file test2.txt was successful but error occurred while setting the permissions and or timestamp . If the problem persists turn off setting permissions or preserving timestamp . Alternatively you can turn on Ignore permission errors option . --- WinSCP.SessionRemoteException : The server does not support the operation . Error code : 8 .. . Error message from server : SSHServerAPI.SFTP.fxp attrs .. . --- End of inner-exception stack-trace --- .. . .. . .. . .. . I am not finding any way how to ignore permission error as it s suggested in the errors . The script does not complain when doing the syncchroniation through downloading files from SFTP . Any help please .. . Answer : The error is documented here : .. . https : winscp.net eng docs message preserve time perm .. . .. . I assume you did not enable setting permissions it s off by default . If you did turn it off by setting the TransferOptions.FilePermissions https : winscp.net eng docs library transferoptions filepermissions see below . Your server probably does not support updating timestamps of remote file . That makes it complicated to allow local-to-remote synchronization of files against such server as the timestamps are primary criteria https : winscp.net eng docs ui synchronize criteria to compare the files . In general it does not make sense to turn off updating timestamp with synchronization as the update is basically an integral part of the synchronization . The hint to Ignore permission errors is there for basic file transfers . As mentioned already it does not make sense for synchronization . So all you can to is to : .. . .. . turn off updating the timestamps set TransferOptions.PreserveTimestamp https : winscp.net eng docs library transferoptions filepermissions .. . .. . and make WinSCP not consider the timestamps when comparing files set criteria parameter https : winscp.net eng docs library session synchronizedirectories criteria of Session.SynchronizeDirectories https : winscp.net eng docs library session synchronizedirectories to WinSCP.SynchronizationCriteria : : Size or None . It s questionable though how such synchronization is meaningful . Comment : Martin many thanks . Your code update worked for me . A question though why you think such synchronization may not be meaningful Comment : Well synchronizing based on file size is not very reliable . For example if you change just one byte letter in the file the size does not change ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
.net
|
UNK_RELATION
|
|
sql-server-express-2005@targeting@123
|
sql-server-express-2005 -- microsoft sql-server-express-2005 is a free relational-database management system specifically @placeholder small-scale applications .
|
{
"confidence": [
51.96611022949219,
50.325927734375,
48.76960754394531,
42.542640686035156,
39.7113037109375,
36.82567596435547,
36.62083053588867,
36.556419372558594,
33.76207733154297,
30.554180145263672,
28.22977638244629,
27.128549575805664,
24.305187225341797,
22.255905151367188,
21.68507957458496,
20.61084747314453,
18.522197723388672,
17.649185180664062,
17.649185180664062,
16.516576766967773,
16.516576766967773,
16.516576766967773,
16.516576766967773,
16.516576766967773,
16.516576766967773,
16.516576766967773,
16.516443252563477,
13.500776290893555,
13.500776290893555,
13.500776290893555,
13.500776290893555,
13.500776290893555,
13.500776290893555,
13.500776290893555,
13.500776290893555,
13.500776290893555,
13.500776290893555,
13.500776290893555,
13.500776290893555,
13.500776290893555,
13.500776290893555,
13.500776290893555,
13.500776290893555,
13.500776290893555
],
"content": [
"Due to performance issues we are planning to move the SharePoint application to another server and also move the database onto the same physical server and run it using SQL server express 2005 .",
"I want to create a JDBC connection with SQL Server Express 2005 when i tried the following code i got exception my code is .. . .. . and the error showing is .. . .. . database details are follows",
"Can anyone advise the best way to move the database from an SQL server to SQL server express so that the SharePoint installation will be able to see it .",
"I am trying to connect to the sample database Northwind in SQL Server Express 2005 through Visal C++ 2008 using the following code : .. . .. . But I am getting the exception that .. . .. . login to the database failed for the user PC-ANKIT .. . .. . And after this I have no idea what happens but the the tables in the database magically disappear .",
"The list of databases in the SQL Server Management Studio still shows the Northwind database but it does not contain any tables views or anything .",
"The current setup is a server running SharePoint 2007 with the database stored on a separate SQL server installation .",
"You can do that in SQL Management your database - Security - Users .",
"Remember to enable mixed security mode in SQL Server - Properties - Security - SQL Server and Windows Authentication Mode .",
"You need to make sure user PC-ANKIT is at least a db datareader in your selected database not just a login in SQL server .",
"Verify the connection properties check that an instance of SQL Server is running on the host and accepting TCP IP connections at the port and that no firewall is blocking TCP connections to the port .",
"There are a few possibilities jdbc : sqlserver : TOSHIBA-PC SQLEXPRESS : 1433 can become jdbc : sqlserver : LOCALHOST SQLEXPRESS : 1433 or you need to turn off TCP Dynamic Ports via the SQL Server Configuration Manager",
"Try connecting to the database using visual-studio s server-explorer .",
"Also when I try doing the same thing using an equivalent code in VB in Visual Web Developer 2008 express edition - no problem arises whatsoever",
"@KennethClark telnet is not working in my system enviornment",
"Notice that this is a trusted connection if you want to use username and password I use : .. . .. . Server myServerAddress Database myDataBase User ID myUsername Password myPassword Integrated Security SSPI .. . .. . Hope it helps",
"Migrating the SharePoint installation from one physical server to another seems fairly straight forward using stsadm.exe .",
"I am able to connect to the database and access the data in all the tables .",
"For this user or group Properties - General - Database Role Membership make sure db datareader or db owner is selected .",
"I m looking for any advice on the best way to migrate a SharePoint 2007 installation and a database .",
"enter image description here http : i.stack.imgur.com TMNyL.jpg",
"@KennethClark while i edited the code as u mentioned the below error is showing TCP Dynamic Ports are already off .",
"Error : The TCP IP connection to the host LOCALHOST port 1433 has failed .",
"Error : connect timed out .",
".",
"Have you tried telnet",
"you can open a command-prompt and type telnet ipaddress 1433 if you get a connection then your firewall at least allows connections",
"Your connectionstring ConnectionString Data Source localhost SQLEXPRESS Initial Catalog Northwind Integrated Security SSPI indicates that you try to access it with the integrated security which uses the currently logged in windows user to authenticate against the database .",
"Can anyone please help me resolve this problem",
"Thanks in advance",
"If you connect successfully you can right-click the connection and check out the properties .",
"In there you will find the connection-string - use that in your application and check out if it works .",
"thanks for the answer",
"But I still dont understand why the connection-string I was using previously does not work in the case of VC++ as it works when I use it in Visual Web Developer",
"Maybe such user credentials don t exist for your databse yet .",
"You can provide explicit credentials using this syntax :",
"Your user or a group it belongs-to must be listed under this node .",
"If you still have problems try using user and password authentication .",
"You need to change your connection-string in this case by replacing Integrated Security SSPI with User ID your user Password pass .. . .. . Make sure you use exactly the same connection-string in VB version to rule out any differences between those 2 scenarios .",
"Has anyone done this type of migration before and could they recommend the best way to carry this out or if it is even possible .",
"I highly suggest using Tzunami s tools and products for SharePoint migration .",
"Their site provides various demo videos and other information regarding content migration .",
"They give user-friendly instructions making the process quick and easy",
"Their products are listed on the site- check them out at http : www.tzunami.com products Product-Overview .",
"Hope this helps"
]
}
|
{
"confidence": [
61.923316955566406,
61.623050689697266,
60.82195281982422,
58.9668083190918,
56.57344055175781
],
"content": [
"Question : I am trying to connect to the sample database Northwind in SQL Server Express 2005 through Visal C++ 2008 using the following code : .. . .. . But I am getting the exception that .. . .. . login to the database failed for the user PC-ANKIT .. . .. . And after this I have no idea what happens but the the tables in the database magically disappear . The list of databases in the SQL Server Management Studio still shows the Northwind database but it does not contain any tables views or anything . Also when I try doing the same thing using an equivalent code in VB in Visual Web Developer 2008 express edition - no problem arises whatsoever I am able to connect to the database and access the data in all the tables . Can anyone please help me resolve this problem Thanks in advance .. . Answer : You need to make sure user PC-ANKIT is at least a db datareader in your selected database not just a login in SQL server . You can do that in SQL Management your database - Security - Users . Your user or a group it belongs-to must be listed under this node . For this user or group Properties - General - Database Role Membership make sure db datareader or db owner is selected . If you still have problems try using user and password authentication . Remember to enable mixed security mode in SQL Server - Properties - Security - SQL Server and Windows Authentication Mode . You need to change your connection-string in this case by replacing Integrated Security SSPI with User ID your user Password pass .. . .. . Make sure you use exactly the same connection-string in VB version to rule out any differences between those 2 scenarios .",
"Question : I am trying to connect to the sample database Northwind in SQL Server Express 2005 through Visal C++ 2008 using the following code : .. . .. . But I am getting the exception that .. . .. . login to the database failed for the user PC-ANKIT .. . .. . And after this I have no idea what happens but the the tables in the database magically disappear . The list of databases in the SQL Server Management Studio still shows the Northwind database but it does not contain any tables views or anything . Also when I try doing the same thing using an equivalent code in VB in Visual Web Developer 2008 express edition - no problem arises whatsoever I am able to connect to the database and access the data in all the tables . Can anyone please help me resolve this problem Thanks in advance .. . Answer : Your connectionstring ConnectionString Data Source localhost SQLEXPRESS Initial Catalog Northwind Integrated Security SSPI indicates that you try to access it with the integrated security which uses the currently logged in windows user to authenticate against the database . Maybe such user credentials don t exist for your databse yet . You can provide explicit credentials using this syntax :",
"Question : I m looking for any advice on the best way to migrate a SharePoint 2007 installation and a database . The current setup is a server running SharePoint 2007 with the database stored on a separate SQL server installation . Due to performance issues we are planning to move the SharePoint application to another server and also move the database onto the same physical server and run it using SQL server express 2005 . Has anyone done this type of migration before and could they recommend the best way to carry this out or if it is even possible . Migrating the SharePoint installation from one physical server to another seems fairly straight forward using stsadm.exe . Can anyone advise the best way to move the database from an SQL server to SQL server express so that the SharePoint installation will be able to see it . .. . Answer : I highly suggest using Tzunami s tools and products for SharePoint migration . Their site provides various demo videos and other information regarding content migration . They give user-friendly instructions making the process quick and easy Their products are listed on the site- check them out at http : www.tzunami.com products Product-Overview . Hope this helps",
"Question : null .. . Answer : I want to create a JDBC connection with SQL Server Express 2005 when i tried the following code i got exception my code is .. . .. . and the error showing is .. . .. . database details are follows enter image description here http : i.stack.imgur.com TMNyL.jpg Comment : There are a few possibilities jdbc : sqlserver : TOSHIBA-PC SQLEXPRESS : 1433 can become jdbc : sqlserver : LOCALHOST SQLEXPRESS : 1433 or you need to turn off TCP Dynamic Ports via the SQL Server Configuration Manager Comment : @KennethClark while i edited the code as u mentioned the below error is showing TCP Dynamic Ports are already off . Error : The TCP IP connection to the host LOCALHOST port 1433 has failed . Error : connect timed out . Verify the connection properties check that an instance of SQL Server is running on the host and accepting TCP IP connections at the port and that no firewall is blocking TCP connections to the port . . Comment : Have you tried telnet you can open a command-prompt and type telnet ipaddress 1433 if you get a connection then your firewall at least allows connections Comment : @KennethClark telnet is not working in my system enviornment",
"Question : I am trying to connect to the sample database Northwind in SQL Server Express 2005 through Visal C++ 2008 using the following code : .. . .. . But I am getting the exception that .. . .. . login to the database failed for the user PC-ANKIT .. . .. . And after this I have no idea what happens but the the tables in the database magically disappear . The list of databases in the SQL Server Management Studio still shows the Northwind database but it does not contain any tables views or anything . Also when I try doing the same thing using an equivalent code in VB in Visual Web Developer 2008 express edition - no problem arises whatsoever I am able to connect to the database and access the data in all the tables . Can anyone please help me resolve this problem Thanks in advance .. . Answer : Try connecting to the database using visual-studio s server-explorer . If you connect successfully you can right-click the connection and check out the properties . In there you will find the connection-string - use that in your application and check out if it works . Notice that this is a trusted connection if you want to use username and password I use : .. . .. . Server myServerAddress Database myDataBase User ID myUsername Password myPassword Integrated Security SSPI .. . .. . Hope it helps Comment : thanks for the answer But I still dont understand why the connection-string I was using previously does not work in the case of VC++ as it works when I use it in Visual Web Developer"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
targeting
|
UNK_RELATION
|
sencha-touch-theming@sass@97
|
sencha-touch-theming -- sencha-touch has introduced a revolutionary new theming system built on @placeholder and compass .
|
{
"confidence": [
69.77885437011719,
62.84164810180664,
61.77418899536133,
61.73090362548828,
61.73090362548828,
60.010955810546875,
58.93734359741211,
56.494606018066406,
55.868412017822266,
55.282470703125,
54.59175491333008,
53.2885856628418,
52.30308532714844,
51.7115478515625,
50.0114631652832,
49.95751953125,
49.025962829589844,
49.025962829589844,
49.025962829589844,
49.025962829589844,
49.025962829589844,
49.025962829589844,
49.025962829589844,
48.446693420410156,
47.62479782104492,
46.850128173828125,
46.70426559448242,
46.680397033691406,
46.680397033691406,
46.33014678955078,
46.33014678955078,
46.33014678955078,
46.22557067871094,
43.05302429199219,
43.05302429199219,
43.05302429199219,
43.05302429199219,
43.05302429199219,
43.05302429199219,
43.05302429199219,
42.57677459716797,
42.36042785644531,
41.0590705871582,
40.206817626953125,
39.656517028808594,
39.397457122802734,
39.397457122802734,
39.397457122802734,
39.397457122802734,
39.006103515625,
38.60419845581055,
38.60419845581055,
38.58021545410156,
37.778385162353516,
37.4956169128418,
37.4956169128418,
37.4956169128418,
37.4956169128418,
37.4956169128418,
37.4956169128418,
36.741554260253906,
36.741554260253906,
36.379390716552734,
36.379390716552734,
36.379390716552734,
36.379390716552734,
36.379390716552734,
35.568077087402344,
35.254669189453125,
34.2184944152832,
34.09707260131836,
34.09707260131836,
34.09707260131836,
34.09707260131836,
33.897735595703125,
33.897735595703125,
33.897735595703125,
33.83207702636719,
33.348514556884766,
32.883888244628906,
32.174720764160156,
32.174720764160156,
32.01708984375,
30.950294494628906,
30.819950103759766,
30.819950103759766,
30.554954528808594,
30.554954528808594,
30.554954528808594,
30.554954528808594,
30.36994171142578,
30.180837631225586,
30.113319396972656,
29.68743324279785,
29.68743324279785,
29.53801727294922,
29.478107452392578,
28.739965438842773,
28.739965438842773,
28.50910186767578
],
"content": [
"Good practice to do this with css or more precise with Sencha Theming http : docs.sencha.com touch 2-0 guide theming .",
"But if its about using sass and css for theming sencha application than this article http : moduscreate.com bootstrapping-and-theming-your-app-with-sencha-touch-2-2-0 from moduscreate will really be helpful for a start .",
"I m pretty new to Sencha Touch .",
"I ve read this tutorial http : www.sencha.com blog an-introduction-to-theming-sencha-touch as well as some others .",
"And maybe you want to check out this http : www.sencha.com blog an-introduction-to-theming-sencha-touch .. . .. . EDIT :",
"I m playing with Sencha Touch Charts .",
"I am trying to use sass compass to customize the Sencha touch theme for my app .",
"It s also possible that your config.rb is misconfigured- this is a good resource on config.rb setup for compass http : www.sencha.com forum showthread.php 127607-Mastering-the-Compass-SASS-Setup-with-Sencha-Touch",
"I am developing a sencha-touch application using sencha-architect .",
"how to add sencha-touch - button sencha-touch - text field etc inside the list",
"If you re already using Sencha Architect theming is built right in if you re using the latest version .",
"I put my vars after import sencha-touch default all and before include sencha-panel",
"Is it possible to override SASS files for specific components in Sencha Touch",
"try including icon .. . .. . also take a look at following useful links .. . .. . Several pictos icons in 2.1 not available in 2.2 http : www.sencha.com forum showthread.php 261613 .. . .. . Adding Custom Font Icons to Sencha Touch 2.2 http : extdesenv.com theming adding-custom-font-icons-to-sencha-touch-2-2",
"In sencha-touch you have to use the command sencha app build for compiling the sass files .",
"sencha-touch textfield clear event http : stackoverflow.com questions 7343006 sencha-touch-textfield-clear-event but i dont want to display separate clear icon apart from the default clear icon displayed by searchfield .",
"I want to create a custom toolbar using sencha-touch .",
"possible duplicate of How to define dynamically the title in a NavigationView on Sencha Touch",
"I need to swap the css for my Mobile application done in Sencha Touch .",
"I think this is a simple task but sencha-touch makes it a challenge for me .",
"My goal with sencha-touch-2 http : i.stack.imgur.com me1Km.jpg",
"How do we get Sencha Touch to use the newer sass",
"We are using Sencha Touch 2.3.0 framework for our app .",
"However on digging up now I find that the Sencha Cmd software 4.0.0.203 comes with it s own compass and sass 3.1.7 - as I can see in C : Sencha Cmd 4.0.0.203 extensions sencha-compass gems bin which is most likely being used and might be causing the problem .",
"You ll want to use ext.draw which is part of the Sencha Touch Charts http : dev.sencha.com deploy touch-charts-1.0.0 docs api Ext.draw.Surface add-on for Touch .",
"You should really look at Saas and Compass nevertheless you will always have to override some css by hand because not all variables are yet defined in Sencha Touch .",
"For a newcomer to Sencha Compass SSAS and Ruby how am I supposed to know where to go from there",
"For more detail check this article I wrote not long ago : sass-for-sencha-touch-2-windows-7 http : one2teamdev.blogspot.fr 2012 08 sass-for-sencha-touch-2-windows-7.html",
"Assuming that you ve already included the sencha-touch.js and touch-charts.js files in your index.html.. . .. . .. . From the Sencha docs on Ext.draw.Component http : dev.sencha.com deploy touch-charts-1.0.0 docs api Ext.draw.Component :",
"I have an Sencha Touch 2 app with quite a few lists having onItemDisclosure set to true .",
"I am implementing custom design for a company doing a sencha-touch app for ios and android .",
"I m trying to set the theme of my sencha-touch app based on url parameter .",
"I am using sencha-touch-2 and not getting help inside sencha forum so I hope you guys can help me .",
"Have a look at this link francisshanahan.com index.php 2011 http : francisshanahan.com index.php 2011 how-to-theme-sencha-touch-sass-windows",
"I m was looking but i cant find a way to draw a shape circle square in sencha-touch just for drag that shape in a tablet .",
"I am stuck in sencha-touch list were i need to give alternate background-color for the rows in a list .",
"http : stackoverflow.com questions 11818641 how-to-define-dynamically-the-title-in-a-navigationview-on-sencha-touch",
"Sencha Touch stores the titles of the hidden views in the backButtonStack array on the navigation bar component .",
"I have this button in Sencha Touch 2 I would need to resize to small I need change its height .",
"I m creating a sencha-touch app and the design requires a segmented button in the tab bar .",
"To use compass and saas here is what you should do .. . .. . First you need to install ruby use RubyInstaller http : rubyinstaller.org .. . .. . then install rubygems Rubygems http : rubygems.org .. . .. . then install compass gem install compass --pre .. . .. . then open your application .scss file should be in resources sass and change some sencha variables .",
"I am new in sencha-touch application development .I am trying to load some data from remote we server to a list .",
"I tried to create SASS file .. . @import sencha-touch base @import sencha-touch base all myapp-font-family : Arial myapp-gray : 707070 .x-body font-family : myapp-font-family background-color : myapp-gray .x-panel background-color : myapp-gray .. . .. . It is not working reflecting .",
"Basically it is already done in Sencha Touch 2.4 or early and in theory may borrow s css from touch themes to ExtJS .. . .. . I wonder may somebody did this trick",
"How do I change the theme with sass and compass",
"One more doubt how to customize a list in sencha-touch because i need to add text field button images in the list row s .",
"I tried it with html and was able to do is there any way directly adding sencha-touch object items to the list.please help me out on this .",
"1 I am trying to write a sencha-touch application where the I load list from my database using php .",
"I have implemented my application in sencha-touch .. . .. . in my panel i have a navigation bar i want to set title dynamically on panel header .. . .. .",
"I have built a phonegap app in sencha-touch-2 . it all works ok but I notice a momentary hang when switching tabs when it loads images icons .",
"I am using Sencha architect .",
"I haven t used sencha-architect .",
"If you want to control the gradient then you can check how here in the docs http : docs-origin.sencha.com touch 2.4 2.4.1-apidocs api Ext.Toolbar-css mixin-sencha-toolbar-ui .. . .. . Hope this helps",
"Maybe running sencha app watch or sencha app build commands before testing your change",
"i couldn t find a listener to handle that event on sencha docs .",
"In Sencha Cmd you can create a starting point by building an empty app .",
"Or do you recomand to keep at least some of the sencha widgets",
"Because I dont wanna mess up sencha logic either .",
"Many of the properties of Sencha components are tied to sass functions or specific css .",
"Please tell me how to include our own pictos in sencha 2.0 .",
"Then when you test are you using Sencha CMD",
"Sencha generates an ID for almost every element .",
"Are Compass SSAS really required to change the colors of the theme",
"I know nothing about Compass SSAS .",
"I do the Compass work on my mac .",
"Big problem is that all the examples and help are for SASS Compass .",
"Then run compass compile in your resources sass dir .",
"See this post http : www.sencha.com blog re-skinning-your-apps-just-got-easier-with-sencha-architect-3 from the Sencha blog .",
"Start point to your question is Sencha Kitchen sink samples http : docs.sencha.com touch 2-0 touch-build examples production kitchensink index.html demo buttons .. . .. . In short you have to add ui : small to button s configuration .. . .. . Cheers Oleg",
"I am using Sencha Architect 2 for my example .",
"i am trying to handle event on tap of clear button on sencha searchfield which appears there by default .",
"Depending on the version of ST you are using you might want to use Sencha Cmd .",
"I would recommend you keep the sencha widgets and provide your own sass css within these cls properties .",
"You just need to add your Sencha theme to your app.json file and platform name along with that theme .",
"I d have to disagree that it s simple to run compass compile .",
"To be honest I haven t tried to get Compass to work in Windows .",
"The compass compile command using this one successfully compiles the app.scss .",
"I added the base-color and base gradient properties to my resources sass app.scss and compiled it by issuing compass compile from the folder .",
"I m working on my first production site and I m having some issues wrapping my mind around the theming .",
"For style editing you can also use sencha app watch in this way sencha-cmd line tool will listent for changes in your sass files and automatically rebuilds your project .",
"docs.sencha.com touch 2-0 api Ext.Img http : docs.sencha.com touch 2-0 api Ext.Img",
"Just need to use ext-neptune-touch or ext-crisp-touch themes to get triangles away .",
"Based on posts here and on the Sencha Forum I ve tried using .. . .. . But that s added a heavily scaled up iPhone arrow underneath the blue circle one .",
"Please ignore the previous comment : On digging up a little more I found this post : stackoverflow.com questions 16887285 http : stackoverflow.com questions 16887285 sencha-cmd-sass-version-upgrade This post referenced - sencha.com forum showthread.php 259826 http : www.sencha.com forum showthread.php 259826 gives a hack to create links for referencing the ruby directories Based on the latest comment on Sencha forum thread which mentions that sencha CMD 4.0.0.203 is still bundled with sass-3.1.7 I guess Sencha has still not solved this problem to allow configuring a different versions of ruby-gems for sass .",
"So some colors and other properties cannot be changed by modifying Sencha sass variables .",
"Yes we have default themes in Sencha Architect like DefaultTheme BlackBerry MountainView .",
"The base theme color is used in many different places and there are various gradient rules applied to it that Compass SASS generates .",
"I tried for hours to get SASS Compass working on windows gave up and hand coded my CSS .",
"you can specify an images path in the config.rb for compass to an absolute path to your images or a images dir relative to your project directory",
"If so during the build the app does a compass compile and recreates the app.css file from the MyApp resources sass app.scss file .",
"Also ST2.2 beta is out there if you an wait for the final release I know there will be some significant theming changes - including a barebones stylesheet that has only the absolute necessities for the components to render in the right spots and function correctly everything shows up as simply blank boxes with text .",
"OR go for global css vars : .. . .. . http : docs.sencha.com touch 2.4 apidocs api Global CSS",
"Is there an easy way to do this with sencha built-in features or do I have to create that by myself add a toolbar with the segmented button as an item and create all the controls to actually get the same thing",
"After that is complete you can run the sencha app watch command from the app root folder and any sass changes will compile automatically along with many other processes .",
"I ve found that if you are going to use the Sencha framework it is much easier to follow the paths they provide for customization like the cls properties they include baseCls innerCls cls inputCls etc .",
"I am trying to develop a mobile app using Sencha touch .I need to show a custom message box with 4 buttons.But i cannot change the with of message box because of that only 3 buttons are visible in the message.please anyone help me to adjust the width of Message Box.Following is the code i am using .. . .. . Ext.Msg.show title : msg : width : 300 height : 300 .. . .. . Thanks in advance .... .",
"This is from the sample touchtomatoes app touch-2.3.0 examples touchtomatoes resources sass .",
"i am writing this code in itemTpl of Ext.Dataview using Sencha Architect this.up testpanel .push xtype : imagecontainer else Ext.Msg.alert Opps",
"I would like to create theme like default themes with respect to my company standards which will be used in all my sencha app .",
"You can ofcourse go and modify the CSS and replace all the colors you need since Compass SASS just compile to CSS ."
]
}
|
{
"confidence": [
103.06909942626953,
100.36353302001953,
84.38687896728516,
81.3922348022461,
78.4719009399414,
75.89065551757812,
72.04205322265625,
71.50336456298828,
70.50606536865234,
68.27244567871094,
60.08528137207031,
59.816558837890625,
58.54792022705078,
57.946807861328125,
57.58876037597656,
57.57884216308594,
57.43463897705078,
56.607200622558594,
53.10620880126953,
52.929771423339844
],
"content": [
"Question : I m pretty new to Sencha Touch . From what I ve played with it s a great framework . I m working on my first production site and I m having some issues wrapping my mind around the theming . Are Compass SSAS really required to change the colors of the theme It seems ludicrous to me that a simple color change would require so much work . I ve read this tutorial http : www.sencha.com blog an-introduction-to-theming-sencha-touch as well as some others . Am I missing something .. . Answer : You should really look at Saas and Compass nevertheless you will always have to override some css by hand because not all variables are yet defined in Sencha Touch . So some colors and other properties cannot be changed by modifying Sencha sass variables . Anyway you should use sass so that your custom css code is located in your app.scss file and this will be compiled to the app.css . So you do not need to add any other .css file in your app structure . And then you can add your own var to easily customize your own look . To use compass and saas here is what you should do .. . .. . First you need to install ruby use RubyInstaller http : rubyinstaller.org .. . .. . then install rubygems Rubygems http : rubygems.org .. . .. . then install compass gem install compass --pre .. . .. . then open your application .scss file should be in resources sass and change some sencha variables . Then run compass compile in your resources sass dir . Then relaunch your app . It is that easy For more detail check this article I wrote not long ago : sass-for-sencha-touch-2-windows-7 http : one2teamdev.blogspot.fr 2012 08 sass-for-sencha-touch-2-windows-7.html",
"Question : I m pretty new to Sencha Touch . From what I ve played with it s a great framework . I m working on my first production site and I m having some issues wrapping my mind around the theming . Are Compass SSAS really required to change the colors of the theme It seems ludicrous to me that a simple color change would require so much work . I ve read this tutorial http : www.sencha.com blog an-introduction-to-theming-sencha-touch as well as some others . Am I missing something .. . Answer : You can ofcourse go and modify the CSS and replace all the colors you need since Compass SASS just compile to CSS . I would have to disagree with you though on that it s ludicrous . The base theme color is used in many different places and there are various gradient rules applied to it that Compass SASS generates . Quite frankly it s very simple to only change it in one line in your sass file run compass compile and be on your way versus digging through CSS find replacing and then minifying it for production . Comment : Thanks for the response . I d have to disagree that it s simple to run compass compile . I know nothing about Compass SSAS . Comment : ..continued Don t get me wrong I tried to compile it I think . I purchased the Compass.app and told it to watch my SenchaTouch Resources SSAS folder and I got this error message : pastebin.com gksz3kUf http : pastebin.com gksz3kUf . For a newcomer to Sencha Compass SSAS and Ruby how am I supposed to know where to go from there Comment : To be honest I haven t tried to get Compass to work in Windows . I do the Compass work on my mac . Have a look at this link francisshanahan.com index.php 2011 http : francisshanahan.com index.php 2011 how-to-theme-sencha-touch-sass-windows Comment : Thanks . You got me started on the right track . Comment : I tried for hours to get SASS Compass working on windows gave up and hand coded my CSS . Big problem is that all the examples and help are for SASS Compass .",
"Question : I have this button in Sencha Touch 2 I would need to resize to small I need change its height . Could you please provide me a sample of code thanks .. . Answer : Good practice to do this with css or more precise with Sencha Theming http : docs.sencha.com touch 2-0 guide theming . Start point to your question is Sencha Kitchen sink samples http : docs.sencha.com touch 2-0 touch-build examples production kitchensink index.html demo buttons .. . .. . In short you have to add ui : small to button s configuration .. . .. . Cheers Oleg Comment : This solved the problems cheers",
"Question : I am developing a sencha-touch application using sencha-architect . I have to change the background-color font color font-family and icons according my company s standard in the app . I tried to create SASS file .. . @import sencha-touch base @import sencha-touch base all myapp-font-family : Arial myapp-gray : 707070 .x-body font-family : myapp-font-family background-color : myapp-gray .x-panel background-color : myapp-gray .. . .. . It is not working reflecting . Question : how can we theme application . How can we use sass and css altogether in the app . I would like to know the same for ExtJS also . --Sridhar .. . Answer : I haven t used sencha-architect . But if its about using sass and css for theming sencha application than this article http : moduscreate.com bootstrapping-and-theming-your-app-with-sencha-touch-2-2-0 from moduscreate will really be helpful for a start .",
"Question : null .. . Answer : This seems to be a saas scss related issue . I am trying to include some scss code from the example files in Touch 2.3 on Windows 7 to get the first time screen . This is from the sample touchtomatoes app touch-2.3.0 examples touchtomatoes resources sass . The scss files in question are as follows : .. . .. . welcomeOverlay.scss : .. . .. . media-queries.scss : .. . .. . app.scss : .. . .. . Now when I build my app sencha app build testing I get the following error : .. . .. . Now if I comment the following lines in welcomeOverlay.scss the build goes through well : .. . .. . I am new to sass can anyone help with this please Ravi Comment : This code appears to compile just fine with Sass Compass the error given doesn t even make any sense in the context of the code that it s complaining about . Do you have a recent version of Sass 3.2+ Comment : Thanks I guess that might the issue . I installed Ruby 1.9.3 compass 0.12.2 and Sass 3.2.12 as advised in this stack-overflow post goo.gl gWFQpG http : goo.gl gWFQpG . The compass compile command using this one successfully compiles the app.scss . However on digging up now I find that the Sencha Cmd software 4.0.0.203 comes with it s own compass and sass 3.1.7 - as I can see in C : Sencha Cmd 4.0.0.203 extensions sencha-compass gems bin which is most likely being used and might be causing the problem . How do we get Sencha Touch to use the newer sass Comment : On digging up a little more I found this post : stackoverflow.com questions 16887285 http : stackoverflow.com questions 16887285 sencha-cmd-sass-version-upgrade This post referenced - sencha.com forum showthread.php 259826 http : www.sencha.com forum showthread.php 259826 Comment : Please ignore the previous comment : On digging up a little more I found this post : stackoverflow.com questions 16887285 http : stackoverflow.com questions 16887285 sencha-cmd-sass-version-upgrade This post referenced - sencha.com forum showthread.php 259826 http : www.sencha.com forum showthread.php 259826 gives a hack to create links for referencing the ruby directories Based on the latest comment on Sencha forum thread which mentions that sencha CMD 4.0.0.203 is still bundled with sass-3.1.7 I guess Sencha has still not solved this problem to allow configuring a different versions of ruby-gems for sass . If you know of a clean workaround kindly share . Thanks . Comment : Cimmanon thanks a lot for pointing out the problem : - . The workaround as above seems to be the way for now and it does work .",
"Question : I am stuck in sencha-touch list were i need to give alternate background-color for the rows in a list . One more doubt how to customize a list in sencha-touch because i need to add text field button images in the list row s . I tried it with html and was able to do is there any way directly adding sencha-touch object items to the list.please help me out on this . .. . Answer : You can use cls : customCls An optional extra CSS class that will be added to this component s Element defaults to . This can be useful for adding customized styles to the component or any of its children using standard CSS rules . And maybe you want to check out this http : www.sencha.com blog an-introduction-to-theming-sencha-touch .. . .. . EDIT : Comment : style sheet is fine but how to get the list index value and based on the index we can apply color. . Comment : @Sameer - I edited my answer Cheers Comment : how to add sencha-touch - button sencha-touch - text field etc inside the list",
"Question : I am developing a sencha-touch application using sencha-architect . I have to change the background-color font color font-family and icons according my company s standard in the app . I tried to create SASS file .. . @import sencha-touch base @import sencha-touch base all myapp-font-family : Arial myapp-gray : 707070 .x-body font-family : myapp-font-family background-color : myapp-gray .x-panel background-color : myapp-gray .. . .. . It is not working reflecting . Question : how can we theme application . How can we use sass and css altogether in the app . I would like to know the same for ExtJS also . --Sridhar .. . Answer : If you re already using Sencha Architect theming is built right in if you re using the latest version . See this post http : www.sencha.com blog re-skinning-your-apps-just-got-easier-with-sencha-architect-3 from the Sencha blog . Comment : Thanks for the response . Yes we have default themes in Sencha Architect like DefaultTheme BlackBerry MountainView . I would like to create theme like default themes with respect to my company standards which will be used in all my sencha app . Is this possible Comment : Right click on your theme and hit export to file which creates an XDC file . Then you can select EDIT IMPORT COMPONENT and import that XDC file in other projects . Comment : thanks for the help .",
"Question : I have a fast question that I hope some1 can answer me . I am implementing custom design for a company doing a sencha-touch app for ios and android . When I first came it was a big mess of importants and overrides everywhere and i couldnt touch Anything without having to backtrack stuff for 10minutes before I could set a property . Now we have a new project with supercusom design and I am seriously thinking of excluding as much as possible and maby even everything of senchas sass css files except for maby loading-spinner or something like that . Or do you recomand to keep at least some of the sencha widgets Because I dont wanna mess up sencha logic either . thanx Comment : I don t quite understand.. . Where is the custom CSS code that is the mess Did someone actually merge it in all over the ST debug css file If you are scrapping everything anyway for the new project why not just start over again with the base ST CSS or custom SASS build of it Comment : Also ST2.2 beta is out there if you an wait for the final release I know there will be some significant theming changes - including a barebones stylesheet that has only the absolute necessities for the components to render in the right spots and function correctly everything shows up as simply blank boxes with text . .. . Answer : Many of the properties of Sencha components are tied to sass functions or specific css . For instance layouts and layout types will be translated to css at runtime . I ve found that if you are going to use the Sencha framework it is much easier to follow the paths they provide for customization like the cls properties they include baseCls innerCls cls inputCls etc . then to simply override all of their x-type classes or use important . I would recommend you keep the sencha widgets and provide your own sass css within these cls properties .",
"Question : I m trying to make my own custom theme for this I import the Base theme . I m trying to add icons to buttons like this : .. . .. . The icon isn t showing but if I use the default theme they are . And I already set the variable include-default-icons to true . My custom button : .. . .. . What should I add to display icons with base theme .. . Answer : try including icon .. . .. . also take a look at following useful links .. . .. . Several pictos icons in 2.1 not available in 2.2 http : www.sencha.com forum showthread.php 261613 .. . .. . Adding Custom Font Icons to Sencha Touch 2.2 http : extdesenv.com theming adding-custom-font-icons-to-sencha-touch-2-2 Comment : Yeah I forgot to include the icons it is weird because I thought they would be automatically included if you set the include-default-icons to true.. . Anyway thank you Comment : @Dar-Jee you re welcome. .",
"Question : I am trying to build a custom theme . I added the base-color and base gradient properties to my resources sass app.scss and compiled it by issuing compass compile from the folder . The compilation worked and replaced the css app.csss . However I am not seeing the changes reflected in my application . How do I change the theme with sass and compass .. . Answer : Base gradient takes a - not a .. . .. . Then check that your var are defined after the line should not matter for base-color but better to put them after .. . .. . Your vars should be defined like this : .. . .. . Check that you are in the app-folder resources sass app.css and not in the sdk folder .. . .. . When compiling you should see the following line .. . .. . Empty your browser-cache then reload your app . Comment : I have found that I have to define base-color before the first import or it will have no effect . @Ronan Does it work for you if you define it after the import Comment : I put my vars after import sencha-touch default all and before include sencha-panel Comment : Check this post for more explanations link http : www.sencha.com forum showthread.php 238064-SASS-Form-variable-form-label-background-color",
"Question : We are using Sencha Touch 2.3.0 framework for our app . We have a list of items that is grouped by date . We are trying to adjust the group header s layout with css . All documentation on the internet says that we had to add the cls : CustomClass item and add the class to the app.css file . Alle other classes in that file are working problerly . So it cannot be the css file . We did instead it isn t working we still see the default layout . Might anybody be able to help List definition : .. . Answer : Are you adding the css to resources css app.css file Then when you test are you using Sencha CMD Maybe running sencha app watch or sencha app build commands before testing your change If so during the build the app does a compass compile and recreates the app.css file from the MyApp resources sass app.scss file . Anything you write in the .css file that has a matching sass scss file will be over written . You may want to include a css file that can be in the css folder but you name it uniquely . Maybe call it overrides.css . Now you need to let the app know about the css file . For that you can add it to the head of the index.html file but I would recommend adding it in the MyApp app.json file around line 73 . Make sure your css loads after app.css by placing it after the app.css reference . Once you clear your cache and refresh you should hopefully see your changes . If your css doesn t override Sencha s you may need to target the dom item more specifically . Sencha generates an ID for almost every element . I don t recommend using those because they can change between projects .",
"Question : I want a custom toolbar with background-color as gradient . I tried with sass . But still it is not working. . What i did i am writing it step by step : .. . .. . 1 . I create on resources folder in my current project . 2 . I kept themes and images folder there . 3 . I created css and sass folder inside resources folder . in the sass folder i created app.scss file which contains the below code : .. . .. . 1 . Then i created config.rb file with this code : .. . .. . dir File.dirname FILE load File.join dir . . themes sass path dir css path File.join dir . . css environment : production output style : compressed .. . .. . 1 . then i run compass compile app.scss in the comand prompt .. . 2 . In css folder app.css file has been created after running the command . 7.then i change the code for toolbar : .. . .. . xtype : toolbar docked : top ui : charcoal title : Set Compliance Goals .. . .. . But after that when i am running the project in simulator toolbar is coming with white background... . please help. . Comment : Are you sure that you application uses the correct css file check the link reference in index.html The generated file will be created in the parent directory of the sass directory . Comment : link rel stylesheet type text css href resources css custom.css only this change should be enough right Comment : According to your config.rb the generated css would be in resources app.css . Your scss file is named app.scss that means the generated file will be app.css . And it will be located in the directory above the directory where your config.rb file is located Comment : Hey thanks buddy . Now it is coming . config.rb file was creating the problem . .. . Answer : check in your web browser s inspector that the css is targeting x-toolbar.And empty your browser-cache might help . It s also possible that your config.rb is misconfigured- this is a good resource on config.rb setup for compass http : www.sencha.com forum showthread.php 127607-Mastering-the-Compass-SASS-Setup-with-Sencha-Touch",
"Question : I am developing a sencha-touch application using sencha-architect . I have to change the background-color font color font-family and icons according my company s standard in the app . I tried to create SASS file .. . @import sencha-touch base @import sencha-touch base all myapp-font-family : Arial myapp-gray : 707070 .x-body font-family : myapp-font-family background-color : myapp-gray .x-panel background-color : myapp-gray .. . .. . It is not working reflecting . Question : how can we theme application . How can we use sass and css altogether in the app . I would like to know the same for ExtJS also . --Sridhar .. . Answer : In sencha-touch you have to use the command sencha app build for compiling the sass files . For style editing you can also use sencha app watch in this way sencha-cmd line tool will listent for changes in your sass files and automatically rebuilds your project .",
"Question : I m was looking but i cant find a way to draw a shape circle square in sencha-touch just for drag that shape in a tablet . if some one knows how make this would appreciate the help . .. . Answer : Assuming that you ve already included the sencha-touch.js and touch-charts.js files in your index.html.. . .. . .. . From the Sencha docs on Ext.draw.Component http : dev.sencha.com deploy touch-charts-1.0.0 docs api Ext.draw.Component :",
"Question : I want a custom toolbar with background-color as gradient . I tried with sass . But still it is not working. . What i did i am writing it step by step : .. . .. . 1 . I create on resources folder in my current project . 2 . I kept themes and images folder there . 3 . I created css and sass folder inside resources folder . in the sass folder i created app.scss file which contains the below code : .. . .. . 1 . Then i created config.rb file with this code : .. . .. . dir File.dirname FILE load File.join dir . . themes sass path dir css path File.join dir . . css environment : production output style : compressed .. . .. . 1 . then i run compass compile app.scss in the comand prompt .. . 2 . In css folder app.css file has been created after running the command . 7.then i change the code for toolbar : .. . .. . xtype : toolbar docked : top ui : charcoal title : Set Compliance Goals .. . .. . But after that when i am running the project in simulator toolbar is coming with white background... . please help. . Comment : Are you sure that you application uses the correct css file check the link reference in index.html The generated file will be created in the parent directory of the sass directory . Comment : link rel stylesheet type text css href resources css custom.css only this change should be enough right Comment : According to your config.rb the generated css would be in resources app.css . Your scss file is named app.scss that means the generated file will be app.css . And it will be located in the directory above the directory where your config.rb file is located Comment : Hey thanks buddy . Now it is coming . config.rb file was creating the problem . .. . Answer : Depending on the version of ST you are using you might want to use Sencha Cmd . Makes it a lot easier . In Sencha Cmd you can create a starting point by building an empty app . After that is complete you can run the sencha app watch command from the app root folder and any sass changes will compile automatically along with many other processes . This works for me . If you want to control the gradient then you can check how here in the docs http : docs-origin.sencha.com touch 2.4 2.4.1-apidocs api Ext.Toolbar-css mixin-sencha-toolbar-ui .. . .. . Hope this helps",
"Question : I have implemented my application in sencha-touch .. . .. . in my panel i have a navigation bar i want to set title dynamically on panel header .. . .. . enter image description here 1 .. . .. . and in initcomponent method implemented code to get the component like this Comment : possible duplicate of How to define dynamically the title in a NavigationView on Sencha Touch http : stackoverflow.com questions 11818641 how-to-define-dynamically-the-title-in-a-navigationview-on-sencha-touch .. . Answer : Sencha Touch stores the titles of the hidden views in the backButtonStack array on the navigation bar component . You can change the title at a certain index in the navigation view like this : .. . .. . I made a Gist https : gist.github.com vote539 8351170 with a function that takes care of the internals .",
"Question : i am trying to handle event on tap of clear button on sencha searchfield which appears there by default . i couldn t find a listener to handle that event on sencha docs . any help will be appreciated . i referred this thread . sencha-touch textfield clear event http : stackoverflow.com questions 7343006 sencha-touch-textfield-clear-event but i dont want to display separate clear icon apart from the default clear icon displayed by searchfield . thank you . Comment : You will need to post some code so that people can give ideas suggestions Comment : code ListDemo.searchField new Ext.form.Search id : searchField xtype : searchfield placeHolder : Search name : searchField store : ListDemo.ListStore onClearTap : function console.log test clear this.setValue useClearIcon : true onClearIconTap : function if this.disabled this.setValue console.log onClearTap : Clear button tapped code i wish to handle the X icon tap event for this searchfield . .. . Answer : you can clear that by using function clearFilter",
"Question : I m was looking but i cant find a way to draw a shape circle square in sencha-touch just for drag that shape in a tablet . if some one knows how make this would appreciate the help . .. . Answer : You ll want to use ext.draw which is part of the Sencha Touch Charts http : dev.sencha.com deploy touch-charts-1.0.0 docs api Ext.draw.Surface add-on for Touch .",
"Question : I have an Sencha Touch 2 app with quite a few lists having onItemDisclosure set to true . They show a white arrow in a blue circle on both Android and iPhone even though the iPhone is using apple.css . Based on posts here and on the Sencha Forum I ve tried using .. . .. . But that s added a heavily scaled up iPhone arrow underneath the blue circle one . How do I get rid of the blue one and make it look iPhone style .. . Answer : Ended up fixing it manually : Comment : You are fantastic .",
"Question : I m creating a sencha-touch app and the design requires a segmented button in the tab bar . Is there an easy way to do this with sencha built-in features or do I have to create that by myself add a toolbar with the segmented button as an item and create all the controls to actually get the same thing That s what I tried so far . the listener is there to get around the error of Object Object has no method setActive but doesn t result in the behaviour I d like it to have . Comment : You are going to need to add a segmented button as an item to the tab bar . Comment : Then the framework complains that there s no method setActive . For segmentedbuttons this method is called setActiveItem Comment : put ur code up . Others mightunderstand whats goin wrong . .. . Answer : enter image description here http : i.stack.imgur.com qVtDe.png Comment : Thank you for your help"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
sass
|
UNK_RELATION
|
ibeacon-android@notifications@123
|
ibeacon-android -- ibeacon in a single sentence is a technology that enables an ios device or other hardware to send push @placeholder to ios devices within close proximity using ble bluetooth low energy .
|
{
"confidence": [
50.831275939941406,
48.6977424621582,
48.307579040527344,
48.307579040527344,
48.052452087402344,
47.18313980102539,
46.83017349243164,
46.562171936035156,
46.00946044921875,
44.87360763549805,
43.609413146972656,
43.609413146972656,
43.573421478271484,
43.47523498535156,
43.08212661743164,
43.0182991027832,
43.01709747314453,
42.301513671875,
41.93586730957031,
41.740814208984375,
41.52409362792969,
41.39762878417969,
41.240501403808594,
41.01991653442383,
41.01991653442383,
40.34074783325195,
40.33470916748047,
39.67530059814453,
39.603981018066406,
39.586299896240234,
39.43391799926758,
39.06972122192383,
38.719642639160156,
38.68718719482422,
38.68718719482422,
38.426734924316406,
38.420989990234375,
37.88679885864258,
37.44889831542969,
37.40736770629883,
37.40412521362305,
37.40412521362305,
37.18644332885742,
36.44337463378906,
36.13014602661133,
36.11528015136719,
35.76348876953125,
35.734710693359375,
35.734710693359375,
35.72954177856445,
35.67117691040039,
35.209983825683594,
35.0758056640625,
35.07110595703125,
34.74925231933594,
34.55665588378906,
34.29883575439453,
34.167327880859375,
33.98805618286133,
33.98805618286133,
33.8538818359375,
33.8538818359375,
33.65943908691406,
33.4378662109375,
33.4378662109375,
33.4378662109375,
33.4378662109375,
33.38737487792969,
32.834712982177734,
32.81022644042969,
32.10833740234375,
31.950910568237305,
31.40365982055664,
31.398561477661133,
31.398561477661133,
31.210384368896484,
31.11208724975586,
30.912845611572266,
30.848369598388672,
30.848369598388672,
30.848369598388672,
30.848369598388672,
30.515844345092773,
30.133081436157227,
30.07515525817871,
29.658489227294922,
29.6513671875,
29.277149200439453,
29.192424774169922,
28.966224670410156,
28.91029930114746,
28.736217498779297,
28.622161865234375,
28.479774475097656,
28.473535537719727,
28.473535537719727,
27.890897750854492,
27.84447479248047,
27.727249145507812,
27.722646713256836
],
"content": [
"See : Make Samsung Android device advertise as an iBeacon http : stackoverflow.com questions 20312892 make-samsung-android-device-advertise-as-an-ibeacon iOS devices however can act as iBeacons .",
"The code is available here : .. . .. . https : github.com RadiusNetworks android-ibeacon-service .. . .. . For this to work you need Android 4.3 which introduced the Low Energy Bluetooth APIs .",
"My Understand for iBeacon : Beacons are scan using by UUID in iOS .",
"If i set UUID for multiple beacons able to search in iOS using by ibeacon",
"The algorithm in the Android iBeacon Library is not the same as in iOS CoreLocation because the iOS CoreLocation implementation is closed source .",
"Yes Android devices can act as iBeacon .",
"Can an Android device act as an iBeacon and figure out when other Android devices come in its range",
"Will this code detect all iBeacon devices",
"I m looking for a way to detect iBeacon iOS 7.0 feature from an Android device .",
"Going to a BLE or iBeacon hackathon will almost certainly a trigger it .",
"Hi URL : developer.radiusnetworks.com ibeacon-android download.html http : developer.radiusnetworks.com ibeacon-android download.html is not work .",
"I have stumbled upon Android iBeacon Library samples http : developer.radiusnetworks.com ibeacon-android samples.html and gave it a try .",
"I start working with ibeacon and android .",
"I m using Android iBeacon Library https : github.com RadiusNetworks android-ibeacon-service from Radius Networks to play with iBeacons .",
"Some other user have ibeacon near me with same UUID Which is i m using in my ibeacon .",
"I read that you were using Estimote beacons which are iBeacon compatible so they do work with the Android iBeacon Library .",
"So if you have an iBeacon that is transmitting 30 times per second as iOS devices acting as iBeacons do iOS will be able to get 300 samples in a 10 second period and Android only 9 .",
"In my app I would like to write a few characteristics to a BLE device iBeacon .",
"Please any one confirm beacons are scan based on UUID using by ibeacon in iOS .",
"I m fairly new to iBeacon but I have spent the day trying to get informations and a working Android application with iBeacon .",
"Long version : .. . .. . I am developing an Android application specifically for the Nexus 7 tablet that focuses on detecting Bluetooth Low Energy BLE devices .",
"When writing the open-source Android iBeacon Library http : developer.radiusnetworks.com ibeacon-android I had to build all the functionality from scratch to make a didRangeBeaconsInRegion callback that was the equivalent to what is in iOS .",
"If you just want to play with this I would focus on one class from the library : IBeacon.java https : github.com vmagro android-ibeacon-service blob master src main java com radiusnetworks ibeacon IBeacon.java .. . .. . This class can convert from an Android Blueooth LE scan record to an IBeacon if the scanned Bluetooth device is indeed an iBeacon .. . .. . You can read about how to set up Bluetooth LE scanning on Android here : http : developer.android.com guide topics connectivity bluetooth-le.html",
"Here is some piece of code that will work for android as iBeacon : .. . .. . Hope it will helpful for user searching for android as iBeacon .",
"That s exactly what the Android iBeacon Library http : developer.radiusnetworks.com ibeacon-android from Radius Networks http : www.radiusnetworks.com does .",
"You also need a device with a low energy bluetooth chipset .",
"Given that most if not all Samsung devices with BLE will probably get an upgrade to Android 4.3 in the next several months it just isn t worth the effort to port the Android iBeacon Library for the Samsung BLE SDK .",
"In both iOS CoreLocation and the Android iBeacon Library the distance estimate is only an estimate and fluctuations with noise on signal strength measurements cause the estimates to bounce around .",
"In theory it would be possible to create a version of the Android iBeacon Library that works with Samsung BLE SDK but it would involve rewriting much of it .",
"It is important to understand that there is no native iBeacon support in Android .",
"Many Android devices have a bluetooth hardware layer that only provides only a single detection callback per detected hardware device per scan .",
"I m using the IBeacon SDK from radius networks on the android .",
"http : developer.radiusnetworks.com ibeacon-android download.html .. . .. . The warning has to do with the way that iBeacon data are passed between the library s background service and your app .",
"First download the Android iBeacon Library in the tar.gz format for Eclipse .",
"This warning appears with outdated versions of the Android iBeacon Library 0.7 or prior .",
"Please note the manufacturer and model of iBeacon you are using .",
"I am using AltBEacon Android library https : github.com AltBeacon android-beacon-library for developing an iBeacon app for Android Devices .",
"The Android OS does not have any code that detects iBeacons but it does have code that allows you to scan for Bluetooth LE devices which are a lower-level device than an iBeacon .",
".. . .. . You do not say what library you are using but the open-source Android iBeacon Library http : developer.radiusnetworks.com ibeacon-android allows you to do this by combining ranging and monitoring .",
"I m doing a 2D project and in my scene I have an empty game object that contains code handling the detection of the iBeacon : .. . .. . The Init method starts the iBeacon plugin and starts searching for an iBeacon around my mobile device .",
"You can download the iBeacon spec https : developer.apple.com ibeacon click Download Artwork and Specifications .",
"Ref : http : www.ibeacon.com what-is-ibeacon-a-guide-to-beacons .. . .. . https : developer.apple.com ibeacon Getting-Started-with-iBeacon.pdf",
"By default the Android iBeacon Library does one bluetooth scan every 1.1 seconds when it is in the foreground therefore allowing one measurement every 1.1 seconds .",
"When using Eclipse you need to have the Android iBeacon Library imported as a separate library-project in the IDE .",
"Here is the code the shows how this is done : .. . .. . https : github.com RadiusNetworks android-ibeacon-service blob master src com radiusnetworks ibeacon IBeacon.java L177-L231",
"But you could do what you suggest on iOS by making a custom app that makes phones act as an iBeacon and look for other iBeacons around them .",
"I m trying to write a Cordova plugin which interacts with the Radius Networks iBeacon library for Android .",
"The same goes for iBeacon format support .",
"The layout for iBeacon is a very common implementation .",
"The actual code to advertise is deep within Apple s proprietary code so it d be difficult to replicate on Android but it s totally doable to set any iOS app up as an iBeacon .",
"You simply have to tell Android to do a BLE scan get each advertisement and look for one that starts with the known iBeacon byte sequence .",
"The library endorses the AltBeacon http : altbeacon.org standard and its documentation does not mention how to detect iBeacon devices .",
"As we have Kontakt iBeacon devices so i am using kontakt sdk .",
"The library is fully compatible with any standard iBeacon .",
"Normally iBeacon technologies are not intended for phones to see other phones .",
"You can also transmit as a beacon on rooted Android 4.4.3 devices http : stackoverflow.com questions 34424479 can-an-android-4-4-device-act-as-an-ibeacon but it requires an app installed with system privileges .",
"i am new to Ibeacon and i want to know can we detect Ibeacon in android without using any SDKLibrary or library can any one give sample example .",
"I have the following code and am trying to notify 5 in 5 seconds the distance traveled within the ibeacon area .",
"Make sure you have followed the setup instructions here http : developer.radiusnetworks.com ibeacon-android configure.html .",
"The Android iBeacon Library is based on a 10 second running average of 80th percentile measurements e.g .",
"I had implemented iBeacon in Android 4.3 API using IntentService plus AlarmManager .",
"I am trying to transmit iBeacon using Android Beacon Library but I am not sure if my code is right .",
"You can then parse out the iBeacon fields .",
"is the m : prefix too restrictive or is it the right byte sequence that matches the iBeacon spec",
"Similarly does the rest of the layout exactly match the iBeacon spec",
"Reference : .. . .. . Example of an iBeacon packet seen on SO http : stackoverflow.com a 19040616 20226",
"This has not changed since iBeacon was announced by Apple three years ago .",
"Do those other Android devices need to have Bluetooth turned on",
"I would like the 2.0 release of the Android Beacon Library to be able to properly detect both old style Estimote beacons pre-2013 models that did not support iBeacon technology and Gimbal beacons .",
"Samples of both ranging and monitoring code are available here http : developer.radiusnetworks.com ibeacon-android samples.html .",
"https : code.google.com p android issues detail id 67272 .. . .. . The bug can affect any app or library that does Bluetooth LE scanning or looks for iBeacons not just the Android iBeacon Library .",
"This is exactly the approach used to describe the distance estimate formula described here : Understanding ibeacon distancing http : stackoverflow.com questions 20416218 understanding-ibeacon-distancing The fitted curve is a power curve .",
"I google a lot but this topic is quite new I even created a new tag ibeacon questions tagged ibeacon so I would be happy if I get some links to ressources from the iOS world which descripes the implementation .",
"It basically is a direct implementation of the ranging example here http : developer.radiusnetworks.com ibeacon-android samples.html .",
"I read the Android documentation where it seem that the iBeacon is some kind of GATT server which sends its position .",
"Short Answer : No BLE Bluetooth .",
"The link for the project follows : sample project https : github.com RadiusNetworks ibeacon-reference-android .. . .. . But the problem is that I am not able to build the project .",
"Would a Bluetooth LE Jedi know any trick how to get a reliable BLE scanning mode on cheap Android 4.4 devices",
"So as far as I understand the beacons are not transmitting AltBeacon or iBeacon standard frame .",
"All beacons that comply with the iBeacon layout can use the same parser .",
"If someone put out ibeacon from wallet user get notify .",
"But it seems to me that the iBeacon is working as a server which is kind of funny to me .",
"Check this link-to turn your android 5.0 phone to an iBeacon device developer.radiusnetworks.com 2014 11 18 http : developer.radiusnetworks.com 2014 11 18 beacon-transmission-with-android-5.html",
"I am using Android Bluetooth LE API .",
"I have successfully modified the reference implementation app https : github.com AltBeacon android-beacon-library-reference of the Android Beacon Library https : github.com AltBeacon android-beacon-library using the following beacon layout https : github.com AltBeacon android-beacon-library blob master src main java org altbeacon beacon BeaconParser.java L61 so that it detects an iBeacon device that I have at hand : .. . .. . Being new to the internals of BLE packets I m not sure if this is the correct layout to use .",
".. . .. . Chrome for iOS and Android installed on many newer Android devices but very few iOS devices will automatically detect Eddystone-URL advertisements and display a notification from Chrome if the user has opted-in .",
"CoreLocation is what requires the UUID up front and Apple blocks iBeacon scanning with CoreBluetooth .",
"My BLE scanning code is very similar to the one described here http : www.truiton.com 2015 04 android-bluetooth-low-energy-ble-example .. . .. . This thread Android 4.4 BLE Scanning lack of stability http : stackoverflow.com questions 35503904 android-4-4-ble-scanning-lack-of-stability suggests that BLE scanning is stable on 5.0+ but in my case that is not true because I am on API 22 .. . .. . This thread Android BLE Beacon scanning on different phone models http : stackoverflow.com questions 26584425 android-ble-beacon-scanning-on-different-phone-models suggests that we need to turn on and turnoff the scanning every 1.5 seconds and that is not practical in our use-case because our app should run for 10 hours every day we think starting stopping of system resource is expensive operation .. . .. . I am puzzled on why the same beacon is getting detected in continuous callbacks on Nexus 5 tested on both 4.4 and 6.0 Android APIs but when running on Huawei Ascend Mate2 though callback is continuously invoked the same iBeacon is detected only once while other non BLE devices are detected in subsequent callbacks .",
"I have got an Estimote Beacon which is in iBeacon mode .",
"At close range perhaps 80 of packets are received correctly with the rest lost due to radio noise collisions channel issues or other low-level bluetooth factors .",
"If a customer comes into my shop and he doesn t have my app installed on his device can iBeacon work or must he install the app first",
"Also take into consideration that BLE devices do not broadcast their presence all the time as one of their purposes is very low battery usage .",
"strike Doing this on Android would currently only be possible with Samsung devices . strike .. . .. . To answer your second question yes a mobile device both Android or iOS must have an app installed to take advantage of iBeacons .",
"Short version : .. . .. . In my tests with Android 5.0 Lollipop I have noticed android.bluetooth.le.BluetoothLeScanner https : developer.android.com reference android-bluetooth le BluetoothLeScanner.html detects BLE devices less frequently than Android 4.4 KitKat .",
"I am trying to access a cordova plugin https : github.com petermetz cordova-plugin-ibeacon .",
"Not all iBeacon implementations support GATT services so it may be that you are not supposed to be able to connect .",
"If you are interested in this you might open a feature request https : github.com RadiusNetworks android-ibeacon-service issues page 1 state open in the open-source library .",
"http : developer.radiusnetworks.com 2014 04 02 a-solution-for-android-bluetooth-crashes.html .. . .. . The good news is that this low-level Android bug largely affects developers or people who work in Bluetooth dev shops who have been around a large number of Bluetooth devices in the same place .",
"Would developer.samsung.com ble http : developer.samsung.com ble work for earlier Android versions",
"Put the device into airplane mode and put bluetooth on ."
]
}
|
{
"confidence": [
92.74362182617188,
81.99784088134766,
80.14186096191406,
78.56127166748047,
74.21512603759766,
74.05152893066406,
73.43313598632812,
69.90409088134766,
68.67350006103516,
67.63351440429688,
66.26087188720703,
64.07551574707031,
63.90790557861328,
63.30706787109375,
59.518218994140625,
56.36503219604492,
55.247276306152344,
53.14862823486328,
53.11228561401367,
51.45410919189453
],
"content": [
"Question : I m looking for a way to detect iBeacon iOS 7.0 feature from an Android device . I read the Android documentation where it seem that the iBeacon is some kind of GATT server which sends its position . While the Android documentation says that I should not poll that data but for the detection this would be nessesary . I google a lot but this topic is quite new I even created a new tag ibeacon questions tagged ibeacon so I would be happy if I get some links to ressources from the iOS world which descripes the implementation . Also if there are some Android libs which I did not find yet would be nice . Comment : I am not very familiar with the iOS platform but can it support a BTLE server or just a client It turns out that the Android BTLE only supports a client even though the documentation suggests it can support a server . One can actually create a server but it cannot advertise . Comment : iOS supports a server . If you take a look at the now-public AirLocate sample in particular ALConfigurationViewController from WWDC 2013 you can see how they re setting up the server to advertise . The actual code to advertise is deep within Apple s proprietary code so it d be difficult to replicate on Android but it s totally doable to set any iOS app up as an iBeacon . Comment : Which devices did you use This would be really interesting . Comment : A HTC one it need at least Android 4.3 and Bluetooth low energy see also developer.android.com guide topics connectivity http : developer.android.com guide topics connectivity bluetooth-le.html please note this is the answers section so please delete this comment . Comment : I have a Google Nexus 10 . Just updating it to Android 4.2.2 and next is 4.3 . That should work too right .. . Answer : EDIT : The library below has now been taken down but a replacement library is now available here : .. . .. . https : github.com AltBeacon android-beacon-library .. . .. . .. . .. . I have ported the iOS7 iBeacon SDKs to Android and was able to see standard iBeacons and estimate their range . The code is available here : .. . .. . https : github.com RadiusNetworks android-ibeacon-service .. . .. . For this to work you need Android 4.3 which introduced the Low Energy Bluetooth APIs . You also need a device with a low energy bluetooth chipset . If you don t want to use the full library above you can roll your own . iBeacons simply transmit a BLE advertisement once per second that start with a known sequence of bytes . You simply have to tell Android to do a BLE scan get each advertisement and look for one that starts with the known iBeacon byte sequence . You can then parse out the iBeacon fields . Here is the code the shows how this is done : .. . .. . https : github.com RadiusNetworks android-ibeacon-service blob master src com radiusnetworks ibeacon IBeacon.java L177-L231 Comment : Would developer.samsung.com ble http : developer.samsung.com ble work for earlier Android versions I m going to find out for myself hopefully sooner rather than later but thought I d pose the question here too . Comment : No the Samsung BLE SDK is a completely different implementation than the one native to Android 4.3 . In theory it would be possible to create a version of the Android iBeacon Library that works with Samsung BLE SDK but it would involve rewriting much of it . Given that most if not all Samsung devices with BLE will probably get an upgrade to Android 4.3 in the next several months it just isn t worth the effort to port the Android iBeacon Library for the Samsung BLE SDK . Comment : @MarkPeterson very interested to know if you are able to get it to work with earlier versions . Comment : Do you know if it is possible to look for beacons in the background like you can do in iOS 7 Comment : For @MarkPeterson and others looking for support on Samsung devices runing 4.2.x this is now possible . See here : github.com davidgyoung android-beacon-library tree https : github.com davidgyoung android-beacon-library tree samsung-ble-sdk",
"Question : I was trying to implement beacon scanning program and i want the android BLE services to behave similar to iOS didRangeBeacons method i.e it should get called every one second . But in android there is no such method . But in android there is leScanCallback method that gets called very frequently with a scan period of less than a second . So is there any way that i can implement my functionality in leScanCallback method and increase its scan period interval to 1 second so that it behaves similar to iOS s didRangeBeacons method . Also will it be the bad programming to continually scan beacon and increasing its scan interval in android Thanks in advance .. . Answer : It is important to understand that there is no native iBeacon support in Android . The Android leScanCallback method is not at all an equivalent of the iOS didRangeBeacons method . The leScanCallback method simply gives you a callback every time an advertising packet from a Bluetooth device is seen devices with the connectable bit set in the advertisement are only given a callback the first time its Mac address is seen until you stop and restart scanning . Unless you stop and restart scanning on a timer there is no scan period and you get callbacks as the packets arrive . This can be many times a second . When writing the open-source Android iBeacon Library http : developer.radiusnetworks.com ibeacon-android I had to build all the functionality from scratch to make a didRangeBeaconsInRegion callback that was the equivalent to what is in iOS . To do this the library stops and restarts scanning about once a second and buffers the list of all iBeacons seen in the cycle only calling the callback with the list of visible iBeacons at the end of the cycle . There are lots of other complexities not discussed here . The code is free https : github.com RadiusNetworks android-ibeacon-service for you to review and modify so I encourage you to do so if you want to roll your own . Comment : Thanks David . I was reviewing the code written by you . Its really nice work . And now I got the logic behind scanning . : Comment : If we want to scan only when the application is in foreground and not in background.What will be better Scanning continously or scanning in an interval of say 1 sec Comment : You must scan at an interval . Many Android devices have a bluetooth hardware layer that only provides only a single detection callback per detected hardware device per scan . Stopping and restarting is needed to get a second callback for the same hardware device . Comment : If we are not scanning in the background should we use BluetoothCrashResolver as the lib says It is rare for most users but can be problematic for those with apps scanning for Bluetooth LE devices in the background . Comment : The same crashes cash happen for foreground only apps yes they are just less frequent .",
"Question : I m looking for a way to detect iBeacon iOS 7.0 feature from an Android device . I read the Android documentation where it seem that the iBeacon is some kind of GATT server which sends its position . While the Android documentation says that I should not poll that data but for the detection this would be nessesary . I google a lot but this topic is quite new I even created a new tag ibeacon questions tagged ibeacon so I would be happy if I get some links to ressources from the iOS world which descripes the implementation . Also if there are some Android libs which I did not find yet would be nice . Comment : I am not very familiar with the iOS platform but can it support a BTLE server or just a client It turns out that the Android BTLE only supports a client even though the documentation suggests it can support a server . One can actually create a server but it cannot advertise . Comment : iOS supports a server . If you take a look at the now-public AirLocate sample in particular ALConfigurationViewController from WWDC 2013 you can see how they re setting up the server to advertise . The actual code to advertise is deep within Apple s proprietary code so it d be difficult to replicate on Android but it s totally doable to set any iOS app up as an iBeacon . Comment : Which devices did you use This would be really interesting . Comment : A HTC one it need at least Android 4.3 and Bluetooth low energy see also developer.android.com guide topics connectivity http : developer.android.com guide topics connectivity bluetooth-le.html please note this is the answers section so please delete this comment . Comment : I have a Google Nexus 10 . Just updating it to Android 4.2.2 and next is 4.3 . That should work too right .. . Answer : I didn t quite get what you mean could you provide links to the documentation which said that you should not poll the data But it seems to me that the iBeacon is working as a server which is kind of funny to me . Isn t it meant to find other devices not the phone itself https : developer.bluetooth.org gatt characteristics Pages CharacteristicViewer.aspx u org.bluetooth.characteristic.position quality.xml .. . .. . This is the characteristics it uses though . To me it sounds like that the devices you are looking for are the beacons and the phone itself is just a listener . So you would not poll the EHPE and EVPE data but you should actually listen to it s changes or broadcasts . I m kind of new to this myself also and couldn t find any really specific documentation . Though be advised in the link I provided there is download link in the top corner which will provide you the full documentation in PDF format . There you will probably find more answers .",
"Question : I m looking for a way to detect iBeacon iOS 7.0 feature from an Android device . I read the Android documentation where it seem that the iBeacon is some kind of GATT server which sends its position . While the Android documentation says that I should not poll that data but for the detection this would be nessesary . I google a lot but this topic is quite new I even created a new tag ibeacon questions tagged ibeacon so I would be happy if I get some links to ressources from the iOS world which descripes the implementation . Also if there are some Android libs which I did not find yet would be nice . Comment : I am not very familiar with the iOS platform but can it support a BTLE server or just a client It turns out that the Android BTLE only supports a client even though the documentation suggests it can support a server . One can actually create a server but it cannot advertise . Comment : iOS supports a server . If you take a look at the now-public AirLocate sample in particular ALConfigurationViewController from WWDC 2013 you can see how they re setting up the server to advertise . The actual code to advertise is deep within Apple s proprietary code so it d be difficult to replicate on Android but it s totally doable to set any iOS app up as an iBeacon . Comment : Which devices did you use This would be really interesting . Comment : A HTC one it need at least Android 4.3 and Bluetooth low energy see also developer.android.com guide topics connectivity http : developer.android.com guide topics connectivity bluetooth-le.html please note this is the answers section so please delete this comment . Comment : I have a Google Nexus 10 . Just updating it to Android 4.2.2 and next is 4.3 . That should work too right .. . Answer : The only catch here is to detect beacon even the app is not running . Unlike iOS7 it is not natively support . In iOS7 when you on your BT it will automatically notify you when you enter the region of registered iBeacon . I had implemented iBeacon in Android 4.3 API using IntentService plus AlarmManager . To do a scan every 30 sec to save your battery power it shall be longer . It works well for user . Only when the matching uuid major minor is found then it will trigger notifications . Otherwise it will sleep and wake up for scanning again . i think this is the solution for your question . Comment : I ve found repeated scans interfere with Blutooth audio . There has to be a better way than this . Comment : altbeacon s library has a sample that includes launching an app . altbeacon.github.io android-beacon-library samples.html http : altbeacon.github.io android-beacon-library samples.html",
"Question : Can an Android device act as an iBeacon and figure out when other Android devices come in its range Do those other Android devices need to have Bluetooth turned on If a customer comes into my shop and he doesn t have my app installed on his device can iBeacon work or must he install the app first There are so many customers are visiting our shop daily but if they don t have my app installed does the iBeacon concept work Comment : You should break away from IBeacon and break it up into a general term do some research . Comment : @JoxTraex i had read this tutorial : devfright.com ibeacons-tutorial-ios-7-clbeaconregion-clbeacon http : www.devfright.com ibeacons-tutorial-ios-7-clbeaconregion-clbeacon But i have confusion so ask question here . Please help me if you have any idea about this same . Comment : Check this link-to turn your android 5.0 phone to an iBeacon device developer.radiusnetworks.com 2014 11 18 http : developer.radiusnetworks.com 2014 11 18 beacon-transmission-with-android-5.html .. . Answer : UPDATE : This is now possible on Android 5.0 and you can find open-source code for transmitting as a beacon https : github.com AltBeacon android-beacon-library blob master src main java org altbeacon beacon BeaconTransmitter.java in the 2.1+ version of the Android Beacon Library http : altbeacon.github.io android-beacon-library . There is also a full-featured version of a beacon transmitter in the Locate https : play.google.com store apps details id com.radiusnetworks.locate hl en app in the Google Play Store . You can also transmit as a beacon on rooted Android 4.4.3 devices http : stackoverflow.com questions 34424479 can-an-android-4-4-device-act-as-an-ibeacon but it requires an app installed with system privileges . For older OS versions continue reading . Android 4.3 devices with BluetoothLE can see iBeacons but not act as iBeacons because Android 4.3 does not support peripheral mode . Samsung Android devices contain a separate proprietary SDK but it also does not allow devices to act as iBeacons . See : Make Samsung Android device advertise as an iBeacon http : stackoverflow.com questions 20312892 make-samsung-android-device-advertise-as-an-ibeacon iOS devices however can act as iBeacons . Normally iBeacon technologies are not intended for phones to see other phones . But you could do what you suggest on iOS by making a custom app that makes phones act as an iBeacon and look for other iBeacons around them . This would allow anybody with the app to see others with the same app nearby . All phones would need Bluetooth turned on . strike Doing this on Android would currently only be possible with Samsung devices . strike .. . .. . To answer your second question yes a mobile device both Android or iOS must have an app installed to take advantage of iBeacons . Neither operating-system currently does anything when it sees an iBeacon unless an app is installed that is specifically programmed to do something . So customers who arrive in a store must have an app already installed or they cannot interact with iBeacons . Comment : Thank you for help : Comment : Also this See BLE Peripheral Mode - android-developers.blogspot.com 2014 06 http : android-developers.blogspot.com 2014 06 developer-preview-and-play-services-5.html Comment : You can also transmit as a beacon on rooted Android 4.4.3 devices but it requires an app installed with system privileges . How can I do that Comment : If you post a new question I will answer -- not enough room to explain in comments . Comment : That is an important clarification yes . Not only does transmission on Android 5.x+ require chipset support but it also requires support in the ROM . Nexus 5 devices for example have chipset support but Google disabled support in the official ROM . I have compiled a list of devices known to support and not support transmission here : altbeacon.github.io android-beacon-library http : altbeacon.github.io android-beacon-library beacon-transmitter-devices.html",
"Question : Can an Android device act as an iBeacon and figure out when other Android devices come in its range Do those other Android devices need to have Bluetooth turned on If a customer comes into my shop and he doesn t have my app installed on his device can iBeacon work or must he install the app first There are so many customers are visiting our shop daily but if they don t have my app installed does the iBeacon concept work Comment : You should break away from IBeacon and break it up into a general term do some research . Comment : @JoxTraex i had read this tutorial : devfright.com ibeacons-tutorial-ios-7-clbeaconregion-clbeacon http : www.devfright.com ibeacons-tutorial-ios-7-clbeaconregion-clbeacon But i have confusion so ask question here . Please help me if you have any idea about this same . Comment : Check this link-to turn your android 5.0 phone to an iBeacon device developer.radiusnetworks.com 2014 11 18 http : developer.radiusnetworks.com 2014 11 18 beacon-transmission-with-android-5.html .. . Answer : Yes Android devices can act as iBeacon . I achieve this using android 5.X and AltBeacon library https : github.com AltBeacon android-beacon-library blob master src main java org altbeacon beacon BeaconTransmitter.java . AltBeacon library from Radius Networks provide classes to build android as beacon emitter and receptor as well . Here is some piece of code that will work for android as iBeacon : .. . .. . Hope it will helpful for user searching for android as iBeacon . jj Comment : Thanks for sharing . : Comment : Does this need a rooted-device Comment : No there is no need to root the device :",
"Question : I have a working BLE scanning app that has been working fine for last few months on Nexus 5 on various API versions from 4.4 to 6.0 . Today we ran the app on different device Huawei Ascend Mate2 that has API 22 and found what I thought was an interesting or peculiar behavior : callback gets fired continuously about thrice a second but my iBeacon is detected in only one callback and in remaining callbacks it picks other devices in the house like netgear router and roku etc I donot know if this netgear and rouku are even BLE devices . My BLE scanning code is very similar to the one described here http : www.truiton.com 2015 04 android-bluetooth-low-energy-ble-example .. . .. . This thread Android 4.4 BLE Scanning lack of stability http : stackoverflow.com questions 35503904 android-4-4-ble-scanning-lack-of-stability suggests that BLE scanning is stable on 5.0+ but in my case that is not true because I am on API 22 .. . .. . This thread Android BLE Beacon scanning on different phone models http : stackoverflow.com questions 26584425 android-ble-beacon-scanning-on-different-phone-models suggests that we need to turn on and turnoff the scanning every 1.5 seconds and that is not practical in our use-case because our app should run for 10 hours every day we think starting stopping of system resource is expensive operation .. . .. . I am puzzled on why the same beacon is getting detected in continuous callbacks on Nexus 5 tested on both 4.4 and 6.0 Android APIs but when running on Huawei Ascend Mate2 though callback is continuously invoked the same iBeacon is detected only once while other non BLE devices are detected in subsequent callbacks . This is the first time I tested outside Nexus . Did anyone test BLE scanning on Huawei Ascend Mate2 Any observations and comments would be appreciated . Huawei Ascend Mate2 : Device model number is MT2L03 and Android version is 5.1 .. . Answer : I worked with a lot of different devices and I can tell you that the behaviour is very different on different devices . I don t have an Huawei Mate2 but I could observe similar behaviour where you only get a scan result once per device . So if you need to have multiple scan result for the same device you need to restart the scan from time to time . I think 1.5s is a bit too much but this depends on your use-case .",
"Question : I m using Android iBeacon Library https : github.com RadiusNetworks android-ibeacon-service from Radius Networks to play with iBeacons . After some time I see constantly alerts popping out of the blue : Unfortunately Bluetooth Share has stopped . with Report OK buttons . Phone : Nexus 5 with Android 4.4.2 . That s a bummer since Nexus 5 is currently top Android phone and using iBeacons seems not working after some time . That means that iBeacons cannot be used in production as Bluetooth LE does not work properly on Android even on the newest release . Only factory reset seems to fix the problem and I cannot ask users of my app to do so : . Logcat : Comment : possible duplicate of Bluetooth share has stopped working when performing LeScan http : stackoverflow.com questions 22048721 bluetooth-share-has-stopped-working-when-performing-lescan .. . Answer : EDIT : There is now a partial solution for this here . http : developer.radiusnetworks.com 2014 04 02 a-solution-for-android-bluetooth-crashes.html .. . .. . The good news is that this low-level Android bug largely affects developers or people who work in Bluetooth dev shops who have been around a large number of Bluetooth devices in the same place . Going to a BLE or iBeacon hackathon will almost certainly a trigger it . Fortunately most end users of our apps do not do this . The bug is triggered when an internal buffer holding recently scanned Bluetooth LE Mac addresses fills up . After it fills scanning a new Bluetooth LE device will cause Android s Bluetooth service to crash and restart itself . The dialog you see is from Android s Bluetooth Share service which dies not cleanly handle the restart of the Bluetooth Service restart and crashes itself . Here is the Android bug report . https : code.google.com p android issues detail id 67272 .. . .. . The bug can affect any app or library that does Bluetooth LE scanning or looks for iBeacons not just the Android iBeacon Library . But again not all users will experience it . I work at Radius Networks where we have dozens of Bluetooth LE devices transmitting all the time and it took four months before I ever saw that dialog on my Nexus 4 -- it only came up two weeks ago . Since then I have been working to characterize the problem and find workarounds . I have been able to clear the condition simply by going into Airplane Mode for a few seconds then coming out . This however is not a permenant fix as overflowing Android s buffer again will cause it to return . We are still researching more automated solutions . Comment : My Nexus 5 got this problem without being exposed to more than four beacons . Additionally it was fine earlier this morning and the error simple began occuring while I was testing with only those four beacons near . There has to be more to this story . Comment : If the beacons rotate their mac addresses e.g . Gimbal beacons then even a single beacon can cause this condition because each mac address appears to android as a different device . Comment : Thanks David These are estimote beacons so no rotating mac addresses . Comment : It could be that your mac address table is already full in the Bluedroid stack from being around a large number of devices or a smaller number with rotating macs at an earlier time . If the table is already full even being around a handful of devices can push it over the limit and cause a crash .",
"Question : I have successfully modified the reference implementation app https : github.com AltBeacon android-beacon-library-reference of the Android Beacon Library https : github.com AltBeacon android-beacon-library using the following beacon layout https : github.com AltBeacon android-beacon-library blob master src main java org altbeacon beacon BeaconParser.java L61 so that it detects an iBeacon device that I have at hand : .. . .. . Being new to the internals of BLE packets I m not sure if this is the correct layout to use . The library endorses the AltBeacon http : altbeacon.org standard and its documentation does not mention how to detect iBeacon devices . Will this code detect all iBeacon devices i.e . is the m : prefix too restrictive or is it the right byte sequence that matches the iBeacon spec Similarly does the rest of the layout exactly match the iBeacon spec Reference : .. . .. . Example of an iBeacon packet seen on SO http : stackoverflow.com a 19040616 20226 Comment : The reference application is down now. . Comment : @BlueTrin Thanks updated the link-to the new repo . .. . Answer : That worked for me too I don t think you need to match the 4c00 part because that is the manufacturer id so you can probably leave that off and start with m : 2-3 0215 Everything else looks right and it seems to work . Comment : Thanks From testing with Estimote beacons I can confirm that the m : 2-3 0215 change is indeed necessary . Comment : This worked for me also..i used. . beaconManager.getBeaconParsers .add new BeaconParser . setBeaconLayout m : 2-3 0215 i : 4-19 i : 20-21 i : 22-23 p : 24-24 Comment : How do you read that layout What is m i and p I have an out-of-the-box beacon bought from China . By using Bluetooth LE Scanner app I was able to find the beacon s UUID major and minor . But how do I find the UUID pattern to put it into setBeaconLayout Comment : @AimanB Kindly refer this : stackoverflow.com questions 25319682 http : stackoverflow.com questions 25319682 correct-layout-to-detect-kontakt-beacon-on-android-with-altbeacon . In this m : Manufacturer Data i : Proximity UUID i : Major Number i : Minor Number p : Signal Power d : battery level . They represent byte offset . You need to add 6 while counting .Eg : Manufacturer ID is in between 8th and 9th in the string m : 2-3 0215 i : 4-19 i : 20-21 i : 22-23 p : 24-24 . Comment : is there a way to scan for any beacon around regardless if its estimote or not",
"Question : I m fairly new to iBeacon but I have spent the day trying to get informations and a working Android application with iBeacon . I have stumbled upon Android iBeacon Library samples http : developer.radiusnetworks.com ibeacon-android samples.html and gave it a try . I used the latest aar file 0.7.3 and basically copy-paste their examples in a new project . I have created a beacon using an iPad with AirLocate compiled from Apple s code from the Dev Center and launch the code . My problem is the range fluctuating all the time with no logic . For example the phone in this case a Nexus 5 original rom no modification placed half a meter away from the iPad gives me the following measures : .. . .. . 0.01m .. . 0.03m .. . 0.07m .. . 0.48m .. . 0.01m .. . 0.02m .. . .. . etc . When I use another iPad with AirLocate on it it gives a more stable and realistic measure . Excluding the beacon as the source of the problem . I have made the test with a Nexus 7 2013 Original rom not modified and I got the same issue . I have read the wifi can cause problem so I disabled it but it is still the same . I also have the same issue with Radius Networks application on the Play Store : iBeacon Locate https : play.google.com store apps details id com.radiusnetworks.ibeaconlocate hl en .. . .. . I was wondering if the anyone else have the problem with this library Is there something I can do to help fix this problem Do you know another library I can use which won t cause that kind of problem Any help is appreciate . Thank you in advance . .. . Answer : A big part of the variation you see is Android is caused by a limitation in the way Android allows access signal strength measurements from Bluetooth LE . Unfortunately there isn t much that can be done about this without changes to Android . In both iOS CoreLocation and the Android iBeacon Library the distance estimate is only an estimate and fluctuations with noise on signal strength measurements cause the estimates to bounce around . The algorithm in the Android iBeacon Library is not the same as in iOS CoreLocation because the iOS CoreLocation implementation is closed source . The intention is that they behave in a similar way . The Android iBeacon Library is based on a 10 second running average of 80th percentile measurements e.g . the top and bottom 10th percentile measurements are thrown away for the average . You can see the details of the calculation here : .. . .. . On Android the Bluetooth LE Scan API only allows a single signal strength measurement per scan . On iOS it is possible to get a different measurement for each advertisement broadcasted . By default the Android iBeacon Library does one bluetooth scan every 1.1 seconds when it is in the foreground therefore allowing one measurement every 1.1 seconds . So if you have an iBeacon that is transmitting 30 times per second as iOS devices acting as iBeacons do iOS will be able to get 300 samples in a 10 second period and Android only 9 . This explains why the estimate has higher noise on Android . And again there is very little that can be done about it without operating-system changes . Depending on your use-case you may be able to reduce the noise in the distance estimate on Android by implementing a custom calculation that includes more samples over a longer period of time . This would only be appropriate if your use-case does not need rapid updates in the estimate . If you are interested in this you might open a feature request https : github.com RadiusNetworks android-ibeacon-service issues page 1 state open in the open-source library . Comment : Thank you for your answer this makes it a bit more clear about what is going on . Yet when I go further with my devices let s say 10m away I ve got very big variations from 1m to 20m measured . Is that normal Should I have such important variation Comment : Sorry for double commenting this I cannot edit my last comment . For your information here is a graph of the accuracy over time I was standing still with my Nexus 5 3 meters away from the ipad-mini broadcasting as an ibeacon . imgur.com dG7NYi2 http : imgur.com dG7NYi2 Comment : It is normal for variation to increase with distance . The graph does look like a little more variation than I typically see at 3m but this could be caused by reflections in your test location or other factors . If you want to drill into this more also plot the rssi alongside the distance from iBeacon.getRssi . Comment : Great answer thanks @davidgyoung . We d seen this issue with both yours and Estimote s Android SDKs and assumed it must ve been something to do with how Android surfaces the RSSI . Really good clarification . Comment : what should be the value of sampleExpirationMilliseconds if a user is moving say in a car As I read in the docs 20 secs may not be appropriate for cases where fast responses in distance estimates are expected .",
"Question : i am new to Ibeacon and i want to know can we detect Ibeacon in android without using any SDKLibrary or library can any one give sample example . i know some library like Radius Networks . but i don t want to use any library .. . Answer : The Android OS does not have any code that detects iBeacons but it does have code that allows you to scan for Bluetooth LE devices which are a lower-level device than an iBeacon . You can roll-your own code that detects iBeacons using this Bluetooth LE scanning . That s exactly what the Android iBeacon Library http : developer.radiusnetworks.com ibeacon-android from Radius Networks http : www.radiusnetworks.com does . It is open-source so if you don t want to use the library you can simply copy blocks of code out of the library and do your own detection . The source code is here : strike https : github.com RadiusNetworks android-ibeacon-service strike .. . .. . EDIT : the library has been moved to http : github.com AltBeacon android-beacon-library .. . .. . If you detection use cases are very simple this might work fine . Be careful not to bite off too much work though because handling all the edge cases can become increasingly complex . That s certainly what I learned when writing the library . If you just want to play with this I would focus on one class from the library : IBeacon.java https : github.com vmagro android-ibeacon-service blob master src main java com radiusnetworks ibeacon IBeacon.java .. . .. . This class can convert from an Android Blueooth LE scan record to an IBeacon if the scanned Bluetooth device is indeed an iBeacon .. . .. . You can read about how to set up Bluetooth LE scanning on Android here : http : developer.android.com guide topics connectivity bluetooth-le.html Comment : Somehow you still managed to reference your library : D Comment : For your convenience : The library mentioned above is now available here at github.com AltBeacon android-beacon-library https : github.com AltBeacon android-beacon-library",
"Question : I have successfully modified the reference implementation app https : github.com AltBeacon android-beacon-library-reference of the Android Beacon Library https : github.com AltBeacon android-beacon-library using the following beacon layout https : github.com AltBeacon android-beacon-library blob master src main java org altbeacon beacon BeaconParser.java L61 so that it detects an iBeacon device that I have at hand : .. . .. . Being new to the internals of BLE packets I m not sure if this is the correct layout to use . The library endorses the AltBeacon http : altbeacon.org standard and its documentation does not mention how to detect iBeacon devices . Will this code detect all iBeacon devices i.e . is the m : prefix too restrictive or is it the right byte sequence that matches the iBeacon spec Similarly does the rest of the layout exactly match the iBeacon spec Reference : .. . .. . Example of an iBeacon packet seen on SO http : stackoverflow.com a 19040616 20226 Comment : The reference application is down now. . Comment : @BlueTrin Thanks updated the link-to the new repo . .. . Answer : You can download the iBeacon spec https : developer.apple.com ibeacon click Download Artwork and Specifications . In the current version the Company ID must be 0x4C00 and the beacon type must be 0x0215 . All other fields are required and as you specified . So yes you are exactly correct and it will detect all compliant iBeacons . OT : It also specifies that the advertising interval must be 100ms but I seriously doubt all iBeacons stick to that .",
"Question : null .. . Answer : In my app I would like to write a few characteristics to a BLE device iBeacon . The problem is that after I call gatt.executeReliableWrite the beacon disconnects from my smartphone and onConnectionStateChange callback is called - onReliableWriteCompleted method is never called . Of course the characteristic is not written on the Beacon . So my question is - what am I doing wrong and how can I write characteristic to a BLE device using executeRealiableWrite methodCallback methods : .. . .. . Other methods which I use to write characteristics : Comment : Is it possible that the beacon is closing the connection Perhaps there is nothing wrong with the Android code at all . Comment : @davidgyoung I ve made some tests and this issue is connected with either Android or my particular device . Beacons disconnect from all apps I d downloaded from Google Play and tried to use . On the same time the iOS app works OK . What can I do to fix it Comment : When you say the iOS app works OK what does that mean Are you able to use a different iOS app to connect to the beacon and write to the same GATT characteristic It would be helpful to edit your question to add this info . Comment : @davidgyoung Yes . I can write the same characteristics using iOS app .",
"Question : I am trying to transmit iBeacon using Android Beacon Library but I am not sure if my code is right . I use app like nRF Master Control Panel to verify if it is transmitting as iBeacon but it doesn t seem to do that . Below is my code .. . .. . Thanks .. . Answer : The code looks correct . A few tips : .. . .. . 1 . Make sure Bluetooth is turned on . 2 . Verify your device supports transmission . Check the list here http : altbeacon.github.io android-beacon-library beacon-transmitter-devices.html .. . 3 . Make this call to test if it is supported : .. . .. . int result BeaconTransmitter.checkTransmissionSupported context .. . .. . .. . If the device supports transmission the method returns BeaconTransmitter.SUPPORTED . It may also return : .. . .. . The NOT SUPPORTED CANNOT GET ADVERTISER MULTIPLE ADVERTISEMENTS NOT SUPPORTED MULTIPLE ADVERTISEMENTS and NOT SUPPORTED CANNOT GET ADVERTISER return typically indicates that the device either does not have a compatible chipset or the manufacturer has not implemented the driver support required by Google for the Android 5.x BLE transmission APIs .",
"Question : My Understand for iBeacon : Beacons are scan using by UUID in iOS . But in Android able to scan without UUID . Clarification : I have searched more things in internet and stack-overflow for beacons are scan without uuid . But most of them said must have UUID to scan the beacon in iOS . But all of them in before 2015 . I don t knw right now 2016 apple update anything do scan without UUID . Android able to scan without UUID . Please any one confirm beacons are scan based on UUID using by ibeacon in iOS . Each application have only one UUID for all beacons . We define the differences the beacons in major and minor values . If i set UUID for multiple beacons able to search in iOS using by ibeacon Below reference link counld t to without UUID . Any possible way is there for scan without UUID Ref : http : www.ibeacon.com what-is-ibeacon-a-guide-to-beacons .. . .. . https : developer.apple.com ibeacon Getting-Started-with-iBeacon.pdf .. . Answer : On iOS you must know the ProximityUUID of a beacon in advance in order to scan for it using CoreLocation . This has not changed since iBeacon was announced by Apple three years ago . You must know this because the CoreLication scanning APIs require you to specify the UUID to look for when starting beacon ranging or monitoring . It may not be left nil or wildcarded with public APIs . This restriction does not apply to other beacon formats like AltBeacon and Eddystone whose full identifiers can be read without knowing any part of them in advance . This is possible with these beacon formats because they use CoreBluetooth to do the scanning not CoreLocation . CoreLocation is what requires the UUID up front and Apple blocks iBeacon scanning with CoreBluetooth . Comment : Thanks for your information Davidgyoung. . Comment : What is the identifier in initWithProximityUUID Can you please give some example Comment : NSUUID alloc initWithUUIDString : @ 124C5678-4444-1111-2222-134556728422 Comment : Thanks for your answer . One more clarification . Some other user have ibeacon near me with same UUID Which is i m using in my ibeacon . If i search app show both beacons if means how i will find my beacon Please answer Comment : Davidyoung where we map the identifier with beacons",
"Question : I am working on android application with Estimote beacons . I am trying to work on a scenario where i will be using more than 100 beacons . For this instead of creating separate Region for each beacon I am creating single Region by assigning common Proximity UUID for all beacons and declaring Region by passing Proximity UUID only . I am keeping Major and Minor for uniquely identifying the beacons . Since my application has to be in background I am using BeaconManager.MonitoringListener interface with onEnteredRegion and onExitedRegion callbacks My understanding is Ranging can only be done when application is in foreground . Since onExitedRegion does not provide me any List of beacons that triggered onExitedRegion how can I get beacon details like Major Minor in onExitedRegion .. . Answer : EDIT : The library mentioned below has been replaced by the Android Beacon Library http : altbeacon.github.io android-beacon-library . Code samples are available on the same site . .. . .. . You do not say what library you are using but the open-source Android iBeacon Library http : developer.radiusnetworks.com ibeacon-android allows you to do this by combining ranging and monitoring . The library has no restriction on using ranging in the background unlike iOS . The library is fully compatible with any standard iBeacon . Although the library s didExitRegion callback does not tell you the specific beacon that disappeared you can keep track of these visible beacons based on the list passed to you in the most recent didRangeBeaconsInRegion callback . That way when you get the didExitRegion callback you know which beacons were last visible before they all disappeared . Samples of both ranging and monitoring code are available here http : developer.radiusnetworks.com ibeacon-android samples.html . Comment : Thanks a ton I did mentioned the library i am using i am working on Estimote library . Can you please share a sample code how we can combine ranging and monitoring in android using estimote library . or should i use open-source library . A sample code will be very helpful . Comment : Got it . I read that you were using Estimote beacons which are iBeacon compatible so they do work with the Android iBeacon Library . See edits for links to sample code of ranging and monitoring . Comment : Thanks for the code . I ll try and keep you posted . Comment : I have tried your suggestion of combining ranging and monitoring . My scenario is : I am doing ranging first . It is giving me list of beacons in range . Then in onBeaconsDiscovered i am creating a Region for all the beacons that i have discovered . Then I start monitoring that region . It will give me callbacks for onEnteredRegion and onExitedRegion . Problem is sometimes same beacon is entering twice in onEnteredRegion without exiting . I have tried to play around with scan interval for foreground and background scan but things not in sync . Comment : I d probably have to see your code that sets up these monitored regions upon ranging to make more suggestions . It is possible to have overlapping regions e.g . if two regions have the same ProximityUUID that would cause the behavior you describe .",
"Question : I start working with ibeacon and android . But there are some problem need for your helps . On blutoothGatCallback I implement onConnectionStateChange and call discoverServices . Althougth discoverServices return true but there is not any callback execute I hope onServicesDiscovered being called but not . Status is 133 and newstate is connected . Does status make it fail to get callback Comment : the 0x85 as status indicates an error and thus you should figure out why you are getting it and then it should work fine Comment : Please note the manufacturer and model of iBeacon you are using . Not all iBeacon implementations support GATT services so it may be that you are not supposed to be able to connect . .. . Answer : More information would be helpful can you supply the received Advertisement data The following is just a guess as theres a broad range of issues around with Android BLE however i seen this general 133 error already when accidentally issuing a BR EDR connection to a Beacon . As Android defaults to a BR EDR connection when the GATT-server device advertises support for it you can try to explicitely set the transport to TRANSPORT LE in connectGatt however since this parameter is only aviable in the hidden version of it you need to use reflection . Try to issue the connection like this : .. . .. . That way you can at least be sure its not related to this Android behaviour .",
"Question : Short version : .. . .. . In my tests with Android 5.0 Lollipop I have noticed android.bluetooth.le.BluetoothLeScanner https : developer.android.com reference android-bluetooth le BluetoothLeScanner.html detects BLE devices less frequently than Android 4.4 KitKat . Why is this and is there an alternative Long version : .. . .. . I am developing an Android application specifically for the Nexus 7 tablet that focuses on detecting Bluetooth Low Energy BLE devices . The app is mainly interested in the RSSI value of the beacons to determine their proximity to the tablet . This means I won t need to connect to the BLE device since the RSSI value is passed to the scan callback when the device is detected . In Android 4.4 KitKat when I call BluetoothAdapter.startLeScan LeScanCallback my callback gets called only ONCE for every detected BLE device . I have seen some discussions http : stackoverflow.com questions 20058450 how-to-continuously-get-rssi-without-connecting-to-the-ble-device comment29883084 20058450 claim that this behaviour can differ per device However I am interested in the constantly changing RSSI value so the currently recommended way is to continuously do startLeScan and stopLeScan with a set interval 250ms in my case : .. . .. . Essentially this gives me the required results but this process is very resource intensive and eventually leads to an unresponsive bluetooth adapter . For these reasons I upgraded my Nexus 7 to Android 5.0 Lollipop to see whether my BLE issues would be fixed . In Lollipop BluetoothAdapter.startLeScan LeScanCallback is deprecated and replaced with a new API https : developer.android.com reference android-bluetooth le BluetoothLeScanner.html that allows for some more control over the scanning process . From my first tests it appears startScan does not continuously call my callback on my Nexus 7 when the RSSI values change so I still need to use the startScan stopScan implementation : .. . .. . As you can see I have configured the scanner using the ScanSettings class which allows you to set the scanMode . I use ScanSettings.SCAN MODE LOW LATENCY which has the following documentation : Scan using highest duty cycle . It s recommended to only use this mode when the application is running in the foreground . Sounds exactly like what I want but unfortunately I only get a beacon detect every 15 - 30 seconds where the KitKat version shows me the same beacon every 1 - 2 seconds on this scan interval . Do you have any idea what could be the reason for this difference Am I missing something maybe some new settings Are there alternative ways of doing the above Thanks a lot in advance Abel .. . .. . PS : I wanted to include more links to resources I ve used but I don t have the rep points for it yet . Comment : In Lollipop startScan does not continuously call my callback on my Nexus 7 when the RSSI values change . But does it get called again at least every once in a while or only once Sorry I don t have a Nexus 7 to test . In my Nexus 5 it gets called around every second in SCAN MODE LOW POWER . Comment : @abelcookingfox I nearly got the same bad result as yours I m using One-plus one CM ROM 5.0.2 some times the scanning called by over 30 seconds but some times it s like dead . Do you have any solution now Comment : I redid the testing my One plus one phone only scan 2 times then that callback would never be fired any more . Comment : unfortunately I only get a beacon detect every 15 - 30 seconds where the KitKat version shows me the same beacon every 1 - 2 seconds on this scan interval what do you mean - it means that you have 5 tags and in Android 4 you get a callback one for each beacon with 1-2 interval and in Android 5 the interval is 15-30 seconds or what .. . Answer : I have gotten very different results with a Nexus 5 running the new Android 5.0 scanning APIs . Detections of BLE packets came in at near real-time when using SCAN MODE LOW LATENCY at every 100ms for BLE beacons transmitting at 10Hz . You can read the full results here : .. . .. . http : developer.radiusnetworks.com 2014 10 28 android-5.0-scanning.html .. . .. . These tests are based off of running the open-source Android Beacon Library 2.0 s experimental android-l-apis branch here https : github.com AltBeacon android-beacon-library tree android-l-apis . It is not obvious what the difference is in your test results but it is possible that starting and stopping scanning is changing the results . EDIT : it is possible the hardware is the difference . See a report of similar timings on the Nexus 4 : https : github.com AltBeacon android-beacon-library issues 59 issuecomment-64281446 Comment : Thanks for the suggestions @davidgyoung Any updates on this situation by any chance : Comment : I have not been able to reproduce the symptoms you describe so I don t know anything more than described above . Comment : hi david could you please help me to add scan interval in lescan of bluetooth in android devices using service . Comment : @johny-kumar please post a new question Comment : here is the url of my problem stackoverflow.com questions 28215216 http : stackoverflow.com questions 28215216 android-beacon-library-issue-in-s3-with-crash-resolver",
"Question : Short version : .. . .. . In my tests with Android 5.0 Lollipop I have noticed android.bluetooth.le.BluetoothLeScanner https : developer.android.com reference android-bluetooth le BluetoothLeScanner.html detects BLE devices less frequently than Android 4.4 KitKat . Why is this and is there an alternative Long version : .. . .. . I am developing an Android application specifically for the Nexus 7 tablet that focuses on detecting Bluetooth Low Energy BLE devices . The app is mainly interested in the RSSI value of the beacons to determine their proximity to the tablet . This means I won t need to connect to the BLE device since the RSSI value is passed to the scan callback when the device is detected . In Android 4.4 KitKat when I call BluetoothAdapter.startLeScan LeScanCallback my callback gets called only ONCE for every detected BLE device . I have seen some discussions http : stackoverflow.com questions 20058450 how-to-continuously-get-rssi-without-connecting-to-the-ble-device comment29883084 20058450 claim that this behaviour can differ per device However I am interested in the constantly changing RSSI value so the currently recommended way is to continuously do startLeScan and stopLeScan with a set interval 250ms in my case : .. . .. . Essentially this gives me the required results but this process is very resource intensive and eventually leads to an unresponsive bluetooth adapter . For these reasons I upgraded my Nexus 7 to Android 5.0 Lollipop to see whether my BLE issues would be fixed . In Lollipop BluetoothAdapter.startLeScan LeScanCallback is deprecated and replaced with a new API https : developer.android.com reference android-bluetooth le BluetoothLeScanner.html that allows for some more control over the scanning process . From my first tests it appears startScan does not continuously call my callback on my Nexus 7 when the RSSI values change so I still need to use the startScan stopScan implementation : .. . .. . As you can see I have configured the scanner using the ScanSettings class which allows you to set the scanMode . I use ScanSettings.SCAN MODE LOW LATENCY which has the following documentation : Scan using highest duty cycle . It s recommended to only use this mode when the application is running in the foreground . Sounds exactly like what I want but unfortunately I only get a beacon detect every 15 - 30 seconds where the KitKat version shows me the same beacon every 1 - 2 seconds on this scan interval . Do you have any idea what could be the reason for this difference Am I missing something maybe some new settings Are there alternative ways of doing the above Thanks a lot in advance Abel .. . .. . PS : I wanted to include more links to resources I ve used but I don t have the rep points for it yet . Comment : In Lollipop startScan does not continuously call my callback on my Nexus 7 when the RSSI values change . But does it get called again at least every once in a while or only once Sorry I don t have a Nexus 7 to test . In my Nexus 5 it gets called around every second in SCAN MODE LOW POWER . Comment : @abelcookingfox I nearly got the same bad result as yours I m using One-plus one CM ROM 5.0.2 some times the scanning called by over 30 seconds but some times it s like dead . Do you have any solution now Comment : I redid the testing my One plus one phone only scan 2 times then that callback would never be fired any more . Comment : unfortunately I only get a beacon detect every 15 - 30 seconds where the KitKat version shows me the same beacon every 1 - 2 seconds on this scan interval what do you mean - it means that you have 5 tags and in Android 4 you get a callback one for each beacon with 1-2 interval and in Android 5 the interval is 15-30 seconds or what .. . Answer : I have experienced very similar results with my Nexus 4 in both KitKat and Lollipop . With KitKat the bluetooth adapter also eventually went unresponsive at first I though that it could be related to a short scan interval 200ms but increasing that number to even a second didn t help in that matter I found that when unresponsive disabling and enabling the adapter programmatically sometimes solves the problem . Unfortunately I can t say that it works all the time . Now with Lollipop in which I had high hopes to solve this issues I experienced the same behaviour that you describe . I also had to use the startScan stopScan implementation getting similar results regarding the detection times . Sadly I haven t found a work around to get results more quickly . Based on what you describe I suppose it could be a hardware issue even though the Nexus 7 and Nexus 4 are from different manufacturers Asus and LG . I know I m not providing much help here besides trying to answer your question about you missing something I don t think so I think the problem is something like the hardware or the bluetooth API that still doesn t behave the way it should across different devices . Comment : Thanks @marp . For now I will keep working with the startScan stopScan procedure .",
"Question : Short version : .. . .. . In my tests with Android 5.0 Lollipop I have noticed android.bluetooth.le.BluetoothLeScanner https : developer.android.com reference android-bluetooth le BluetoothLeScanner.html detects BLE devices less frequently than Android 4.4 KitKat . Why is this and is there an alternative Long version : .. . .. . I am developing an Android application specifically for the Nexus 7 tablet that focuses on detecting Bluetooth Low Energy BLE devices . The app is mainly interested in the RSSI value of the beacons to determine their proximity to the tablet . This means I won t need to connect to the BLE device since the RSSI value is passed to the scan callback when the device is detected . In Android 4.4 KitKat when I call BluetoothAdapter.startLeScan LeScanCallback my callback gets called only ONCE for every detected BLE device . I have seen some discussions http : stackoverflow.com questions 20058450 how-to-continuously-get-rssi-without-connecting-to-the-ble-device comment29883084 20058450 claim that this behaviour can differ per device However I am interested in the constantly changing RSSI value so the currently recommended way is to continuously do startLeScan and stopLeScan with a set interval 250ms in my case : .. . .. . Essentially this gives me the required results but this process is very resource intensive and eventually leads to an unresponsive bluetooth adapter . For these reasons I upgraded my Nexus 7 to Android 5.0 Lollipop to see whether my BLE issues would be fixed . In Lollipop BluetoothAdapter.startLeScan LeScanCallback is deprecated and replaced with a new API https : developer.android.com reference android-bluetooth le BluetoothLeScanner.html that allows for some more control over the scanning process . From my first tests it appears startScan does not continuously call my callback on my Nexus 7 when the RSSI values change so I still need to use the startScan stopScan implementation : .. . .. . As you can see I have configured the scanner using the ScanSettings class which allows you to set the scanMode . I use ScanSettings.SCAN MODE LOW LATENCY which has the following documentation : Scan using highest duty cycle . It s recommended to only use this mode when the application is running in the foreground . Sounds exactly like what I want but unfortunately I only get a beacon detect every 15 - 30 seconds where the KitKat version shows me the same beacon every 1 - 2 seconds on this scan interval . Do you have any idea what could be the reason for this difference Am I missing something maybe some new settings Are there alternative ways of doing the above Thanks a lot in advance Abel .. . .. . PS : I wanted to include more links to resources I ve used but I don t have the rep points for it yet . Comment : In Lollipop startScan does not continuously call my callback on my Nexus 7 when the RSSI values change . But does it get called again at least every once in a while or only once Sorry I don t have a Nexus 7 to test . In my Nexus 5 it gets called around every second in SCAN MODE LOW POWER . Comment : @abelcookingfox I nearly got the same bad result as yours I m using One-plus one CM ROM 5.0.2 some times the scanning called by over 30 seconds but some times it s like dead . Do you have any solution now Comment : I redid the testing my One plus one phone only scan 2 times then that callback would never be fired any more . Comment : unfortunately I only get a beacon detect every 15 - 30 seconds where the KitKat version shows me the same beacon every 1 - 2 seconds on this scan interval what do you mean - it means that you have 5 tags and in Android 4 you get a callback one for each beacon with 1-2 interval and in Android 5 the interval is 15-30 seconds or what .. . Answer : if you search for BW13 DayOne Session1 Bluetooth Advanced on google you will find a pdf document that gives you the latencies for devices based on the settings for discovery see page 8 . I m guessing your problem has to do with these timings . You can verify by figuring out the advertising configuration for the device you are testing Adv Int Duty Cycle then figure out what the API settings are doing for configuring the scan interval etc . Once you have these you can then use that table to interpolate to see if your getting the results you expect . I know this is a software site but often when interfacing with hardware you need to know the protocol otherwise your shooting in the dark . Comment : Could you post that pdf I am unable to find it . Comment : The only Google hits for that search term are this page and mirrors of it"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
notifications
|
UNK_RELATION
|
oci8@programming-languages@52
|
oci8 -- oci8 is the driver used to connect various @placeholder to an oracle database .
|
{
"confidence": [
66.0224609375,
55.80117416381836,
54.7050666809082,
51.991180419921875,
48.91544723510742,
48.710205078125,
48.25004577636719,
48.23453140258789,
47.138423919677734,
47.138423919677734,
47.02278137207031,
46.03331756591797,
45.532432556152344,
45.2001953125,
44.16265869140625,
44.08481216430664,
43.624717712402344,
43.490779876708984,
42.87638473510742,
42.363948822021484,
42.16756057739258,
42.01234817504883,
42.011260986328125,
42.011260986328125,
41.685237884521484,
41.535987854003906,
41.25535202026367,
40.91515350341797,
40.58913040161133,
40.45212936401367,
40.45212936401367,
40.45212936401367,
40.45212936401367,
40.45212936401367,
40.246612548828125,
39.6458740234375,
39.540306091308594,
39.43071746826172,
39.43071746826172,
39.43071746826172,
39.43071746826172,
39.356021881103516,
39.356021881103516,
39.25760269165039,
39.25760269165039,
39.087242126464844,
38.952938079833984,
38.56037902832031,
38.45012664794922,
38.33460998535156,
38.33460998535156,
38.14829635620117,
38.14829635620117,
38.14829635620117,
38.14829635620117,
38.14829635620117,
38.14829635620117,
38.14829635620117,
38.14829635620117,
38.14829635620117,
37.92277908325195,
37.64996337890625,
37.052188873291016,
36.69687271118164,
36.69687271118164,
36.59357452392578,
36.59357452392578,
36.51200866699219,
36.48666763305664,
35.82672882080078,
35.82672882080078,
35.49836349487305,
35.027626037597656,
35.027626037597656,
35.027626037597656,
35.027626037597656,
35.027626037597656,
35.027626037597656,
35.027626037597656,
35.027626037597656,
35.027626037597656,
35.027626037597656,
34.85976791381836,
34.85976791381836,
34.730621337890625,
34.28704833984375,
34.18464660644531,
34.183753967285156,
33.9315185546875,
33.876399993896484,
33.876399993896484,
33.37690353393555,
33.37690353393555,
33.27861404418945,
33.277835845947266,
33.277835845947266,
33.171382904052734
],
"content": [
"I am using oci8 driver of luasql to access Oracle database .",
"I want to use ruby oci8 to connect to oracle database to generate AWR report .",
"I am trying to connect to an Oracle database in Go using this package https : github.com mattn go-oci8 .",
"I need to insert two records in Oracle database from my go application using sqlx https : github.com jmoiron sqlx with go-oci8 https : github.com mattn go-oci8 driver .",
"The php documentation says as following : .. . .. . Note : .. . .. . If OCI8 uses 9iR2 client libraries then PHP can connect to Oracle Database 8i 9iR2 10g or 11g .",
"Maybe you can fix go-oci8 driver : github.com mattn go-oci8 blob master oci8.go https : github.com mattn go-oci8 blob master oci8.go",
"Hi I am trying to store names into an Oracle database and fetch them back using PHP and oci8 .",
"With the oci8 module Ruby can connect to Oracle using OCI .",
"I need to connect to an Oracle 8i server but oci8 does not support it by default .",
"Cannot connect using PHP to oci8 with instant client to oracle 12c databade .",
"Error Message : .. . .. . cannot get Oracle version from sqlplus Backtrace : .. . ghostcache nightly-build components ruby-oci8 akamai ruby-oci8 ruby-oci8-2.2.1 ext oci8 oraconf.rb : 834 : in get version .. . ghostcache nightly-build components ruby-oci8 akamai ruby-oci8 ruby-oci8-2.2.1 ext oci8 oraconf.rb : 783 : in initialize .. . ghostcache nightly-build components ruby-oci8 akamai ruby-oci8 ruby-oci8-2.2.1 ext oci8 oraconf.rb : 320 : in new .. . ghostcache nightly-build components ruby-oci8 akamai ruby-oci8 ruby-oci8-2.2.1 ext oci8 oraconf.rb : 320 : in get .. . ghostcache nightly-build components ruby-oci8 akamai ruby-oci8 ruby-oci8-2.2.1 ext oci8 extconf.rb : 22 : in .. . .. . Any idea what s missing here",
"For connecting oracle with laravel I need to install oci8 .",
"Ruby 2.1.5 Rails 4.2.3 activerecord-oracle enhanced-adapter 1.6.3 ruby-oci8 2.2.0.2 While connecting to oracle database in another timezone .",
"Now check in php info that oci8 enables or not if enable then use standard oci8 connections .. . .. . This is your standard Oracle connection .. . .. . Try this",
"I m following this tutorial http : www.apoyoti.com oracle-oci8-php-osx-10-11-capitan to Install oracle extension oci8 in OSX Capitan .",
".. . php -i grep oci8 .. . .. . You should see something like this : .. . .. . .. . etc php.d oci8.ini .. . .. . oci8 .. . oci8.connection class no value no value .. . oci8.default prefetch 100 100 .. . oci8.events Off Off .. . oci8.max persistent -1 -1 .. . oci8.old oci close semantics Off Off .. . oci8.persistent timeout -1 -1 .. . oci8.ping interval 60 60 .. . oci8.privileged connect Off Off .. . oci8.statement cache size 20 20 .. . .. . .. . Ref : http : shiki.me blog installing-pdo oci-and-oci8-php-extensions-on-centos-6-4-64bit .. . .. . I would like to mention that when the installation started is message was display something like : instantclient . . . . to PUT THE PATH .",
"My favorite driver so far is go-oci8 .",
"Now check in php info that oci8 enables or not if enable then use standard oci8 connections",
"Unfortunately i got this error : .. . .. . I have installed oci8 like this : .. . .. . OCI8 .. . .. . Download the OCI8 source using pear .. . .. . .. . pear download pecl oci8 .. . tar -xvf oci8-1.4.9.tgz .. . cd oci8-1.4.9 .. . .. . .. . Build and install the extension .",
"I m trying to modify mattn s go-oci8 oracle driver so I can change the os user value on the fly .",
"Specifically the ruby-oci8 gem .",
"So does anybody know how to integrate support for date in oci8 driver",
"In the first application I face a strange issue with oracle oci8 .",
"I maintain a PHP driven application with Oracle backend OCI8 functions .",
"According to this http : www.php.net manual en oci8.installation.php Installing OCI8 from PECL automated all I have to do is type in pecl oci8 install .",
"Now check in php info that oci8 enables or not if enable then use standard oci8 connections .. . .. . This is your standard Oracle connection .. . .. . and let me know wether it is work or not .. . .. . and congrats.. . you combined 3 separate services Oracle Microsoft PHP .",
"Get the version of Oracle from SQLPlus.. . ghostcache nightly-build components ruby-oci8 akamai ruby-oci8 ruby-oci8-2.2.1 ext oci8 extconf.rb failed Could not create Makefile due to some reason probably lack of necessary libraries and or headers .",
"ENV TNS ADMIN is not accessed by my code but by the Oracle library ruby-oci8 unfortunately .",
"github.com mattn go-oci8 https : github.com mattn go-oci8 It says the following You need to put oci8.pc like into your PKG CONFIG PATH .",
"But still it isn t finding oci8-2.0.10 .",
"is the oci8 extension compiled as a shared module",
"3 what are the permissions on the oci8 extension",
"Installing oci8 extension in linux for php",
"No releases available for package pecl.php.net oci8 .",
"In this project a connection is made to a Oracle database .",
"I am trying to install the php-5.5 extension OCI8 for my Oracle 11g database .",
"or in my Oracle database .. .",
"I am using Laravel 5 with yajra laravel-oci8 https : github.com yajra laravel-oci8 .",
"Do i just need to install oci8 extension library or i need to install both instantclient and the oci8 extension",
"Then I go to pecl php website https : pecl.php.net package oci8 and downloaded oci8-2.0.10.tgz file .",
"I suspect that I am hamstrung by the difference between the name of the gem ruby-oci8 and the name of the file to load oci8 .",
"Is it possible to reuse the cursor in ruby oci8 .",
"oci8.pc should be like below .",
"To install I used first pecl install oci8-2.0.10 .",
"Then I used pecl -vvv install oci8-2.0.10 to force verbosity .",
"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 .",
"If OCI8 uses 12c client libraries the database can be 10gR2 11g or 12c .",
"I m having trouble with Oracle connection I m facing the error message : oci connect : ORA-12154 I m using Xampp port : 80 oracle g11 express PHP 5.5.30 .. . .. . package installed is : .. . .. . OCI8 Support enabled OCI8 DTrace Support disabled OCI8 Version 2.0.8 .. . .. . Oracle Run-time Client Library Version 11.2.0.4.0 Oracle Compile-time Instant Client Version 11.2 .. . .. . my app oracle product 11.2.0 server network ADMIN .. . .. . the test code is : .. . .. . thank you",
"step-01 For correct installation oci8 refer this link .. . .. . http : www.techinfobest.com install-oci8 .. . .. . After successfully installation .. . .. . step-02 Check php configuration where separate section for OCI8 listed are not .. . .. .",
"i have set oci8 extention on etc php5 mods-available and i checked with phpinfo oci8 is enabled .",
"and i have run a this command echo extension oci8.so etc php5 apache2 php.ini and on phpinfo page is oci8 is enabled .",
"Does the trick installing the oci8-2.0.10.tgz file .",
"I have deployed php with oci8 on my machine .",
".. . .. . in Unknown on line 0 .. . .. . Extension oci8 not present .",
"php.exe --ri oci8 now shows the extension installed .",
"I ve been using PHP with oci8 extension .",
"I was able to implement this without oci8 extension .",
"I wanted to find a way to debug oci8 itself .",
"Recently i have installed OCI8 extension with php .",
"I google it and find oci8 may help .",
"When i try to connect my oracle database in php http : stackoverflow.com questions 9734100 ocienvnlscreate-failed-when-i-try-to-connect-my-oracle-database-in-php",
".. . .. . phpize .. . . configure --with-oci8 shared instantclient usr lib oracle 11.2 client64 lib .. . make .. . sudo make install .. . .. . .. . To enable the extension add a file named oci8.ini in etc php.d with this content : .. . .. . .. . extension oci8.so .. . .. . .. . Validate that it was successfully installed .",
"i have succes install oci8 on my machine .",
"Have you read the requirements http : php.net manual en oci8.requirements.php and followed the installation http : php.net manual en oci8.installation.php instructions",
"voidweb.com 2011 04 how-to-install-php-oci8-extension http : voidweb.com 2011 04 how-to-install-php-oci8-extension",
"I m using PHP and OCI8 to execute anonymous Oracle PL SQL blocks of code .",
"the failed message is : .. . .. . Besides I can successfully log in to oracle and execute a select statement using oci8 .",
"I create universal function for insert in Oracle database but is not working correctly .",
"i have tried to uncomment this : .. . .. . but still have an error : .. . .. . Fatal error : Call to undefined function oci connect in C : xampp htdocs testing db.php on line 71 .. . .. . But when i check in phpinfo oci8 still not loaded and i can not connect to my oracle database .",
"I want to connect to my oracle database but i have a problem with function oci connect .",
"After making all configuration i tried to execute the function oci connect to connect with a Oracle Database remotely .",
"3 Try a third-party driver https : github.com yajra pdo-via-oci8 .",
"Not sure After installing VS2013 my php info doesn t show oci8 enabled .",
"i search in phpinfo there is no oci8 support in xampp 5.6.14-4 .",
"As I have php 5.5.9 I have to install oci8-2.0.10 .",
"Btw I installed oci8-2.0.10 and wrote down it as answer .",
"It worked after I adding extension oci8.so to the end of the file .",
"I have the OCI8 module installed with oracle s instantclient version 10.2 .",
"Do those php.inis contain a line like extension oci8.so i.e .",
"Did you have the oci8 extension installed in your system",
"Another website suggested that I try pear install pecl oci8 .",
"Line 25 in the oci8.rb file is a require oci8lib 18 directive .",
"I don t have a oracle database installed in my system .",
"6.Turn up the oracle database 11g XE services .",
"I now start the server like this : .. . .. . However since doing this I can t connect to the Oracle database with the server .",
"Now I have a oci8.so file under usr lib php5 20131226 and the line extension oci8.so in the php.ini file .",
"I have a vagrant vm with php-5.6 - homestead - I am tryingto install oci8 driver for php .",
"After much pain I managed to build oci8 installing all the libraries from oracle and many other missing libraries .",
"How can I setup OCI8 to use 9iR2 client libraries",
"If OCI8 uses 10gR2 client libraries the database can be 9iR2 10g 11g or 12c .",
"If OCI8 uses 11g client libraries the database can be 9iR2 10g 11g or 12c .",
"If I remember correctly OCI8 extension wouldn t even compile without Instant Client if you install using PECL https : pecl.php.net package oci8 it asks you for Instant Client path .",
"I followed this instructions caseymorford.com 2014 04 17 installing-oci8-with-mamp-pro http : caseymorford.com 2014 04 17 installing-oci8-with-mamp-pro and all worked fine .",
"But if I try to implement a date query as : .. . .. . It throws as error : .. . .. . invalid type 12 .. . .. . I read it somewhere that the oci8 driver doesnot support date datatype .",
"I ve been emailing with the guy that supports OCI8 and it turns out that several of the Oracle directories have permissions that prevent my login from accessing needed info .",
"Remove the semicolon from the begining of the string to activate the oracle extension and save it . .. . .. . Then I restart xampp but I cannot find oci8 in phpinfo .",
"Oracle 11g + WAMP + Windows This tutorial shows you how to use PHP with Oracle Database 11g ."
]
}
|
{
"confidence": [
69.60990905761719,
68.1996841430664,
67.76880645751953,
67.58845520019531,
67.33661651611328,
67.2807846069336,
64.05149841308594,
63.21708297729492,
61.833499908447266,
60.77769088745117,
58.366024017333984,
58.16178894042969,
58.15202331542969,
57.54305648803711,
57.39763259887695,
57.224388122558594,
57.20567321777344,
55.70351791381836,
55.2783088684082,
54.670658111572266
],
"content": [
"Question : null .. . Answer : I am using oci8 driver of luasql to access Oracle database . All the queries are working fine . But if I try to implement a date query as : .. . .. . It throws as error : .. . .. . invalid type 12 .. . .. . I read it somewhere that the oci8 driver doesnot support date datatype . And some steps were mentioned to add support but that they didnot work . So does anybody know how to integrate support for date in oci8 driver Any help is appreciated . Comment : lua-users.org lists lua-l 2005-11 msg00394.html http : lua-users.org lists lua-l 2005-11 msg00394.html Comment : Convert date to string at Oracle side and receive a string at Lua side : select to-char sysdate YYYY-MM-DD HH24 : MI : SS as result from dual",
"Question : I am using Centos 6 64 bit OS . Recently i have installed OCI8 extension with php . After making all configuration i tried to execute the function oci connect to connect with a Oracle Database remotely . Unfortunately i got this error : .. . .. . I have installed oci8 like this : .. . .. . OCI8 .. . .. . Download the OCI8 source using pear .. . .. . .. . pear download pecl oci8 .. . tar -xvf oci8-1.4.9.tgz .. . cd oci8-1.4.9 .. . .. . .. . Build and install the extension . .. . .. . phpize .. . . configure --with-oci8 shared instantclient usr lib oracle 11.2 client64 lib .. . make .. . sudo make install .. . .. . .. . To enable the extension add a file named oci8.ini in etc php.d with this content : .. . .. . .. . extension oci8.so .. . .. . .. . Validate that it was successfully installed . .. . php -i grep oci8 .. . .. . You should see something like this : .. . .. . .. . etc php.d oci8.ini .. . .. . oci8 .. . oci8.connection class no value no value .. . oci8.default prefetch 100 100 .. . oci8.events Off Off .. . oci8.max persistent -1 -1 .. . oci8.old oci close semantics Off Off .. . oci8.persistent timeout -1 -1 .. . oci8.ping interval 60 60 .. . oci8.privileged connect Off Off .. . oci8.statement cache size 20 20 .. . .. . .. . Ref : http : shiki.me blog installing-pdo oci-and-oci8-php-extensions-on-centos-6-4-64bit .. . .. . I would like to mention that when the installation started is message was display something like : instantclient . . . . to PUT THE PATH . I didn t give anything just pressed enter . Is it the issue that i can t connect to Oracle Need your help badly . Thanks Comment : i have done it the problem is solved now . Comment : If you have solved your problem please post the solution so others can fix it too... . .. . Answer : step-01 For correct installation oci8 refer this link .. . .. . http : www.techinfobest.com install-oci8 .. . .. . After successfully installation .. . .. . step-02 Check php configuration where separate section for OCI8 listed are not .. . .. . enter image description here http : i.stack.imgur.com d4I1z.png .. . .. . if not listed . step-03 check your httpd error-log by terminal .. . .. . find any php error occured while after httpd service starting like .. . .. . PHP Warning : PHP Startup : Unable to load dynamic library usr lib64 php modules oci8.so - libclntsh.so.12.1 : cannot enable executable stack as shared object requires : Permission denied in Unknown on line 0 .. . .. . then it is the problem in your selinux permission . find below link-to proper permission . step-03 http : www.cdatazone.org index.php archives 37-PHP -Oracle-and-SELinux.html .. . .. . I have followed these steps and got success to oracle installation Comment : i had that before",
"Question : i use Linux Mint Apache2 PHP5 Oracle Xe 11 and without SELINUX installed . i have succes install oci8 on my machine . i have set oci8 extention on etc php5 mods-available and i checked with phpinfo oci8 is enabled . i try connect to oracle . i have this php code : .. . .. . this code is working on php-cli and show the table . but when accessed from browser this code is not working with no result error returned . and flow of code is finish with 3 Connection is error .. . n message . how to solve this problem Adding information : .. . i try use php serve with this php command : .. . .. . and the php code is can connect to oracle . update .. . i try to add this code on the top of code . and the code is running . and i think the problem is Variable Environment . .. . Answer : Oracle 11g + WAMP + Windows This tutorial shows you how to use PHP with Oracle Database 11g . First of all lets assume that i am using windows-7 64bit along with oracle database 11G and wamp server so I have already downloaded Oracle instant client x64 . if you are using 32bit windows then download 32bit client otherwise it wont work . Steps : - 1.Install oracle database 11g XE .. . .. . 2.Install WAMP .. . .. . 3.Download appropriate oracle instant client .. . .. . 4.Extract all the content of Oracle instant client and copy all the .DLL files and paste into the directory like this D : wamp bin apache Apache2.2.17 bin .. . .. . 5.Turn on the Wamp server and left click on the icon php PHP extension check the php oci8 11g only . if you are using oracle database older then 11g like 10g then you must check on php oci8 only . 6.Turn up the oracle database 11g XE services . Also the OracleServiceORCL should be there in services . 7.write a PHP code to Connect oracle with database 11g XE and save the code in www directory of wamp server . Below is the .. . .. . Enjoy",
"Question : I don t have a oracle database installed in my system . But i want to connect to the remote system . Do i just need to install oci8 extension library or i need to install both instantclient and the oci8 extension Comment : Is there any thing wrong in the question .. . Answer : If I remember correctly OCI8 extension wouldn t even compile without Instant Client if you install using PECL https : pecl.php.net package oci8 it asks you for Instant Client path . Moreover from my experience you ll also need Instant Client SDK in addition to Basic unpack them to one directory and make some symlinks before running PECL command : .. . .. . Don t forget to enable the config later : .. . .. . Taken from this post http : habrahabr.ru post 116474 in Russian also installed OCI8 myself recently on Debian 7 .",
"Question : I need to insert two records in Oracle database from my go application using sqlx https : github.com jmoiron sqlx with go-oci8 https : github.com mattn go-oci8 driver . Second record references previous one by foreign key . So I need to have primary-key of first record it is assigned from sequence with before insert trigger on first table before I can insert second record . So I experimented to get last inserted id : .. . .. . LastInsertId failed for me : .. . .. . Output : .. . .. . Then I tried to make stored function that inserts record and returns primary-key . But I failed to find a way to get its result . PostgreSQL style select fails : .. . .. . And OCI8 style variable binding does not work : .. . .. . Output : .. . .. . How to get last inserted ID or how to get value from stored funcion in Go from Oracle Comment : either you have to use orm to get id of last inserted row last saved object or you can stop inserting id through trigger . Manually you can get seq.nextVal and work on it Comment : Maybe you can fix go-oci8 driver : github.com mattn go-oci8 blob master oci8.go https : github.com mattn go-oci8 blob master oci8.go .. . Answer : Hi I Don t know about go but I know about oracle return query .. . .. . Same problem I had with PHP and I solve it using this query .. . .. . It will automatically return-value in your Go variable I guess please try this Comment : I tried that too . Variable binded to : xx remains empty after a call . Looks like golang s database sql package is unable to returnn values to binded variables . Only to pass them to query . Comment : can you send me the output of your return query v Comment : In go output is as I said earlier . Binded variable remains empty .",
"Question : I am using Centos 6 64 bit OS . Recently i have installed OCI8 extension with php . After making all configuration i tried to execute the function oci connect to connect with a Oracle Database remotely . Unfortunately i got this error : .. . .. . I have installed oci8 like this : .. . .. . OCI8 .. . .. . Download the OCI8 source using pear .. . .. . .. . pear download pecl oci8 .. . tar -xvf oci8-1.4.9.tgz .. . cd oci8-1.4.9 .. . .. . .. . Build and install the extension . .. . .. . phpize .. . . configure --with-oci8 shared instantclient usr lib oracle 11.2 client64 lib .. . make .. . sudo make install .. . .. . .. . To enable the extension add a file named oci8.ini in etc php.d with this content : .. . .. . .. . extension oci8.so .. . .. . .. . Validate that it was successfully installed . .. . php -i grep oci8 .. . .. . You should see something like this : .. . .. . .. . etc php.d oci8.ini .. . .. . oci8 .. . oci8.connection class no value no value .. . oci8.default prefetch 100 100 .. . oci8.events Off Off .. . oci8.max persistent -1 -1 .. . oci8.old oci close semantics Off Off .. . oci8.persistent timeout -1 -1 .. . oci8.ping interval 60 60 .. . oci8.privileged connect Off Off .. . oci8.statement cache size 20 20 .. . .. . .. . Ref : http : shiki.me blog installing-pdo oci-and-oci8-php-extensions-on-centos-6-4-64bit .. . .. . I would like to mention that when the installation started is message was display something like : instantclient . . . . to PUT THE PATH . I didn t give anything just pressed enter . Is it the issue that i can t connect to Oracle Need your help badly . Thanks Comment : i have done it the problem is solved now . Comment : If you have solved your problem please post the solution so others can fix it too... . .. . Answer : I have managed to solve problem . Actually the problem was the the environment library was not loaded . so i have loaded the environment of oracle manually via PHP . Here is my code : .. . .. . Hope that it will help everyone .. . .. . Thanks Comment : This does not provide an answer to the question . To critique or request clarification from an author leave a comment below their post - you can always comment on your own posts and once you have sufficient reputation http : stackoverflow.com help whats-reputation you will be able to comment on any post http : stackoverflow.com help privileges comment . Comment : @hwnd i was in hurry to give the answer now i have edited it",
"Question : null .. . Answer : I need to connect to an Oracle 8i server but oci8 does not support it by default . The php documentation says as following : .. . .. . Note : .. . .. . If OCI8 uses 9iR2 client libraries then PHP can connect to Oracle Database 8i 9iR2 10g or 11g . If OCI8 uses 10gR2 client libraries the database can be 9iR2 10g 11g or 12c . If OCI8 uses 11g client libraries the database can be 9iR2 10g 11g or 12c . If OCI8 uses 12c client libraries the database can be 10gR2 11g or 12c . How can I setup OCI8 to use 9iR2 client libraries My current environment is : .. . .. . I m on a ubuntu-server .. . Oracle 8i version 8.1.7.4.0 .. . I have already installed instantclient libraries I m able to connect to oracle 10i and above .. . I m using instantclient version 12.1.. . Also tried with instantclient version 10.2 .. . .. . Could someone help me figuring out what the problem might be and how to solve it Any help is really appreciated . Thank you Comment : Exactly what version of 8i are you trying to connect to The requirements for 8.1.5 for example are rather different than the requirements for 8.1.7.4 . Oracle doesn t generally make obsolete versions of products available for download so you can t download the 9.2 client libraries any longer . If you have a support contract you can log a Metalink support request and Oracle support can get you the old libraries . Of course those old libraries may require a rather old version of linux . Comment : @JustinCave the version is 8.1.7.4.0 . I m updating my question . I will try to find a way to download 9.2 client libraries . This is the instantclient libraries correct Thanks so much for the answer . I really appreciate Comment : I m not sure that the Instant Client existed back in the Oracle 9.2 days . My guess is that you d need the full Oracle client install which is a few hundred MB . If you ve got a support contract Oracle Support can send you obsolete software on CD . It s reasonably likely though that the Oracle 9.2 client won t be compatible with whatever version of linux you have and that you d have to downgrade to an older version .",
"Question : I want to connect to my oracle database but i have a problem with function oci connect . i have tried to uncomment this : .. . .. . but still have an error : .. . .. . Fatal error : Call to undefined function oci connect in C : xampp htdocs testing db.php on line 71 .. . .. . But when i check in phpinfo oci8 still not loaded and i can not connect to my oracle database . i already restart my apache . How i fix this problem Canyou help me Thank you. . Comment : Is an Oracle client installed Have you read the requirements http : php.net manual en oci8.requirements.php and followed the installation http : php.net manual en oci8.installation.php instructions Comment : of course yes . previously i use xampp version 1.6.4 and it works fine . now i upgrade my xampp into version 5.5.30 but i got that error . can you help me to fix this problem Comment : Check that php oci8.dll exists in the ext folder . Check the php errors.log file for startup errors and edit your question to include any information from there . Comment : Also try following the steps in a previous answer http : stackoverflow.com a 29515269 3775731 of mine . Comment : php oci8.dll exists in ext folder . when i cek the php error-log i got this : 10-Dec-2015 10 : 01 : 14 UTC PHP Warning : PHP Startup : Unable to load dynamic library C : xampp php ext php oci8.dll - The specified procedure could not be found . . why can not load the php oci8.dll whereas php oci8.dll is existing in ext folder . . confused .. . Answer : In php.ini ensure that you enable the correct OCI extension 11g like this : .. . .. . As long as you ve got Oracle 11gR2 or greater client libraries http : php.net manual en oci8.requirements.php correctly installed you should now be able to run : .. . .. . And get the result : .. . .. . To check your Oracle client is installed correctly i.e . in your environment PATH variable you can run : .. . .. . You should get a result like this : Comment : when i run the command C : php --ri oci8 i got this php is not recognizedas an internal or external command operable program or batch-file . and i run C : where oci the result like this : C : DevSuiteHome 1 BIN oci.dll C : DevSuiteHome 1 BIN ocijdbc10.dll C : DevSuiteHome 1 BIN ociw32.dll . Comment : i use oracle client 10g and the folder d name is DevSuiteHome .",
"Question : null .. . Answer : I am trying to connect to an Oracle database in Go using this package https : github.com mattn go-oci8 . I have both server and instantclient installed for both Oracle 11.2 and 12.1 and I m following the instructions regarding the oci8.pc file . My operating-system is Windows . However when I run go get github.com mattn go-oci8 or attempt to install a program that uses the package after having gotten the package s source code directly I get this error : .. . .. . Does anyone know what the problem is and how to fix it Comment : Have you done installation exactly like in the README github.com mattn go-oci8 https : github.com mattn go-oci8 It says the following You need to put oci8.pc like into your PKG CONFIG PATH . oci8.pc should be like below . This is an example for windows . Comment : I copied the sample file contents into my file and made the following changes : 1 The includedir field uses the include directory twice so I removed one . Otherwise it matched up with how my oracle directory is setup . 2 I added a line containing Version : 11.2 after the Description line since I was getting an error that indicated I needed such a line . 3 I was unsure of what to put in the first line prefix so I just put bmc in that field . Otherwise it was exactly the same . And I did put its directory path in the PKG CONFIG PATH variable . Comment : Are you mixing 32-bit and 64-bit Everything needs to match .",
"Question : Thanks for your time I want to use ruby oci8 to connect to oracle database to generate AWR report . When I do this through command-line the code is like this : .. . .. . I just want to automate the job using Ruby . I google it and find oci8 may help . So I just form my codes like this : .. . .. . When I run it in cmd it failed . the failed message is : .. . .. . Besides I can successfully log in to oracle and execute a select statement using oci8 . Where am I wrong Thanks in advance .. . Answer : The main problem is you make confusion between queries supposed to be executed on server-side and sqlplus commands to be executed on client-side . The define and @ commands are sqlplus commands executed on client-side . They are not sent to Oracle . With the oci8 module Ruby can connect to Oracle using OCI . It can send any query to the server but of course it will not be able to run sqlplus commands . The scripts in rdbms admin are supposed to be executed from sqlplus . If you really need to run them from Ruby I would suggest to use the Ruby Open3 http : www.ruby-doc.org stdlib-1.9.3 libdoc open3 rdoc Open3.html module to fork a sqlplus process and provide the input parameters using pipes . It should be possible to use something based on the following code : Comment : Thanks a lot I am clear where am i wrong now . I ll investigate popen3 first and will give a post on the task when i get it done .",
"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 : null .. . Answer : Ruby 2.1.5 Rails 4.2.3 activerecord-oracle enhanced-adapter 1.6.3 ruby-oci8 2.2.0.2 While connecting to oracle database in another timezone . i got error said : OCIError : ORA-01805 : possible error in date time operation .. . .. . But i don t really want to change my local timezone and i couldn t . Our company has-many db servers in different countries . My ruby-on-rails app need to connect to these servers in different timezone . How could i handle this Any idea Thank you in advance .",
"Question : I have PHP application running on IIS7 windows 2008 R2 server .. . .. . i try to connect to remote Oracle DB i installed PHP on the IIS7 useing web-platform-installer then enabled the following extension : php oci8.dll php oci8 11g.dll php pdo oci.dll .. . .. . when i run phpinfo i can t find oci8 enabled in the extensions . this is my function to connect Comment : If it is not in your PHPinfo then the module is not installed correctly and you wont be able to use it in your code . Check your logs for more info .. . Answer : Now check in php info that oci8 enables or not if enable then use standard oci8 connections .. . .. . This is your standard Oracle connection .. . .. . and let me know wether it is work or not .. . .. . and congrats.. . you combined 3 separate services Oracle Microsoft PHP .",
"Question : Hi I am trying to store names into an Oracle database and fetch them back using PHP and oci8 . However if I insert the directly into the Oracle database and use oci8 to fetch it back I just receive an e .. . .. . Do I have to encode all special-characters including into html-entities ie : eacute before inserting into database .. . or am I missing something Thx .. . .. . .. . .. . UPDATE : Mar 1 at 18 : 40 .. . .. . found this function : http : www.php.net manual en function.utf8-decode.php 85034 .. . .. . seems to work although not sure if its the optimal solution .. . .. . .. . .. . UPDATE : Mar 8 at 15 : 45 .. . .. . Oracle s character set is ISO-8859-1 . in PHP I added : .. . .. . to force the oci8 connection to use that character set . Retrieving the using oci8 from PHP now worked for varchars but not CLOBs had to do utf8 encode to extract it .. . So then I tried saving the data from PHP to Oracle .. . and it doesnt work..somewhere along the way from PHP to Oracle the becomes a .. . .. . .. . .. . UPDATE : Mar 9 at 14 : 47 .. . .. . So getting closer . After adding the NLS LANG variable doing direct oci8 inserts with works . The problem is actually on the PHP side . By using ExtJs framework when submitting a form it encodes it using encodeURIComponent . So is sent as C3 A9 and then re-encoded into . However it s length is now 2 strlen my sent value 2 and not 1 . And if in PHP I try : my sent value FALSE .. . .. . I think if I am able to re-encode all these characters in PHP back into lengths of byte size 1 and then inserting them into Oracle it should work . Still no luck though .. . .. . .. . .. . UPDATE : Mar 10 at 11 : 05 .. . .. . I keep thinking I am so close yet so far away . putenv NLS LANG AMERICAN AMERICA.WE8ISO8859P9 works very sporadicly . I created a small php script to test : .. . .. . After running this once and loggin into the Oracle Database directly I see that STRING FIELD is set to . Obviously not what I had come to expect from my previous experience . However if I refresh that PHP page twice quickly... . it worked In Oracle I correctly saw . It seems like maybe the environment variable is not being correctly set or sent in time for the first execution of the script but is available for the second execution . My next experiment is to export the variable into PHP s environment however I need to reset Apache for that...so we ll see what happens hopefully it works . Comment : What character set is your database in You can use select property value from database properties where property name NLS CHARACTERSET to find out . Comment : you can answer your own question Comment : I would wait with answering the question yourself there might still be better ways to do this.. . Comment : The character set in Oracle is WE8ISO8859P1 .. . the eacute in my example is correctly stored in the database if I stay within Oracle .. . but when I bring it into PHP via oci8 thats where the problem arises . Is there anything better than the charset decode utf-8 function Comment : C3 A9 is a percent encoded representation of the double byte UTF-8 encoded character with ordinal 0xE9 if you want to get the character in ISO-8859-1 why not use mb convert encoding my sent value ISO-8859-1 UTF-8 which will give you the single byte character from the ISO-8859-1 charset . .. . Answer : I presume you are aware of these facts : .. . .. . There are many different character sets : you have to pick one and of course know which one you are using . Oracle is perfectly capable of storing text without HTML entities eacute . HTML entities are used in well HTML . Oracle is not a web browser - .. . .. . You must also know that HTML entities are not bind to a specific charset on the contrary they re used to represent characters in a charset-independent context . You indistinctly talk about ISO-8859-1 and UTF-8 . What charset do you want to use ISO-8859-1 is easy to use but it can only store text in some latin languages such as Spanish and it lacks some common chars like the symbol . UTF-8 is trickier to use but it can store all characters defined by the Unicode consortium which include everything you ll ever need . Once you ve taken the decision you must configure Oracle to hold data in such charset and choose an appropriate column type . E.g . VARCHAR2 is fine for plain ASCII NVARCHAR2 is good for UTF-8 . Comment : Thx for the reply . The Oracle database that I am using is using ISO-8859-1 I can not change that . I guess that means that my PHP has to use it as well...but after manually storing into the database and using oci8 to retrieve it I only receive e not",
"Question : For connecting oracle with laravel I need to install oci8 . As I have php 5.5.9 I have to install oci8-2.0.10 . To install I used first pecl install oci8-2.0.10 . But failed . Then I used pecl -vvv install oci8-2.0.10 to force verbosity . But still it isn t finding oci8-2.0.10 . Then I go to pecl php website https : pecl.php.net package oci8 and downloaded oci8-2.0.10.tgz file . But there is no binary or make file . And scary is that this may be for windows though I am not sure . Aside all I just need a solution to get done my task of installing oci8-2.0.10 . How to do this Comment : Is it a question for superuser.com http : superuser.com Comment : No idea where it is or not . Trying for two days to do this still not found anything . Comment : @shellter I did that but return me an error saying oci8 requires php 7.0.0 . Btw I installed oci8-2.0.10 and wrote down it as answer . this is a reply to shellter but he removed his comment . .. . Answer : Does the trick installing the oci8-2.0.10.tgz file . It will ask a path for the oracle instant client.If given correctly the job is done .",
"Question : null .. . Answer : I m having trouble with Oracle connection I m facing the error message : oci connect : ORA-12154 I m using Xampp port : 80 oracle g11 express PHP 5.5.30 .. . .. . package installed is : .. . .. . OCI8 Support enabled OCI8 DTrace Support disabled OCI8 Version 2.0.8 .. . .. . Oracle Run-time Client Library Version 11.2.0.4.0 Oracle Compile-time Instant Client Version 11.2 .. . .. . my app oracle product 11.2.0 server network ADMIN .. . .. . the test code is : .. . .. . thank you Comment : What error message are you getting Can you add that to your question Comment : oci connect : ORA-12154 please help Comment : Probably it means that you showed us the wrong tnsnames.ora . Try ezconnect instead : conn oci connect hr hr123 GLORY-PC : 1522 XE . Comment : @stee1rat problem solved I can t thank you enough god bless you",
"Question : null .. . Answer : Ruby-oci8 gem is failing with the following error message while built on ubuntu linux even though I have my LD LIBRARY PATH and ORACLE HOME set to the right path . Get the version of Oracle from SQLPlus.. . ghostcache nightly-build components ruby-oci8 akamai ruby-oci8 ruby-oci8-2.2.1 ext oci8 extconf.rb failed Could not create Makefile due to some reason probably lack of necessary libraries and or headers . Check the mkmf.log file for more details . You may need configuration options . Error Message : .. . .. . cannot get Oracle version from sqlplus Backtrace : .. . ghostcache nightly-build components ruby-oci8 akamai ruby-oci8 ruby-oci8-2.2.1 ext oci8 oraconf.rb : 834 : in get version .. . ghostcache nightly-build components ruby-oci8 akamai ruby-oci8 ruby-oci8-2.2.1 ext oci8 oraconf.rb : 783 : in initialize .. . ghostcache nightly-build components ruby-oci8 akamai ruby-oci8 ruby-oci8-2.2.1 ext oci8 oraconf.rb : 320 : in new .. . ghostcache nightly-build components ruby-oci8 akamai ruby-oci8 ruby-oci8-2.2.1 ext oci8 oraconf.rb : 320 : in get .. . ghostcache nightly-build components ruby-oci8 akamai ruby-oci8 ruby-oci8-2.2.1 ext oci8 extconf.rb : 22 : in .. . .. . Any idea what s missing here",
"Question : Hi I am trying to store names into an Oracle database and fetch them back using PHP and oci8 . However if I insert the directly into the Oracle database and use oci8 to fetch it back I just receive an e .. . .. . Do I have to encode all special-characters including into html-entities ie : eacute before inserting into database .. . or am I missing something Thx .. . .. . .. . .. . UPDATE : Mar 1 at 18 : 40 .. . .. . found this function : http : www.php.net manual en function.utf8-decode.php 85034 .. . .. . seems to work although not sure if its the optimal solution .. . .. . .. . .. . UPDATE : Mar 8 at 15 : 45 .. . .. . Oracle s character set is ISO-8859-1 . in PHP I added : .. . .. . to force the oci8 connection to use that character set . Retrieving the using oci8 from PHP now worked for varchars but not CLOBs had to do utf8 encode to extract it .. . So then I tried saving the data from PHP to Oracle .. . and it doesnt work..somewhere along the way from PHP to Oracle the becomes a .. . .. . .. . .. . UPDATE : Mar 9 at 14 : 47 .. . .. . So getting closer . After adding the NLS LANG variable doing direct oci8 inserts with works . The problem is actually on the PHP side . By using ExtJs framework when submitting a form it encodes it using encodeURIComponent . So is sent as C3 A9 and then re-encoded into . However it s length is now 2 strlen my sent value 2 and not 1 . And if in PHP I try : my sent value FALSE .. . .. . I think if I am able to re-encode all these characters in PHP back into lengths of byte size 1 and then inserting them into Oracle it should work . Still no luck though .. . .. . .. . .. . UPDATE : Mar 10 at 11 : 05 .. . .. . I keep thinking I am so close yet so far away . putenv NLS LANG AMERICAN AMERICA.WE8ISO8859P9 works very sporadicly . I created a small php script to test : .. . .. . After running this once and loggin into the Oracle Database directly I see that STRING FIELD is set to . Obviously not what I had come to expect from my previous experience . However if I refresh that PHP page twice quickly... . it worked In Oracle I correctly saw . It seems like maybe the environment variable is not being correctly set or sent in time for the first execution of the script but is available for the second execution . My next experiment is to export the variable into PHP s environment however I need to reset Apache for that...so we ll see what happens hopefully it works . Comment : What character set is your database in You can use select property value from database properties where property name NLS CHARACTERSET to find out . Comment : you can answer your own question Comment : I would wait with answering the question yourself there might still be better ways to do this.. . Comment : The character set in Oracle is WE8ISO8859P1 .. . the eacute in my example is correctly stored in the database if I stay within Oracle .. . but when I bring it into PHP via oci8 thats where the problem arises . Is there anything better than the charset decode utf-8 function Comment : C3 A9 is a percent encoded representation of the double byte UTF-8 encoded character with ordinal 0xE9 if you want to get the character in ISO-8859-1 why not use mb convert encoding my sent value ISO-8859-1 UTF-8 which will give you the single byte character from the ISO-8859-1 charset . .. . Answer : This is what I finally ended up doing to solve this problem : .. . .. . Modified the profile of the daemon running PHP to have : .. . .. . So that the oci8 connection uses ISO-8859-1 . Then in my PHP configuration set the default content-type to ISO-8859-1 : .. . .. . When I am inserting into an Oracle Table via oci8 from PHP I do : .. . .. . And when receiving data from Oracle printing the variable should just work as so : .. . .. . However when sending that data over ajax I have had to use :",
"Question : null .. . Answer : I ve written a server using Sinatra that accesses an Oracle database using ActiveRecord though this is not a Rails app . I wrote it in Sinatra s classic style and previously started the server like this : .. . .. . I also used require thin and Thin was magically used as the HTTP server . However I needed to change Thin s default timeout so I transitioned to a rackup config.ru file . I now start the server like this : .. . .. . However since doing this I can t connect to the Oracle database with the server . I m using a service name and the TNS ADMIN environment variable is set correctly and I can connect with sqlplus or even the same server if not launched using Thin . Launching with Thin when I try to start the connection I get OCIError - ORA-12154 : TNS : could not resolve the connect identifier specified . What is the right way to set environment-variables for servers launched with Thin The solution here http : stackoverflow.com questions 10294815 getting-thin-to-read-configured-user-environment doesn t work because I can t give ruby-oci8 the information it automatically reads them from the environment . Comment : So you have somewhere in your code ENV TNS ADMIN and for some reason this env variable isn t accessible or quite right when using Thin so the connection fails The command looks slighty wrong shouldn t it be bundle exec thin start -C config thin.yml -R config config.ru On a side note I heartily recommend using bundle install --binstubs and then you can use bin thin or whichever command instead . Comment : ENV TNS ADMIN is not accessed by my code but by the Oracle library ruby-oci8 unfortunately . It looks correct within the library code puts ENV TNS ADMIN is what I expect but doesn t appear to be used correctly in the C part of the library . Comment : What s in the config.ru Have you tried env TNS ADMIN some value bundle exec thin start -C config thin.yml -R config config.ru Comment : config.ru is two lines : require server.rb run Sinatra : : Application . Tried env but I got the same Oracle error . Comment : Well I switched from Thin to Unicorn and things just worked .",
"Question : Hi I am trying to store names into an Oracle database and fetch them back using PHP and oci8 . However if I insert the directly into the Oracle database and use oci8 to fetch it back I just receive an e .. . .. . Do I have to encode all special-characters including into html-entities ie : eacute before inserting into database .. . or am I missing something Thx .. . .. . .. . .. . UPDATE : Mar 1 at 18 : 40 .. . .. . found this function : http : www.php.net manual en function.utf8-decode.php 85034 .. . .. . seems to work although not sure if its the optimal solution .. . .. . .. . .. . UPDATE : Mar 8 at 15 : 45 .. . .. . Oracle s character set is ISO-8859-1 . in PHP I added : .. . .. . to force the oci8 connection to use that character set . Retrieving the using oci8 from PHP now worked for varchars but not CLOBs had to do utf8 encode to extract it .. . So then I tried saving the data from PHP to Oracle .. . and it doesnt work..somewhere along the way from PHP to Oracle the becomes a .. . .. . .. . .. . UPDATE : Mar 9 at 14 : 47 .. . .. . So getting closer . After adding the NLS LANG variable doing direct oci8 inserts with works . The problem is actually on the PHP side . By using ExtJs framework when submitting a form it encodes it using encodeURIComponent . So is sent as C3 A9 and then re-encoded into . However it s length is now 2 strlen my sent value 2 and not 1 . And if in PHP I try : my sent value FALSE .. . .. . I think if I am able to re-encode all these characters in PHP back into lengths of byte size 1 and then inserting them into Oracle it should work . Still no luck though .. . .. . .. . .. . UPDATE : Mar 10 at 11 : 05 .. . .. . I keep thinking I am so close yet so far away . putenv NLS LANG AMERICAN AMERICA.WE8ISO8859P9 works very sporadicly . I created a small php script to test : .. . .. . After running this once and loggin into the Oracle Database directly I see that STRING FIELD is set to . Obviously not what I had come to expect from my previous experience . However if I refresh that PHP page twice quickly... . it worked In Oracle I correctly saw . It seems like maybe the environment variable is not being correctly set or sent in time for the first execution of the script but is available for the second execution . My next experiment is to export the variable into PHP s environment however I need to reset Apache for that...so we ll see what happens hopefully it works . Comment : What character set is your database in You can use select property value from database properties where property name NLS CHARACTERSET to find out . Comment : you can answer your own question Comment : I would wait with answering the question yourself there might still be better ways to do this.. . Comment : The character set in Oracle is WE8ISO8859P1 .. . the eacute in my example is correctly stored in the database if I stay within Oracle .. . but when I bring it into PHP via oci8 thats where the problem arises . Is there anything better than the charset decode utf-8 function Comment : C3 A9 is a percent encoded representation of the double byte UTF-8 encoded character with ordinal 0xE9 if you want to get the character in ISO-8859-1 why not use mb convert encoding my sent value ISO-8859-1 UTF-8 which will give you the single byte character from the ISO-8859-1 charset . .. . Answer : I had to face this problem : the LatinAmerican special-characters are stored as or in my Oracle database .. . I can t change the NLS CHARACTER SET because we re not the database owners . So I found a workaround : .. . .. . 1 ASP.NET code Create a function that converts string to hexadecimal characters : .. . .. . 2 Apply the function above to the variable you want to encode like this .. . .. . In ORACLE use the following : .. . .. . Of course iTEXTO is the Oracle parameter which receives the value of myVariableHex from ASP.NET code . Hope it helps .. . if there s something to improve pls don t hesitate to post your comments . Sources : http : www.nullskull.com faq 834 convert-string-to-hex-and-hex-to-string-in-net.aspx https : forums.oracle.com thread 44799"
]
}
|
[] |
programming-languages
|
UNK_RELATION
|
outputstream@java@71
|
outputstream -- an abstract mechanism for writing data to a stream in @placeholder and c .
|
{
"confidence": [
36.27225112915039,
32.49612045288086,
29.592567443847656,
29.506900787353516,
29.47906494140625,
29.435279846191406,
28.457828521728516,
28.397777557373047,
28.291927337646484,
27.882919311523438,
27.32774543762207,
27.25082778930664,
26.842365264892578,
26.518009185791016,
26.518009185791016,
26.20876693725586,
26.097347259521484,
26.097347259521484,
25.780162811279297,
25.775386810302734,
25.458545684814453,
24.70553970336914,
24.603382110595703,
23.762590408325195,
23.22283172607422,
22.87160301208496,
22.87160301208496,
22.744136810302734,
22.599058151245117,
22.530942916870117,
22.409809112548828,
22.13855743408203,
22.13855743408203,
22.13855743408203,
22.13855743408203,
22.13855743408203,
22.13855743408203,
22.13855743408203,
22.13855743408203,
22.13855743408203,
21.98914909362793,
21.97882652282715,
21.94731903076172,
21.917125701904297,
21.917125701904297,
21.86807632446289,
21.70208168029785,
21.58074951171875,
21.58074951171875,
21.413742065429688,
21.26551628112793,
21.214271545410156,
21.214271545410156,
21.179946899414062,
21.179946899414062,
21.179946899414062,
21.177825927734375,
21.173843383789062,
21.154071807861328,
21.154071807861328,
21.154071807861328,
21.154071807861328,
21.154071807861328,
21.154071807861328,
21.154071807861328,
21.154071807861328,
21.154071807861328,
21.154071807861328,
21.154071807861328,
21.154071807861328,
21.154071807861328,
21.154071807861328,
21.154071807861328,
21.154071807861328,
21.154071807861328,
21.154071807861328,
21.154071807861328,
21.154071807861328,
21.154071807861328,
21.05008316040039,
21.04030990600586,
20.831295013427734,
20.53384017944336,
20.515609741210938,
20.19546127319336,
19.9514102935791,
19.82052993774414,
19.82052993774414,
19.82052993774414,
19.82052993774414,
19.82052993774414,
19.82052993774414,
19.82052993774414,
19.82052993774414,
19.82052993774414,
19.82052993774414,
19.82052993774414,
19.82052993774414,
19.82052993774414,
19.82052993774414
],
"content": [
"OutputStream is an abstract-class that represents writing output .",
"OutputStream is just an abstract-class .",
"The OutputStream and InputStream class hierarchies are for writing and reading byte-oriented data .",
"The goal of InputStream and OutputStream is to abstract different ways to input and output : whether the stream is a file a web page or the screen shouldn t matter .",
"I am writing an OutputStream just noticed this in the OutputStream interface .. . .. . This call write one byte to the stream but why it takes integer as an argument",
"InputStream is used for reading OutputStream for writing .",
"However with an OutputStream something must be written to stream .",
"I need to read a pdf file with filepath C : file.pdf and write it to outputStream .",
"Is there any generic protocol similar to Java s OutputStream or Go s Writer interface for writing a stream of bytes",
"A method writing to an OutputStream blocks until it is done .",
"is writing into the outputstream messing up the response",
"Isn t OutputStream an abstract-class hence it could provide some implementation",
"If you are writing a class that returns a stream do you need to write your own protocol or use an Objective C protocol",
"If your data is a character stream you could use a FileReader instead of an InputStream and a FileWriter instead of an OutputStream if you prefer .",
"In Java I need to put content from an OutputStream I fill data to that stream myself into a ByteBuffer .",
"In Java to send data via the socket you get an OutputStream 1 from it and write to the OutputStream you output some data .",
"Another idea I ve been playing with is reading chunks of data from the InputStream and writing them to the OutputStream of the DataHandler .",
"However since ByteBuffer is fixed in capacity the desire for writing an arbitrary amount of data through an OutputStream into a ByteBuffer is irreconcilable .",
"Is there a way to prevent of writing more than capacity and which outputstream could be used for that",
"You are writing to an OutputStream that keeps everything in memory .",
"An OutputStream is one where you write data to .",
"You are not writing to a closed output stream .",
"IOUtils.copy InputStream OutputStream must not close the OutputStream .",
"So all you need to do to support writing ZIP files directly to OutputStream is to wrap it in a custom Stream that supports getting Position .",
"Why not writing to your memory stream then copy it to the response output stream",
"Don t close the OutputStream of a ServletResponse .",
"no need to create a new OutputStream .",
"I write the byte array to outputstream the following way : .. . .. . Is there any other way to write binary-data to outputstream",
"Does Java have an OutputStream equivalent to dev-null",
"I d also personally use a Writer rather than an OutputStream - fundamentally you want to deal with text data not binary-data .",
"If you need to use a Writer after you ve already started using the OutputStream just wrap an OutputStreamWriter around the output stream .",
"Do i need to initialize OutputStream",
"I have a OutputStream for my Socket .",
"It will give you a channel given an OutputStream .",
"The OutputStream itself does not support such a method .",
"With an OutputStream you can not skip positions .",
"Should you really be using an OutputStream",
"Another argument against closing the OutputStream .",
"Can I share an InputStream or OutputStream",
"Try using PipedOutputStream instead of OutputStream .",
"But writing these files to OutputStream to let a user save it to the local disk it does not work properly .",
"This can also be easily implemented wherever you need it using something like this : OutputStream nullOutputStream new OutputStream @Override public void write int b",
"getOutputStream basically opens a strike connection strike stream with the intention of writing data to the server .",
"SO my question is : why is the objectoutput stream not correctly writing into the ZipEntry .",
"You end up writing strange Unicode characters to output stream .",
"For instance if your output is small enough to fit in memory you might do the following : .. . .. . If the data is large enough that you need to stream it it becomes more difficult because there s no HttpEntity implementation that accepts an OutputStream .",
"For one OutputStream has a close method and any OutputStream you use together with an InputStream will likely be written by you .",
"Plain OutputStream would leave the option to the caller of the function to use any other type of stream including but not limited to files network byte .. .",
"As the comment of njzk2 : .. . .. . Plain OutputStream would leave the option to the caller of the function to use any other type of stream including but not limited to files network byte . .",
"But it seems like it doesn t like writing to the stream of HttpContext.Response.OutputStream .",
"Not in the standard-library AFAIK but it shouldn t be difficult to create one by overriding write in OutputStream",
"Use an ArrayList OutputStream or whatever s popular nowadays to store all the streams you want and write the write method to loop over all of them writing to each .",
"I had a following up question http : stackoverflow.com questions 33018984 writing-to-outputstream-having-capacity-restriction It could be great if you could look",
"It s got nothing to do with outputstream .",
"The outputstream and inputstream are separate from the connection .",
"It needs to throw the exception that the outputStream throws .",
"Some situations need you to set the http length header before writing to the stream otherwise they give up when the data starts to show .",
"I get issue when i write my data in outputstream for send to webservice using HttpURLConnection .",
"After that get outputStream of the response and dump the file content in it .",
"I couldn t visualize how outputStream works. .",
"I don t really need to close the outputstream myself",
"Upon calling write on the OutputStream I get no error .",
"See also Should I close the servlet outputstream",
"lastly you would write the InputStream to the OutputStream .",
"There is no conversion between InputStream OutputStream and the bytes they are working with .",
"InputStream and OutputStream are two completely separate streams .",
"Do I need to flush the OutputStream from the HttpServletResponse",
"@faizal Need to modify how the outputstream is created .",
"How do I get an OutputStream using org.apache.http.impl.client.DefaultHttpClient",
"You can t get an OutputStream from BasicHttpClient directly .",
"Can anyone explain me about InputStream and OutputStream",
"OutputStream is used for many things that you write to .",
"you read from an InputStream and write to an OutputStream .",
"MongoDB supplies an OutputStream but Jax-RS requires an InputStream .",
"inputstream outputstream and also pass in custom buffers sizes .",
"You would have to write to a file instead of an OutputStream .",
"This is an OutputStream as it is something your Java code will write to .",
"I wrote a few things to a single OutputStream e.g .",
"You will indeed need to extend OutputStream to achieve that .",
"Despite that the main problem is the OutputStream that doesn t support Read and Seek which is need by the ZipArchive in Update Mode : .. . .. . When you set the mode to Update the underlying file or stream must support reading writing and seeking .",
"Standard input is used for reading in data standard output for writing out data and standard-error for writing out error messages .",
"Then coming to my initial post - we cannot create an encrypted output stream at Server B which is for reading and writing the data since it has to be done only in Server A which is meant for encryption - which would provide me an encrypted output stream for writing .",
"Here s his example : .. . .. . I checked javadocs for the copy method in IOUtils and there is no information that OutputStream will be closed automaticaly so I m curious is it required to close OutputStream in that sample",
"If you re planning on writing a null to the stream to signal EOS it s redundant and if you re expecting to read a null without writing one you re mistaken .",
"Seems that Domino has bug with agent OutputStream .",
"Even if barely anything implements the swift writer protocol if I writing something new I want to use that instead of the Obj C way .",
"Also how should I set my expected outputStream",
"@peeskillet do you mean jersey will close the outputstream with the above close method",
"http : stackoverflow.com questions 1829784 should-i-close-the-servlet-outputstream",
"There is a protocol it s called Streamable : .. . .. . OutputStream : .. . .. . write allows an object to be written to .",
"With the WritableByteChannel adapter you can provide the ByteBuffer which will write it to the OutputStream .",
"Note that this approach involves copying from the ByteBuffer into a temporary array that is then written to the OutputStream .",
"Is there anyway to check whether an OutputStream is closed without attempting to write to it and catching the IOException",
"Unfortunately OutputStream API does not have method like isClosed .",
"How can I create class that takes an implentation of OutputStream and writes the the content to it",
"A generic OutputStream doesn t have the ability to write a String directly to it .",
"But I don t really understand inputStream and outputStream so much .",
"I already saw from to Should I close the servlet outputstream",
"How would I write to an OutputStream using DefaultHttpClient instead of HttpURLConnection",
"It assumes the InputStream instr and OutputStream osstr have already been created :"
]
}
|
{
"confidence": [
36.93861389160156,
36.07249450683594,
34.8404655456543,
34.80365753173828,
33.482994079589844,
33.147804260253906,
33.00020217895508,
32.428367614746094,
32.096702575683594,
31.996219635009766,
31.884687423706055,
31.722454071044922,
31.616653442382812,
31.411985397338867,
31.38251495361328,
31.130220413208008,
31.069093704223633,
30.719924926757812,
30.66384506225586,
30.66384506225586
],
"content": [
"Question : Can anyone explain me about InputStream and OutputStream I am confused about use cases for InputStream and OutputStream .. . .. . An explanation with some code snippet will be great . I just need to figure out their difference and usage . .. . Answer : The goal of InputStream and OutputStream is to abstract different ways to input and output : whether the stream is a file a web page or the screen shouldn t matter . All that matters is that you receive information from the stream or send information into that stream . InputStream is used for many things that you read from . OutputStream is used for many things that you write to . Here s some sample code . It assumes the InputStream instr and OutputStream osstr have already been created : Comment : What is a Stream Comment : @KorayTugay A stream is generally defined as a set of characters . To be more precise more than one bit or character is called as a stream .",
"Question : Can anyone explain me about InputStream and OutputStream I am confused about use cases for InputStream and OutputStream .. . .. . An explanation with some code snippet will be great . I just need to figure out their difference and usage . .. . Answer : OutputStream is an abstract-class that represents writing output . There are many different OutputStream classes and they write out to certain things like the screen or Files or byte arrays or network connections or etc . InputStream classes access the same things but they read data in from them . Here is a good basic example http : www.javacoffeebreak.com java103 java103.html of using FileOutputStream and FileInputStream to write data to a file then read it back in .",
"Question : Is there anyway to check whether an OutputStream is closed without attempting to write to it and catching the IOException For example consider the following contrived method : .. . .. . What could you replace stream isn t closed with Comment : What is the underlying problem you need to solve Comment : I suspect the OP wants to avoid having to deal with exceptions . Comment : It came about from me thinking defensively about what kind of bad inputs I might receive but it s more of a hypothetical question plus the top google result for java check whether outputstream is closed points to stackoverflow.com questions 2607515 http : stackoverflow.com questions 2607515 how-do-i-check-if-output-stream-of-a-socket-is-closed which doesn t seem to actually answer that question .. . Answer : No . If you implement your own you could write an isClosed method but if you don t know the concrete class then no . OutputStream is just an abstract-class . Here s it s implementation : Comment : Isn t OutputStream an abstract-class hence it could provide some implementation Comment : Yes sorry my bad . It doesn t though . Comment : Yes a shame it doesn t do something like @AlexR suggests in his answer stackoverflow.com a 8655939 110255 http : stackoverflow.com a 8655939 110255",
"Question : I am on the stage of development where I have two modules and from one I got output as a OutputStream and second one which accepts only InputStream . Do you know how to convert OutputStream to InputStream not vice versa I mean really this way that I will be able to connect these two parts Thanks Comment : See stackoverflow.com questions 1225909 http : stackoverflow.com questions 1225909 most-efficient-way-to-create-inputstream-from-outputstream Comment : @c0mrade the op wants something like IOUtils.copy only in the other direction . When someone writes into an OutputStream it becomes available for someone else to use in an InputStream . This is basically what PipedOutputStream PipedInputStream do . Unfortunately the Piped streams can t be built from other streams . Comment : so the PipedOutputStream PipedInputStream is the solution Comment : Basically in order for PipedStreams to work in your case your OutputStream would need to be constructed like new YourOutputStream thePipedOutputStream and new YourInputStream thePipedInputStream which probably is not the way your stream works . So I don t think this is the solution . .. . Answer : If you want to make an OutputStream from an InputStream there is one basic problem . A method writing to an OutputStream blocks until it is done . So the result is available when the writing method is finished . This has 2 consequences : .. . .. . 1 . If you use only one thread you need to wait until everything is written so you need to store the stream s data in memory or disk . 2 . If you want to access the data before it is finished you need a second thread . Variant 1 can be implemented using byte arrays or filed . Variant 1 can be implemented using pipies either directly or with extra abstraction - e.g . RingBuffer or the google lib from the other comment . Indeed with standard java there is no other way to solve the problem . Each solution is an implementataion of one of these . There is one concept called continuation see wikipedia http : en.wikipedia.org wiki Continuation for details . In this case basically this means : .. . .. . there is a special output stream that expects a certain amount of data .. . if the ammount is reached the stream gives control to it s counterpart which is a special input stream .. . the input stream makes the amount of data available until it is read after that it passes back the control to the output stream .. . .. . While some languages have this concept built-in for java you need some magic . For example commons-javaflow from apache implements such for java . The disadvantage is that this requires some special bytecode modifications at build time . So it would make sense to put all the stuff in an extra library whith custom build scripts .",
"Question : Can anyone explain me about InputStream and OutputStream I am confused about use cases for InputStream and OutputStream .. . .. . An explanation with some code snippet will be great . I just need to figure out their difference and usage . .. . Answer : InputStream is used for reading OutputStream for writing . The are connected as decorators to one another such that you can read-write all different types of data from all different types of sources . For example you can write primitive Data to a file : .. . .. . To read the written contents : .. . .. . You can use other types of streams to enhance the reading writing . For example you can introduce a buffer for efficiency : .. . .. . You can write other data such a objects : .. . .. . You can read from other different input sources : .. . .. . For most input streams there is an output stream also . You can define your own streams to reding writing special things and there are complex streams for reading complex things for example there are Streams for reding writing ZIP format .",
"Question : In Java I need to put content from an OutputStream I fill data to that stream myself into a ByteBuffer . How to do it in a simple way Comment : Generally you can t read directly from an output stream . If you fill the data yourself why can t you fill it into the ByteBuffer as well Comment : It is possible to read from it indirectly and of cause directly as well if you create class that inherits form OutputStream and make it possible to read from it directly . I did not fill the data myself some framework did and the framework s code I don t want to touch of cause . See my other comment and answers as well . .. . Answer : You can create a ByteArrayOutputStream and write to it and extract the contents as a byte using toByteArray . Then ByteBuffer.wrap byte will create a ByteBuffer with the contents of the output byte array . Comment : That is exactly what I ve done just before I ve read your comment . So I can approve that this works : Comment : Unfortunately ByteArrayOutputStream toByteArray makes a copy of the underlying byte array so while this prescription is simple it s not as efficient as we d like . However since ByteBuffer is fixed in capacity the desire for writing an arbitrary amount of data through an OutputStream into a ByteBuffer is irreconcilable . Comment : @seh It does not have to be this way - see my answer .",
"Question : How can I create class that takes an implentation of OutputStream and writes the the content to it For example the following print method is wrong and will not compile . What are the options or better techniques Comment : You should 1 look at the OutputStream API and use methods available to it and 2 if you have an error post the error here so we don t have to guess what is wrong . Comment : For instance the API will show you that there is no OutputStream method called write .. . that takes a String parameter and so you can t just make one up and expect it to work . Instead you must use the methods that are available . .. . Answer : A generic OutputStream doesn t have the ability to write a String directly to it . Instead you need to get the byte of the String and then write them out to the stream . Refer to the OutputStream http : docs.oracle.com javase 1.4.2 docs api java-io OutputStream.html java documentation for more information on the supported write data types . My suggestion for making this better is to make sure the OutputStream you provide in the constructor is a BufferedOutputStream as this will improve the performance of your code . It works by buffering some of the data in memory and writing it out to disk in big chunks instead of many smaller writes . Here is the java documentation for BufferedOutputStream http : docs.oracle.com javase 1.4.2 docs api java-io BufferedOutputStream.html",
"Question : I am writing an OutputStream just noticed this in the OutputStream interface .. . .. . This call write one byte to the stream but why it takes integer as an argument .. . Answer : So you can signal EOF : .. . .. . Notice that read returns an int value . If the input is a stream of bytes why doesn t read return a byte value Using a int as a return-type allows read to use -1 to indicate that it has reached the end of the stream . http : java.sun.com docs books tutorial essential io bytestreams.html Comment : mhm good point Comment : So if you write -1 what happens Does it close the stream : - Comment : Nope . You end up writing strange Unicode characters to output stream . But if there were a recieving stream for your write -1 I do believe it would signal end of stream to that stream . There are 3 possibilities for streaming : The first 2 transfer a specified number of bytes : write byte b int off int len and write byte b . The third option lets you transfer an undetermined number of bytes by using int . That s why int is used . Comment : In other words write int is there for symmetry with read . That s not so bad when you think about it . Good answer . Comment : I don t think so . For one OutputStream has a close method and any OutputStream you use together with an InputStream will likely be written by you .",
"Question : I can t find anything in the Swift book about io . Is there any generic protocol similar to Java s OutputStream or Go s Writer interface for writing a stream of bytes If you are writing a class that returns a stream do you need to write your own protocol or use an Objective C protocol To be clear am asking for a Swift native interface for this not because I avoiding using Objective C or Cocoa but for a description of the expected behavior for Swift to Swift code going forward . Comment : developer.apple.com library ios documentation Cocoa Conceptual https : developer.apple.com library ios documentation Cocoa Conceptual Streams Articles CocoaStreamsOverview.html Comment : Seems odd you don t have something this basic as part of the standard-library . The NSStream really isn t how you would do it if you wrote it in swift . Comment : I agree Swift is lacking in this area at the moment but it is designed to work with Cocoa frameworks . is there something specific you are trying to do Comment : @tony Very curious - why would you not use NSStream I don t think that just because Swift is around doesn t mean Cocoa is going away . I d say it s a very legitimate way to work with streams in Swift . Comment : @macandyp No I will use NSStream and of course it is legitimate way to do it . It just doesn t seems very idiomatic . I was expecting to need to use cocoa regularly for particular uses but there really no examples of the swift way to do io . How do you return errors without nserror when to use optionals etc . Even if barely anything implements the swift writer protocol if I writing something new I want to use that instead of the Obj C way . It really about implementation vs protocol . I could be writing both the reader and the writer and want to know the native way to do it . .. . Answer : This is something the Swift docs are quiet about and I wanted to know more about so I looked into it . There is a protocol it s called Streamable : .. . .. . OutputStream : .. . .. . write allows an object to be written to . String conforms to both making it easy to write to and from : .. . .. . Writing to a file : .. . .. . There is also writeToUrl . I assume those functions are all built on top of Cocoa streams which have similar functionality : Comment : Nice find . It seems like they are still working it which is reassuring .",
"Question : null .. . Answer : I have a snippet to download a file from jersey 2.22 .. . .. . the above code is working but i m wondering if the output stream I m writing in needs to close . I searched jersey s source code in OutboundMessageContext .. . .. . this method is to close entity stream . I m not sure if this is the right close method working with StreamingOutput can anyone help Comment : It is . What makes you think it isn t Comment : @peeskillet do you mean jersey will close the outputstream with the above close method I don t really need to close the outputstream myself Comment : No you don t.. . Comment : @peeskillet thank you",
"Question : I am on the stage of development where I have two modules and from one I got output as a OutputStream and second one which accepts only InputStream . Do you know how to convert OutputStream to InputStream not vice versa I mean really this way that I will be able to connect these two parts Thanks Comment : See stackoverflow.com questions 1225909 http : stackoverflow.com questions 1225909 most-efficient-way-to-create-inputstream-from-outputstream Comment : @c0mrade the op wants something like IOUtils.copy only in the other direction . When someone writes into an OutputStream it becomes available for someone else to use in an InputStream . This is basically what PipedOutputStream PipedInputStream do . Unfortunately the Piped streams can t be built from other streams . Comment : so the PipedOutputStream PipedInputStream is the solution Comment : Basically in order for PipedStreams to work in your case your OutputStream would need to be constructed like new YourOutputStream thePipedOutputStream and new YourInputStream thePipedInputStream which probably is not the way your stream works . So I don t think this is the solution . .. . Answer : I think the best way to connect InputStream to an OutputStream is through piped streams - available in java.io package as follow : .. . .. . In my opinion there are two main advantages for this code : .. . .. . 1 - There is no additional consumption of memory except for the buffer . 2 - You don t need to handle data queuing manually Comment : This methodology results in a deadlock at least in my test . JavaDoc : A piped output stream can be connected to a piped input stream to create a communications pipe . The piped output stream is the sending end of the pipe . Typically data is written to a PipedOutputStream object by one thread and data is read from the connected PipedInputStream by some other thread . Attempting to use both objects from a single thread is not recommended as it may deadlock the thread . The pipe is said to be broken if a thread that was reading data bytes from the connected piped input stream is no longer alive .",
"Question : In Java I need to put content from an OutputStream I fill data to that stream myself into a ByteBuffer . How to do it in a simple way Comment : Generally you can t read directly from an output stream . If you fill the data yourself why can t you fill it into the ByteBuffer as well Comment : It is possible to read from it indirectly and of cause directly as well if you create class that inherits form OutputStream and make it possible to read from it directly . I did not fill the data myself some framework did and the framework s code I don t want to touch of cause . See my other comment and answers as well . .. . Answer : Though the above-mention answers solve your problem none of them are efficient as you expect from NIO . ByteArrayOutputStream or MyByteArrayOutputStream first write the data into a Java heap-memory and then copy it to ByteBuffer which greatly affects the performance . An efficient implementation would be writing ByteBufferOutputStream class yourself . Actually It s quite easy to do . You have to just provide a write method . See this link for ByteBufferInputStream http : www.snippetit.com 2010 01 java-use-bytebuffer-as-inputstream .",
"Question : I am writing an OutputStream just noticed this in the OutputStream interface .. . .. . This call write one byte to the stream but why it takes integer as an argument .. . Answer : Maybe it s because bytes are signed by default and files store bytes as unsigned values . That is why read returns an int - to give 255 instead of -1 for FF . Same with write int you can not store FF as 255 in a byte .",
"Question : Can anyone explain me about InputStream and OutputStream I am confused about use cases for InputStream and OutputStream .. . .. . An explanation with some code snippet will be great . I just need to figure out their difference and usage . .. . Answer : From oracle documentation page about streams http : docs.oracle.com javase tutorial essential io streams.html : .. . .. . A stream is a sequence of data . A program uses an input stream to read data from a source one item at a time : .. . .. . enter image description here http : i.stack.imgur.com 7IT8V.gif .. . .. . A program uses an output stream to write data to a destination one item at time : .. . .. . enter image description here http : i.stack.imgur.com qzDzU.gif .. . .. . The data source and data destination pictured above can be anything that holds generates or consumes data . Obviously this includes disk files but a source or destination can also be another program a peripheral device a network socket or an array . Sample code http : docs.oracle.com javase tutorial displayCode.html code http : docs.oracle.com javase tutorial essential io examples CopyBytes.java from oracle tutorial : .. . .. . This program uses byte streams to copy xanadu.txt file to outagain.txt by writing one byte at a time .. . .. . Have a look at this SE question to know more details about advanced Character streams which are wrappers on top of Byte Streams : .. . .. . byte stream and character stream http : stackoverflow.com questions 3013996 byte-stream-and-character-stream",
"Question : I ve been trying to get the new ZipArchive included in .NET 4.5 System.IO.Compression.ZipArchive to work in a ASP.NET site . But it seems like it doesn t like writing to the stream of HttpContext.Response.OutputStream . My following code example will throw .. . .. . System.NotSupportedException : Specified method is not supported .. . .. . as soon as a write is attempted on the stream . The CanWrite property on the stream returns true . If I exchange the OutputStream with a filestream pointing to a local directory it works . What gives Stacktrace : Comment : are you trying it in development-environment or server Comment : I m currently running it locally so development-environment . I m getting the HttpContext from an IHttpHandler . Comment : ok MVC or Web forms Comment : Web forms . I m limited from using MVC in my project sadly . Comment : can you try linear coding you maybe missing response.contenttype etc in meantime i will try to re-create the error and be back at you . Happy coding .. . Answer : If you compare your code adaptation with the version presented in MSDN page http : msdn.microsoft.com en-us library system.io.compression.ziparchive.aspx you ll see that the ZipArchiveMode.Create is never used what is used is ZipArchiveMode.Update . Despite that the main problem is the OutputStream that doesn t support Read and Seek which is need by the ZipArchive in Update Mode : .. . .. . When you set the mode to Update the underlying file or stream must support reading writing and seeking . The content of the entire archive is held in memory and no data is written to the underlying file or stream until the archive is disposed . .. . Source : MSDN http : msdn.microsoft.com en-us library system.io.compression.ziparchivemode.aspx .. . .. . You weren t getting any exceptions with the create mode because it only needs to write : .. . .. . When you set the mode to Create the underlying file or stream must support writing but does not have to support seeking . Each entry in the archive can be opened only once for writing . If you create a single entry the data is written to the underlying stream or file as soon as it is available . If you create multiple entries such as by calling the CreateFromDirectory method the data is written to the underlying stream or file after all the entries are created . .. . Source : MSDN http : msdn.microsoft.com en-us library system.io.compression.ziparchivemode.aspx .. . .. . I believe you can t create a zip file directly in the OutputStream since it s a network stream and seek is not supported : .. . .. . Streams can support seeking . Seeking refers to querying and modifying the current position within a stream . Seek capability depends on the kind of backing store a stream has . For example network streams have no unified concept of a current position and therefore typically do not support seeking . An alternative could be writing to a memory stream then use the OutputStream.Write method to send the zip file . EDIT : With feedback from comments and further reading you could be creating large Zip files so the memory stream could cause you problems . In this case i suggest you create the zip file on the web server then output the file using Response.WriteFile . Comment : So in other words it s impossible to write it directly to the outputStream Like I said before a memoryStream is not an option as the file sizes vary and can become huge . Comment : I m trying with response.filter to see if i can find a workaround but according to MSDN you can t : Streams can support seeking . Seeking refers to querying and modifying the current position within a stream . Seek capability depends on the kind of backing store a stream has . For example network streams have no unified concept of a current position and therefore typically do not support seeking . Comment : I m confused don t your quotes mean that it should work with ZipArchiveMode.Create Comment : You re right.The problem is happens when you update the zip archive to update the archive the stream must support seeking .",
"Question : How do I get an OutputStream using org.apache.http.impl.client.DefaultHttpClient I m looking to write a long string to an output stream . Using HttpURLConnection you would implement it like so : .. . .. . Is there a method using DefaultHttpClient similar to what I have above How would I write to an OutputStream using DefaultHttpClient instead of HttpURLConnection e.g Comment : @KeithRandall I ve edited it . Hopefully it is clear now . Comment : Please explain what you want to write . In both your examples the getOutputStream returns a stream used to submit request data for http POST requests . Comment : @EugeneKuleshov How do I get an output Stream using org.apache.http.impl.client.DefaultHttpClient .. . Answer : I wrote an inversion of Apache s HTTP Client API PipedApacheClientOutputStream https : github.com robertjchristian piped-apache-client-outputstream which provides an OutputStream interface for HTTP POST using Apache Commons HTTP Client 4.3.4 . Calling-code looks like this : .. . .. . Note - In practice the same client executor service and config will likely be reused throughout the life of the application so the outer prep and close code in the above example will likely live in bootstrap init and finalization code rather than directly inline with the OutputStream instantiation .",
"Question : On IBM Domino Server version 8.5.3FP1 on Win32 platform there are two web-agents to generate PDF and RTF files by request . Every agent generates RTF or PDF file in a temporary folder then opens OutputStream instance to write this file to the client browser when save-file dialog appears . All things work ok . Files are generated and saved correctly in temporary folder . But writing these files to OutputStream to let a user save it to the local disk it does not work properly . Some files were written ok small files 11Kb but bigger files 34K were saved partially sometimes 276 bytes saved sometimes 4K bytes saved etc . I get OutputStream in my agents as follows : .. . .. . When file is generated and saved I use : .. . .. . Does not work . Then I used this way instead : .. . .. . Does not work . Then I used this way instead tricky but just for experimental purposes : .. . .. . Does . not . work . Before sending data to output stream I have invoked : .. . .. . And my question is as follows folks . What is wrong with my approach What I am doing wrong here File is created and saved on server correctly . Output stream opened correctly file read correctly . When I write to output stream there s no exception . Output stream flushed and closed correctly . What is wrong I am trying to solve this the whole day but I did not find a clue . Any ideas Comment : Wireshark is great tool for debugging problems like this . Use is to detect what exactly you are sending to client . Do you send http-status or the Content-Length header that are part of HTTP protocol Comment : Content-length is set but it does not change agent behaviour . I will check network packets with wireshark . Thank you . .. . Answer : Seems that Domino has bug with agent OutputStream . Stream obtained via agentRef.getAgentOutputStream does not work properly and performs partial write . Instead of using this way I decided to attach files to a NotesDocument instance save it and provide user with link-to attached files in this document .",
"Question : Can anyone explain me about InputStream and OutputStream I am confused about use cases for InputStream and OutputStream .. . .. . An explanation with some code snippet will be great . I just need to figure out their difference and usage . .. . Answer : you read from an InputStream and write to an OutputStream . for example say you want to copy a file . You would create a FileInputStream to read from the source file and a FileOutputStream to write to the new file . If your data is a character stream you could use a FileReader instead of an InputStream and a FileWriter instead of an OutputStream if you prefer . Comment : close always flush es so no .",
"Question : I am trying to write a function that takes File object offset and byte array parameters and writes that byte array to a File object in Java . So the function would look like .. . .. . But the problem is that the offset parameter is long type so I can t use write function of OutputStream which takes integer as an offset . Unlike InputStream which has skip long it seems OutputStream has no way to skip the first bytes of the file . Is there a good way to solve this problem Thank you . Comment : The largest number you can put in an int is 2 147 483 647 . Are the arrays you want to write larger than +- 2GB Comment : Just for clarification : the offset only applies to the position in the array not the output stream right With an OutputStream you can not skip positions . Comment : @TheNail offset refers to the offset from the beginning of the file not the beginning of the array . And unless you are using FAT as a file system you can indeed have files larger than 2Gb . Comment : Ah FYI : the int offset parameter off in OutputStream.write is about the array not the stream file but I see there are some relevant answers already . .. . Answer : That s to do with the semantics of the streams . With an input stream you are just saying that you are discarding the first n bytes of data . However with an OutputStream something must be written to stream . You can t just ask that the stream pretend n bytes of data were written but not actually write them . The reason for this is because not all streams will be seekable . Data coming over a network is not seekable -- you get the data once and only once . However this is not so with files because they are stored on a hard drive and it is easy to seek to any position on the hard drive . Solution : Use FileChannels http : docs.oracle.com javase 6 docs api java nio channels FileChannel.html or RandomAccessFile http : docs.oracle.com javase tutorial essential io rafs.html insteead .",
"Question : How do I get an OutputStream using org.apache.http.impl.client.DefaultHttpClient I m looking to write a long string to an output stream . Using HttpURLConnection you would implement it like so : .. . .. . Is there a method using DefaultHttpClient similar to what I have above How would I write to an OutputStream using DefaultHttpClient instead of HttpURLConnection e.g Comment : @KeithRandall I ve edited it . Hopefully it is clear now . Comment : Please explain what you want to write . In both your examples the getOutputStream returns a stream used to submit request data for http POST requests . Comment : @EugeneKuleshov How do I get an output Stream using org.apache.http.impl.client.DefaultHttpClient .. . Answer : You can t get an OutputStream from BasicHttpClient directly . You have to create an HttpUriRequest object and give it an HttpEntity that encapsulates the content you want to sent . For instance if your output is small enough to fit in memory you might do the following : .. . .. . If the data is large enough that you need to stream it it becomes more difficult because there s no HttpEntity implementation that accepts an OutputStream . You d need to write to a temp file and use FileEntity or possibly set up a pipe and use InputStreamEntity .. . .. . EDIT See oleg s answer for sample code that demonstrates how to stream the content - you don t need a temp file or pipe after all . Comment : Thank you man greatly appreciated . Comment : Question : What is this writeXml writer doing Also how are you passing a byte array to request.setEntity Comment : @MattGrogan it s implementing the application logic to actually produce the content that gets POSTed to the remote-server copied from the example code in the question . Comment : So if I have the data that I need to write should I just call writer.write data in-place of writeXml Comment : Yes writeXml is computing something to pass to writer.write ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
java
|
UNK_RELATION
|
nim@nimrod@30
|
nim -- nim formerly known as @placeholder is a statically typed imperative-programming language that tries to give the programmer ultimate power without compromises on runtime efficiency .
|
{
"confidence": [
46.595462799072266,
45.6911506652832,
45.52814865112305,
45.12199783325195,
44.83380126953125,
42.836185455322266,
42.77573013305664,
42.741111755371094,
42.62466049194336,
41.974388122558594,
41.87167739868164,
41.574798583984375,
41.41177749633789,
41.394378662109375,
40.40711212158203,
40.40711212158203,
40.40711212158203,
40.40711212158203,
40.40711212158203,
40.40711212158203,
40.40711212158203,
40.40711212158203,
40.40711212158203,
40.34952163696289,
40.14717483520508,
39.92184829711914,
39.78691101074219,
39.271575927734375,
39.145721435546875,
39.145721435546875,
39.145721435546875,
38.96530532836914,
38.96530532836914,
38.78224563598633,
38.78224563598633,
38.78224563598633,
38.78224563598633,
38.70896530151367,
38.50530242919922,
38.50530242919922,
38.50530242919922,
38.50530242919922,
38.15049743652344,
37.81773376464844,
37.71809768676758,
37.70429992675781,
37.52085494995117,
37.52085494995117,
37.52085494995117,
37.52085494995117,
36.881649017333984,
36.442909240722656,
36.442909240722656,
36.442909240722656,
36.442909240722656,
36.07622528076172,
36.07622528076172,
36.07622528076172,
36.07622528076172,
36.07622528076172,
36.07622528076172,
36.07622528076172,
36.07622528076172,
36.07622528076172,
36.07622528076172,
36.07622528076172,
35.41904067993164,
35.41904067993164,
35.01528549194336,
35.01528549194336,
34.45257568359375,
34.451358795166016,
34.451358795166016,
34.451358795166016,
34.451358795166016,
34.451358795166016,
34.451358795166016,
34.370704650878906,
34.370704650878906,
34.370704650878906,
34.370704650878906,
34.370704650878906,
33.79417419433594,
33.79417419433594,
33.5836181640625,
33.3734130859375,
33.3734130859375,
33.3734130859375,
33.3734130859375,
33.3734130859375,
33.3734130859375,
32.990447998046875,
32.82770919799805,
32.74443817138672,
32.08146667480469,
31.941631317138672,
31.941631317138672,
31.941631317138672,
31.941631317138672,
31.941631317138672
],
"content": [
"I want to write a pretty printer for a NimStringDesc for the programming language Nim .",
"Nim like Python is a whitespace-aware language .",
"Nim is full of secrets .",
"A Google search for nim sqlite gives me this : nim-lang.org docs db sqlite.html http : nim-lang.org docs db sqlite.html",
"I m new to the Nim programming language and coming from a Lua background it excited me to find out that there is a module for adding Lua bindings to Nim .",
"You might want to create a feature request for this : https : github.com nim-lang Nim issues",
"@hjpotter92 Nope I tried C : Nim and C : Nim bin",
"I m trying to emulate in C++ a distinct type http : nim-lang.org docs manual.html types-distinct-type from the Nim programming language http : nim-lang.org .",
"Nim latest source code https : github.com nim-lang Nim blob devel lib impure db sqlite.nim provide a good example .",
"I have recently began to explore the Nim programming language and I was wondering how to connect to a SQLite database .",
"nim script is not executing commands .. . .. . Nim Compiler Version 0.12.0 2015-10-27 Windows : i386 Windows 7 .. . .. . given the file server.nims : .. . .. . started with : nim e server.nims .. . .. . is just printing : .. . .. . but it seems not to execute anything .",
"I m wondering how to use a concept in nim 0.13 .",
"But getch or even getch are illegal in Nim .",
"You can find more about it here : .. . .. . http : nim-lang.org docs estp.html .. . .. . Lastly since Nim generates C code with C function names that directly correspond to their Nim counterparts you can use any C profiler with Nim programs .",
"From Nim s website http : nim-lang.org download.html : .. . .. . Note : The Nim compiler requires a C compiler to compile software .",
"I also looked for this and didn t find anything for my nim-small-coreutils https : github.com def- nim-small-coreutils .",
"I get the same error on Linux submitted it as a bug : https : github.com nim-lang Nim issues 3962",
"For reference same question with resolution here : https : github.com nim-lang Nim issues 3974",
"nim --app : gui c file should do the trick according to http : nim-lang.org docs nimc.html",
"I knew about Nim http : nim-lang.org and then learned about Rock https : ooc-lang.org .",
"My thoughts are that Nim belongs-to the liberal approach but that would mean that semicolons could be added at the end of commands and Nim doesn t support that .",
"Compiling a Nim program with nim c -r example.nim creates the output file example .",
"nim-lang.org manual.html implict-items-pairs-invocations http : nim-lang.org manual.html implict-items-pairs-invocations",
"Just started programming in the Nim language which I really like so far .",
"existsDir : http : nim-lang.org docs os.html existsDir string .. . .. . createDir : http : nim-lang.org docs os.html createDir string .. . .. . So this should work :",
"But Nim already has such functionality in the basic2d http : nim-lang.org docs basic2d.html module s Vector2d http : nim-lang.org docs basic2d.html Vector2d type .",
"You might be on an old version of Nim .",
"Looking for a way to read in a file from a tar.gz archive using the Nim programming language version 0.11.2 .",
"I try to launch first program in nim .",
"In Nim parlance they are probably best represented by an iterator .",
"I m using a fairly recent 10.3 build of Nim",
"The good news is that it is already fixed in the devel version of the compiler on Github https : github.com nim-lang Nim blob devel lib pure asyncnet.nim L452 in 0.11.2 it was broken here https : github.com nim-lang Nim blob master lib pure asyncnet.nim L433 .",
"My nim version is : Nim Compiler Version 0.12.0 2015-12-15 Windows : i386 .. . .. . I tried to build libsodium https : github.com jedisct1 libsodium with this nim wrapper https : github.com judofyr sodium.nim I ve compiled libsodium with VS2013 - Release Win32 .. . .. . I see the libsodium.lib i ve placed the nim wrapper next to it .",
"If your executable is called nim-debug-test your script needs to be called nim-debug-test-gdb.py",
"I created an issue https : github.com nim-lang Nim issues 4516 in Nim s repository .",
"In Nim you create JsonNode objects which are object variants http : nim-lang.org docs tut2.html object-variants .",
"list on the What makes Nim practical http : hookrace.net blog what-makes-nim-practical blog post .",
"Nim float s are 64-bit .",
"On my system Linux the Nim version is twice as fast as the Python one .",
"With -P 1 instead of -P 6 it is exactly as fast as the Nim version for me .",
"There are various libraries in nim that return actual objects rather than references .",
"Your example compiles and works fine for me Nim 0.13.0 .",
"There are several features in Nim that help in interfacing with a foreign language in a fluent way : .. . .. . 1 Calling Ruby from Nim using Nim s dot operators http : nim-lang.org docs manual.html special-operators-dot-operators .. . .. . These are a bit like method-missing in Ruby .",
"These are the files generated by the nim compiler : .. . .. . I know that stdlib system is automatically imported into every nim project so I can say that when the objectfile stdlib system.o get s loaded it is a nim project .",
"The manual http : nim-lang.org manual.html says it s the method call syntax http : nim-lang.org manual.html procedures-method-call-syntax .",
"I m putting together a Nim wrapper for Box2D http : box2d.org using c2nim https : github.com nim-lang c2nim .",
"I want to create a dll from nim code .",
"And if you put it in the directory where nim was installed",
"Does it not syntax highlight Nim or Go code",
"The current Nim 0.12.0 comes with the options module .",
"For me it resolves to nim-lang.org docs system.html open File FileHandle FileMode http : nim-lang.org docs system.html open File FileHandle FileMode FileHandle is just cint",
"Are you trying to create a DLL from the NIM IDE",
"How can I tie nim to qt",
"In Nim there are the libzip and zlib modules but the documentation is minimal and there are no examples .",
"This entails somehow using Vector2d as a Nim interface to b2Vec2 .",
"I m using the nim buildpack to run a simple jester server on heroku .",
"In any case the solution should be to update the version of Nim that heroku uses .",
"Is there a way to compile a Nim application that doesn t open a console when it s executed",
"Meaningful documentation at my level of Nim expertise is sparse to non-existent .",
"object assign in Nim is deep-copy they re different object .",
"@bluenote10 Jehan s answer is for Nim 0.11.3 rename TThread to Thread and TChannel to Channel .",
"I paste a version for Nim 0.11.2 here which should work .",
"The result : Nim allows me to pass immutable let arrays but they are indeed modified .",
"I am brand new to Nim and am bumping into some issues .",
"Here is how I ended up creating a 2D array in Nim :",
"NOTE : I am using Nim 0.13.0 on Windows platform .",
"You can then ask the Nim compiler to generate only source code http : nim-lang.org docs nimc.html cross-compilation which you will compile in a second step or you can just change the compiler executable which Nim will call when compiling the project this is explained in the same section linked above .",
"When going through the code in Nim project itself I find that some proc decorated by magic pragma misses proc definition example https : github.com nim-lang Nim blob master lib core macros.nim L282 .",
"The Nim backend integration guide http : nim-lang.org docs backends.html explains how you can do this trickery of mixing and calling different languages together .",
"s According to rosettacode http : rosettacode.org wiki Rosetta Code Nim has no list comprehensions but they can be created through metaprogramming http : rosettacode.org wiki List comprehensions Nim .",
"There is a definition for . . as an inline iterator as well as a Slice : .. . .. . http : nim-lang.org docs system.html ...i S T .. . http : nim-lang.org docs system.html . . T T .. . .. . Inline iterators are 0-cost abstractions .",
"What s the best way to write and read a binary files in Nim",
"I hope Nim gets interfaces before the 1.0 release",
"By default Nim will enforce the macro hygiene rules for the code inside quoted blocks .",
"I am trying to make a simple use of typeclasses in Nim .",
"Nim sequences are generic but you are not putting the same kind of objects in them .",
"Using nim c --cpu : amd64 --os : linux -c hello.nim did the trick .",
"I ve installed Nim Compiler Version 0.12.0 2015-12-15 Windows : i386 via git .",
"The code looks a little bit convoluted and really slow but I can t figure out a faster way to do it in Nim .",
"Here s a minor cleanup : .. . .. . Make sure you compile with nim -d : release c foobar.nim .",
"Nim uses a technique similar to C++ s return-value-optimization https : en.wikipedia.org wiki Return value optimization .",
"So it does seem that nim thinks the object is on the stack at least weather or not it actually puts it there .",
"Even if i try this simple example its not working : .. . .. . i ve compiled it with nim c --app : lib libh4x.nim and nim c -d : release --app : lib --no main libh4x.nim .. . .. . i use Nim Compiler Version 0.11.2 2015-05-04 Windows : i386 .. . .. . to inspect the dll i use dllexp.exe .",
"Also presumably the future way to go are concepts http : nim-lang.org docs manual.html generics-concepts but as usual the manual is dry and the related unit tests are cryptic https : github.com nim-lang Nim tree devel tests metatype so I couldn t manage to translate the previous tuple example to concepts .",
"In the language nim one can do the following thing : .. . .. . which would be the same as .. . .. . So basically you take the expression before the dot as the first argument to the function .",
"I am using the nim IDE - aporia to produce the code .",
"i guess nim default compiles to x64 And there s -switch for x86",
"The string type in Nim is not equivalent to the C s const char type .",
"I thought that is something wrong with translating nim c char to string in c .",
"I m looking to use nim in an upcoming project but I m not sure where to start .",
"Unfortunately it looks like there are no Nim libraries yet which read tar.gz archives .",
"I am looking for a version of argsort such as exists in numpy http : docs.scipy.org doc numpy-1.10.0 reference generated numpy.argsort.html or in fortran https : github.com certik fortran-utils blob master src sorting.f90 Is there an implementation of argsort in nim .. . or accessible to nim in some library",
"In general the idea with Nim is that it leaves you the possibility to implement such features https : bitbucket.org fowlsoft interfaces wiki Home just like there is no official OOP macro but you can build your own http : nim-by-example.github.io oop macro .",
"The key question for me is : Since I know that callToC is read-only can I convince Nim to allow both immutability without a copy",
"I m having issues passing math functions procs in Nim version 0.10.2 .",
"Here s what happens if nim doesn t like the port : .. . .. . I m sure that 58622 is the port heroku is trying to feed the program .",
"This is consistent with my experience but how would I go about updating Nim on heroku",
"In nim you can define a symbol via -d : value and test if it was defined with defined value .",
"I m currently trying to learn Nim it s going slowly - can t devote much time to it .",
"pragma http : nim-lang.org docs manual.html implementation-specific-pragmas-emit-pragma to directly output pieces of mruby code ."
]
}
|
{
"confidence": [
56.20809555053711,
52.519779205322266,
52.40708541870117,
50.780696868896484,
50.72816467285156,
50.29045486450195,
49.89188766479492,
49.4818115234375,
48.84748840332031,
48.54993438720703,
48.54556655883789,
48.28539276123047,
48.23336410522461,
47.808067321777344,
47.3924560546875,
47.01710510253906,
46.60078048706055,
46.30461883544922,
45.85100555419922,
45.85100555419922
],
"content": [
"Question : I have recently began to explore the Nim programming language and I was wondering how to connect to a SQLite database . After reading the relevant section of the manual my confusion has not diminished . If someone would be kind enough to provide a simple example I would appreciate it . Thanks . Comment : A Google search for nim sqlite gives me this : nim-lang.org docs db sqlite.html http : nim-lang.org docs db sqlite.html .. . Answer : Nim latest source code https : github.com nim-lang Nim blob devel lib impure db sqlite.nim provide a good example . Copy the example here : Comment : i ve played with this example as well i had to download the prebuild sqlite library from their site and rename it to sqlite3 32.dll and placed it nearby my executable .",
"Question : I m currently trying to learn Nim it s going slowly - can t devote much time to it . On the other hand in the interests of getting some working code I d like to prototype out sections of a Nim app I m working on in ruby . Since mruby allows embedding a ruby subset in a C app and since nim allows compiling arbitrary C code into functions it feels like this should be relatively straightforward . Has anybody done this I m particularly looking for ways of using Nim s funky macro features to break out into inline ruby code . I m going to try myself but I figure someone is bound to have tried it and or come up with more elegant solutions than I can in my current state of learning : .. . Answer : https : github.com micklat NimBorg .. . .. . This is a project with a somewhat similar goal . It targets python and lua at the moment but using the same techniques to interface with Ruby shouldn t be too hard . There are several features in Nim that help in interfacing with a foreign language in a fluent way : .. . .. . 1 Calling Ruby from Nim using Nim s dot operators http : nim-lang.org docs manual.html special-operators-dot-operators .. . .. . These are a bit like method-missing in Ruby . You can define a type like RubyValue in Nim which will have dot operators that will translate any expression like foo.bar or foo.bar baz to the appropriate Ruby method call . The arguments can be passed to a generic function like toRubyValue that can be overloaded for various Nim and C types to automatically convert them to the right Ruby type . 2 Calling Nim from Ruby .. . .. . In most scripting languages there is a way to register a foreign type often described in a particular data structure that has to be populated once per exported type . You can use a bit of generic-programming and Nim s .global . vars to automatically create and cache the required data structure for each type that was passed to Ruby through the dot operators . There will be a generic proc like getRubyTypeDesc T : typedesc that may rely on typeinfo typetraits or some overloaded procs supplied by user defining what has to be exported for the type . Now if you really want to rely on mruby because you have experience with it for example you can look into using the .emit . pragma http : nim-lang.org docs manual.html implementation-specific-pragmas-emit-pragma to directly output pieces of mruby code . You can then ask the Nim compiler to generate only source code http : nim-lang.org docs nimc.html cross-compilation which you will compile in a second step or you can just change the compiler executable which Nim will call when compiling the project this is explained in the same section linked above . Comment : Wow some excellent pointers there thank you",
"Question : I m trying to understand what kind of approach is used by Nim to distinguish between commands . There s the separatist approach where a semicolon just separates commands used in Pascal for example the terminist approach where a semicolon completely terminates the command used in C C++ Java etc . and the liberal approach where the programmer can decide whether or not to use a semicolon . My thoughts are that Nim belongs-to the liberal approach but that would mean that semicolons could be added at the end of commands and Nim doesn t support that . Any other thoughts .. . Answer : Nim like Python is a whitespace-aware language . It uses newlines as statement separators and indentation to produce block structures . Not all languages have visible statement separators although some allow a visible statement separator in some circumstances . For example in Python simple statements can be separated by semicolons but not compound statements . There are more things in heaven and earth Horatio Than are dreamt of in your philosophy Hamlet I.5 : 159 167",
"Question : Is there a way to compile a Nim application that doesn t open a console when it s executed Unless I m missing something the official documentation doesn t show any compiler-options that would do this . I really want a program to perform tasks in the background without always having a console window showing . .. . Answer : nim --app : gui c file should do the trick according to http : nim-lang.org docs nimc.html Comment : When I do this I get strange errors . C : Nim dist mingw bin . . lib gcc x86 64-w64-mingw32 4.9.1 . . . . . . . . x86 64-w6 4-mingw32 bin ld.exe : cannot find -lgdi32 C : Nim dist mingw bin . . lib gcc x86 64-w64-mingw32 4.9.1 . . . . . . . . x86 64-w6 4-mingw32 bin ld.exe : cannot find -lcomdlg32 Comment : Googling leads me here : forum.nim-lang.org t 2070 1 http : forum.nim-lang.org t 2070 1 Maybe it helps . Comment : That discussion is a little bit unclear to me . I don t know very much about MinGW or how to mess around with compilers and I don t have any C background so the language they are using goes over my head .",
"Question : Looking for a way to read in a file from a tar.gz archive using the Nim programming language version 0.11.2 . Say I have an archive .. . .. . and a file in that archive .. . .. . My goal is to be able to read the contents of the file line by line in Nim . In Python I can do this with the tarfile module . In Nim there are the libzip and zlib modules but the documentation is minimal and there are no examples . There s also the zipfiles module but I m not sure if this is capable of working with tar.gz archives . .. . Answer : To my knowledge libzip and zlib cannot be used to read tar files afaik they only support zip archives and or raw string compression while a tar.gz requires gzip + tar . Unfortunately it looks like there are no Nim libraries yet which read tar.gz archives . If you are okay with a quick-and-dirty tar -based solution you can do this : .. . .. . If you want a clean and flexible solution this would be a good opportunity to write a wrapper for the libarchive https : github.com libarchive libarchive library .",
"Question : I want to program a game and would like to use a component pattern for multiple entities . In a language with interfaces type-classes multiple-inheritance there would be no problem . I want some entities to be updateable but not renderable and some shall be both . .. . .. . Haskell : .. . .. . I can create a list of things that can be updated . In Java D .. . this could be implemented via Interfaces .. . .. . .. . .. . Now I am wondering how this can be implemented in nim with multimethods . Can the existence of a fitting multimethod be expressed in a type Comment : Seems like concepts http : nim-lang.org docs manual.html generics-concepts are the way to go but they are still WIP and I cannot create a seq Updatable . type Updateable concept x update x Comment : It is not clear how exactly you would like to use multiple-inheritance in your example . For example why not simply do nothing if a component doesn t implement render or update Looking at popular engines component-based architectures Unity3d UE4 they don t use interfaces for core classes that users implement - it s easier to think about single Component type than of many interfaces one may need to implement . .. . Answer : The lack of an explicit interface keyword is common question in the Nim community http : forum.nim-lang.org t 278 1 . Taking Araq s answer and applying it to a hypothetical case based on your Java D snippet we could write something like this : .. . .. . However as you can read in that forum thread http : forum.nim-lang.org t 278 1 depending on what exactly you need interfaces for other approaches may be better . Also presumably the future way to go are concepts http : nim-lang.org docs manual.html generics-concepts but as usual the manual is dry and the related unit tests are cryptic https : github.com nim-lang Nim tree devel tests metatype so I couldn t manage to translate the previous tuple example to concepts . If you feel like going for concepts you should ask in the forum directly but beware as the manual says concepts are still in development https : github.com nim-lang Nim issues utf8 E2 9C 93 q is 3Aissue+is 3Aopen+concept . Comment : It seems like the concept approach is a dead end . Concepts don t have a runtime representation . One could never create a seq Updateable . Using a tuple of closures doesn t feel right . It s like building your own vtable because the compiler can t . I hope Nim gets interfaces before the 1.0 release Comment : In general the idea with Nim is that it leaves you the possibility to implement such features https : bitbucket.org fowlsoft interfaces wiki Home just like there is no official OOP macro but you can build your own http : nim-by-example.github.io oop macro .",
"Question : I read this down and up : http : nim-lang.org docs times.html .. . .. . But still cannot figure the simple thing : how to get time in ms twice once before my code and again after my code runs and then print the difference I tried their example : .. . .. . But this prints something meaningless : .. . Answer : If you plan to perform a lot of measurements the best approach is to create a re-usable helper template abstracting away the timing code : .. . .. . This will print out .. . .. . If you need more comprehensive data about the performance of all of the code included in your project Nim offers a special build mode which instruments the compiled code with profiling probes . You can find more about it here : .. . .. . http : nim-lang.org docs estp.html .. . .. . Lastly since Nim generates C code with C function names that directly correspond to their Nim counterparts you can use any C profiler with Nim programs . Comment : Ey i didn t know this profile . Nim is full of secrets .",
"Question : I m new to the Nim programming language and coming from a Lua background it excited me to find out that there is a module for adding Lua bindings to Nim . I installed Nimble Nim s package manager for Windows and executed nimble install lua to download and install the correct module . Upon trying to import it and compile the source this happened : .. . .. . I have Lua 5.1 already installed with the proper entries in PATH . It s located in Program Files x86 . The directory contains a dll called lua5.1.dll . I tried looking up the error on Google but there were no results that helped . What could be the problem Comment : Try putting the dll in same dir as the project : C : Users Ashley Desktop Stuff Coding Nim Projects LuaTest Comment : @hjpotter92 The same issue happens Comment : And if you put it in the directory where nim was installed Comment : @hjpotter92 Nope I tried C : Nim and C : Nim bin .. . Answer : On Windows you can put the library at the same place as the generated binary . In this case the file should be called lua.dll lua5.1.dll or lua5.0.dll . Also make sure that the library and binary are both for the same system architecture either x86 32bit or x86-64 64bit . Comment : This didn t work . You might be onto something though because my Lua installation is 32bit and my Nim compiler is 64bit . To fix that I compiled with the --cpu : i386 flag but the same error happened with the result . Comment : I downloaded the Lua 5.1 64bit binary and it worked . Thanks for the help",
"Question : Looking for a way to read in a file from a tar.gz archive using the Nim programming language version 0.11.2 . Say I have an archive .. . .. . and a file in that archive .. . .. . My goal is to be able to read the contents of the file line by line in Nim . In Python I can do this with the tarfile module . In Nim there are the libzip and zlib modules but the documentation is minimal and there are no examples . There s also the zipfiles module but I m not sure if this is capable of working with tar.gz archives . .. . Answer : In a project at my company we ve been using the following module exposing gzip files as streams : .. . .. . But you also need to to be able to read the tar header in order to find the correct location of the desired file in the uncompressed gzip stream . You could wrap some existing C library like libtar https : github.com tklauser libtar to do this or you could roll your own implementation http : stackoverflow.com questions 2505042 how-to-parse-a-tar-file-in-c .",
"Question : I m on windows-7 64bit . My nim version is : Nim Compiler Version 0.12.0 2015-12-15 Windows : i386 .. . .. . I tried to build libsodium https : github.com jedisct1 libsodium with this nim wrapper https : github.com judofyr sodium.nim I ve compiled libsodium with VS2013 - Release Win32 .. . .. . I see the libsodium.lib i ve placed the nim wrapper next to it . So it looks like this : .. . .. . now i tried to compile the wrapper with nim c nimwrapper.nim .. . .. . now i see the following error message : .. . .. . Any idea Comment : PS : i ve tried to compile it several times in the past . But i gave up . I was never able to link it . .. . Answer : I get the same error on Linux submitted it as a bug : https : github.com nim-lang Nim issues 3962",
"Question : I m using the nim buildpack to run a simple jester server on heroku . However the asyncnet library sometimes refuses to use the port heroku provides different each time . Here s what happens if nim doesn t like the port : .. . .. . I m sure that 58622 is the port heroku is trying to feed the program . When I run locally with port 58622 the server works fine . Why is this happening .. . Answer : It seems you stumbled on a bug in Nim s socket code . The good news is that it is already fixed in the devel version of the compiler on Github https : github.com nim-lang Nim blob devel lib pure asyncnet.nim L452 in 0.11.2 it was broken here https : github.com nim-lang Nim blob master lib pure asyncnet.nim L433 . My guess is that on Heroku you are using Nim 0.11.2 which is the latest release and on your local computer you are using the devel version which does not have this bug . In any case the solution should be to update the version of Nim that heroku uses . Comment : This is consistent with my experience but how would I go about updating Nim on heroku Setting the version to 0.11.3 in the nimble file and setting the branch to devel as per heroku-buildpack-nim s instructions doesn t work heroku rejects the build",
"Question : All documentation I found about writing gdb pretty printers is basically this one site : https : sourceware.org gdb onlinedocs gdb Writing-a-Pretty 002dPrinter.html Writing-a-Pretty 002dPrinter . It tells me that the pretty printers are loaded when a shared library is loaded . But I do not have a shared library one could say my library is header-only . I want to write a pretty printer for a NimStringDesc for the programming language Nim . It compiles to C so here are all relevant parts that get generated into the c file . here are the loaded libraries of the test program that I wrote : .. . .. . So I cannot use something like home user gdb nim-gdb.py because there is no libnim that gets loaded . So what do I have to do that this file get s loaded anyway EDIT : .. . .. . nim creates several c files that then get compiled and linked together with a normal c linker . These are the files generated by the nim compiler : .. . .. . I know that stdlib system is automatically imported into every nim project so I can say that when the objectfile stdlib system.o get s loaded it is a nim project . I have one gdb init script : .. . .. . But it does not get loaded . This is the content of stdlib system-gdb.py : .. . .. . Here Is some gdb output : .. . .. . The problem is I don t know what I did wrong . .. . Answer : The document really should say objfile . Executables and shared-libraries are handled exactly the same except that shared-libraries can be dlopen ed so in that case the script can be called later . In either case simply create a file named objfile-gdb.py that code will be executed whenever the objfile is loaded . That script can either or you may prepend one of the debug roots to the full path typically usr share gdb auto-load and usr lib debug . Note that there are some infelicities regarding if an objfile is loaded more than once typically if you restart the application using run - I have not tested if this also occurs with a dlopen - dlclose - dlopen sequence or if you use split debuginfo since that counts as a separate objfile but uses the same script . I have some vague thoughts regarding a virtual python package with a custom path that changes on every execution that could solve this .. . Comment : I added now much more information to my project but the problem is that I don t know how I should call my pyton script so that gdb actually tries to open it . I can t even find a list of opened libraries that contains anything like stdlib system.o . I hope you can help me furthe with the additional information I just added . Comment : If your executable is called nim-debug-test your script needs to be called nim-debug-test-gdb.py Comment : Ok at least it works now so far that It tells me that I have to set an auto-load safe path . So the question is where is the auto-load safe path which is currently debugdir : datadir auto-load . But what is debugdir and datadir . What values do they have how do I look up their values Comment : Those are the two paths I mentioned earlier typically usr lib debug and usr share gdb auto-load . If you want to work on stuff for development add home foo src or whatever . If you want it to work for deploy you should set up splitdebug and such .",
"Question : nim script is not executing commands .. . .. . Nim Compiler Version 0.12.0 2015-10-27 Windows : i386 Windows 7 .. . .. . given the file server.nims : .. . .. . started with : nim e server.nims .. . .. . is just printing : .. . .. . but it seems not to execute anything . If i execute gcc -v in cmd.exe it shows gcc s version string . what is the correct way to run it Comment : It may be an old bug . I have 0.12.1 2015-11-28 and it does what it is suppose to do using your code . Try to upgrade your compiler . Comment : I ve installed Nim Compiler Version 0.12.0 2015-12-15 Windows : i386 via git . Now my code works . If you write this as an answer i will accept it . .. . Answer : It may be an old bug . I have 0.12.1 2015-11-28 and it does what it is suppose to do using your code . Try to upgrade your compiler .",
"Question : In scala you easily include the content of a variable inside a string like this : .. . .. . Is this possible in nim and in that case how .. . Answer : Adding your own string interpolation is not particularly had http : gradha.github.io articles 2014 11 swift-string-interpolation-with-nimrod-macros.html since the standard-library already provides most of the necessary pieces : Comment : That s a good custom solution . Could it work without variables initialized on compile-time Comment : One should mention that interpolatedFragments will break on something like a b since it only counts braces . strfmt currently also suffers from this but there should be a way to solve it by making interpolatedFragments a compileTime iterator allowing to use parseExpr to properly parse an expression . Comment : @Arrrrrrr why wouldn t it The macro doesn t do anything to variables it only transforms the literals to break them up into concatenations . Added some runtime lines to example . Comment : @bluenote10 interpolatedFragments is very simple and wasn t intended for nested braces . Nothing stops you from implementing a brace escaping mechanism inside the parsing loop and making it on par to say an SQL parser like github.com Araq Nim blob devel lib pure parsesql.nim https : github.com Araq Nim blob devel lib pure parsesql.nim . But at this point I d say you are abusing string interpolation for little benefit . Comment : @GrzegorzAdamHankiewicz : What I m trying to say is that since the macro is expanded at compile-time the full power of the compiler is available anyways and it would make sense to use its expression parser if possible instead of parsing it manually . Imho it is not an abuse to allow any possible language statement just like you can in Scala . The problem with the limitations is not that they are overly restrictive but that people will not know them and they will lose time to find out why they get strange compilation errors .",
"Question : In the language nim one can do the following thing : .. . .. . which would be the same as .. . .. . So basically you take the expression before the dot as the first argument to the function . I m sure other languages have this feature but none directly came to mind . What I want to know is what name this syntax has Comment : It looks like Object-Oriented syntax . Most languages don t let you switch back and forth like this you have to use one or the other depending on the type of function . Comment : Yes it looks like it but it isn t . This syntax can be used on any function not just methods Comment : I d say it was just using a method declared in the type definition quoting from the following link . If you created your own which behaved like that it would be called an extension method http : en.wikipedia.org wiki Extension method in C and VB . .. . Answer : The manual http : nim-lang.org manual.html says it s the method call syntax http : nim-lang.org manual.html procedures-method-call-syntax . It also mentions dot operators http : nim-lang.org manual.html special-operators-dot-operators .",
"Question : I am trying to learn Nim and its features such Iterators and i found that the following example works fine . However The following do not works : .. . .. . The Nim Compiler reports the following error : .. . .. . Error : attempting to call undeclared routine : countup .. . .. . How countup is undeclared routine where it is a built-in iterator Or it is a bug to report about What are the solutions to enforce a custom iterator in variable-declaration such countup or countdown NOTE : I am using Nim 0.13.0 on Windows platform . .. . Answer : That happens because countup is an inline iterator only . There is a definition for . . as an inline iterator as well as a Slice : .. . .. . http : nim-lang.org docs system.html ...i S T .. . http : nim-lang.org docs system.html . . T T .. . .. . Inline iterators are 0-cost abstractions . Instead you could use a first-class closure iterator by converting the inline iterator to one :",
"Question : So I have this code to check for filetype for each file in a directory . Just need to read first 4 bytes and check against pattern . The code looks a little bit convoluted and really slow but I can t figure out a faster way to do it in Nim . What am I doing wrong for comparison Python code that is 2x faster : .. . .. . and regular cli which is about 10x faster than Python but has some pipe bug when encountering 10 6+ files .. . Answer : On my system Linux the Nim version is twice as fast as the Python one . But maybe my files are just wrong . What operating-system are you on You should close files and your comparison is wrong if the file is shorter than 4 bytes . Here s a minor cleanup : .. . .. . Make sure you compile with nim -d : release c foobar.nim . The command-line version is much faster as you use 6 processes at the same time . With -P 1 instead of -P 6 it is exactly as fast as the Nim version for me . Comment : For me all of them take the same time now +-10 . Didn t know you can compare arrays like that . Thanks for the tips .",
"Question : There are various libraries in nim that return actual objects rather than references . Sometimes I want an object on the heap regardless of efficiency -- for instance when I have a generic procedure that expects a ref to an object . The only way to construct an IntSet on the heap I have found is : .. . .. . This seems to work but feels like a hack . I worry if it only seems to work . Are the structures copied by assign properly cleaned up Is there a better way Is there a more generic way that will work with other objects .. . Answer : Your code is perfectly valid . The resulting reference will be subject to garbage-collection as any other referefence . If you find yourself doing this often you can define the following makeRef template to get rid of the code repetition : .. . .. . Here is an example usage : .. . .. . Which will output : Comment : Ok .. . hmm.. . will this work with IntSet for instance though : you use heapValue initExp . Could this cause problems because the stack value returned by initExp is copied using a shallow copy rather than using assign then if the object has a destructor it will be run when the stack object goes out of scope on the elements pointed to by the heap object Comment : Nim uses a technique similar to C++ s return-value-optimization https : en.wikipedia.org wiki Return value optimization . If you look at the generated code you ll see that the memory for the Foo object is first allocated on the heap and then the address is passed to the createFoo function which performs the construction in-place . There is no copy operation in this particular case . Comment : You didn t answer the question about destructors... . Trying myself I get the warning twice : usage of a type with a destructor in a non destructible context . if I use makeRef with a object with a destructor . So it does seem that nim thinks the object is on the stack at least weather or not it actually puts it there . Perhaps this will be resolved somehow as destructors are .experimental . Comment : PS glot.io snippets ee764h6rwu https : glot.io snippets ee764h6rwu",
"Question : I want to check if a directory exists if not create it . How can I achieve this I tried writeFile since I wanted to create a file in it but that doesn t seem to work . .. . Answer : existsDir : http : nim-lang.org docs os.html existsDir string .. . .. . createDir : http : nim-lang.org docs os.html createDir string .. . .. . So this should work :",
"Question : How would i read from the stdin via nimscript i ve tried : .. . .. . i ve run the script with .. . .. . i receive .. . .. . build.nims 50 13 Error : undeclared identifier : stdin .. . Answer : I don t think nimscript supports reading from stdin just yet . You might want to create a feature request for this : https : github.com nim-lang Nim issues"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
nimrod
|
UNK_RELATION
|
pyface@python@46
|
pyface -- pyface is an enthought library for @placeholder that provides toolkit-independent gui facilities for use with other enthought libraries .
|
{
"confidence": [
108.15028381347656,
84.24266052246094,
74.04853057861328,
58.16162872314453,
52.41546630859375,
48.023597717285156,
46.14552307128906,
42.713768005371094,
38.773704528808594,
38.773704528808594,
36.59739685058594,
32.935455322265625,
32.589996337890625,
32.589996337890625,
31.88558578491211,
31.21244239807129,
30.51692008972168,
21.740779876708984,
18.969892501831055,
18.833303451538086,
18.663570404052734,
16.752063751220703,
16.38573455810547,
16.355140686035156,
15.892290115356445,
15.890244483947754,
15.610620498657227,
15.610620498657227,
15.610620498657227,
15.610620498657227,
15.610620498657227,
15.610620498657227,
15.610620498657227,
15.610620498657227,
15.610620498657227,
15.610620498657227,
15.610620498657227,
15.610620498657227,
15.610620498657227,
15.610620498657227,
15.610620498657227,
15.610620498657227,
15.252043724060059,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
13.547529220581055,
12.178863525390625,
12.178863525390625,
12.178863525390625
],
"content": [
"PyFace is an Enthought library for Python that s supposed to provide toolkit-independent GUI facilities for use with other Enthought libraries .",
"PyFace : GitHub https : github.com enthought pyface .",
"https : github.com enthought pyface commit 83cef1505e7ab131a51a69e5dcdbd9f53060640e",
"The pyface project contains a toolkit-independent GUI abstraction-layer which is used to support the visualization features of the Traits package .",
"The TraitsGUI project contains a toolkit-independent GUI abstraction-layer known as Pyface which is used to support the visualization features of the Traits package .",
"No but it will be possible in a future version of PyFace : I contributed a patch .",
"Is there a way to find out which backend pyface is currently using",
"This issue is mainly because of a missing traitsui dependency in pyface setup.py script .",
"I was just reading about PyFace TraitsUI and TraitsGUI but I have problems to understand the difference between those projects .",
"Pyface should be largely out of sight for most TraitsUI users providing an abstraction-layer between the OS UI and Python .",
"How I can write an OpenGl application using Enthought Framework",
"The traitsui project contains a toolkit-independent GUI abstraction-layer which is used to support the visualization features of the Traits package .",
"TraitsUI : homepage http : code.enthought.com projects traits ui GitHub https : github.com enthought traitsui .",
"TraitsGUI : homepage http : code.enthought.com projects traits gui GitHub https : github.com enthought traitsgui .",
"In the example that you link we happen to be getting it from another PyFace widget that wraps a Qt widget in a similar fashion so we just grab the control attribute from it .",
"Or do I have to resort to the underlying GUI toolkit",
"Trying to run an external program that uses the python backend and after having installed the canopy package after also trying the manual pyface builds I keep getting a weird and seemingly very basic error .",
"The question is about what API call to use to query a somewhat obscure library that bridges components together .",
"Are there no other messages",
"In it s current state your answer might not help other people who are looking for an answer to this question in the future .",
"If you re interested in developing UI s you should definitely take a look at Enaml http : docs.enthought.com enaml a constraints-based markup language for GUI building in Python .",
"Please consult the Qt documentation for how to use it .",
"You can use PyOpenGL http : pyopengl.sourceforge.net in the paintGL etc .",
"Here is how I go about it .. . .. . Some other stuff that fails includes vtk obj.GetShiftKey which just fails to return anything at all .",
"You should just directly use a QGLWidget http : qt-project.org doc qt-4.7 qglwidget.html as the control of your pane .",
"Other keys aside from some special ones that seem to do something already s l q w e etc seem to be detected just fine .",
"Please try to flesh out your answer a bit more .",
"Just posting a code block without explanation or context is not good .",
"While your admonishment is clearly well meaning I completely disagree with it .",
"In my answer this information is succinctly provided .",
"In fact the entire point of posting here is to help people who might be looking for an answer to this question in the future .",
"I realise that but answers on Stack Overflow are expected to be more than just a code dump .",
"In it s current state your answer will not survive .",
"I came across it in the first place because it was already flagged as low quality .",
"Just adding one or two sentences like You can try this : or This will do .. . is enough .",
"If it is deemed to be too low quality -- despite being a correct if possibly incomplete answer to a straightforward and somewhat obscure question -- then the collective moderation of the site should feel free to delete it .",
"I would be pissed if that happened because it is not a bad answer it is also not a great answer .",
"I fail to see how adding You can try this would add to the quality of the answer .",
"It is filler .",
"It would not substantively improve the answer .",
"If a person reviewed this answer and decided that it is a bad answer because it consists only of code necessary to answer the question then in my opinion they made a mistake .",
"If it is not deleted I will add new information to this answer if and when I find new useful information to add .",
"I created a TasksApplication and I am stuck on this tutorial http : docs.enthought.com envisage tasks user-manual layout.html lifecycle-of-a-task I don t know what I can use instead PythonEditor there .",
"I have a software that lets the user choose the database location from the traits.api File trait as shown below : .. . .. . class DbPreferencesHelper PreferencesHelper : dbLocation File .. . .. . class DbPreferencesPane PreferencesPane : view View Item dbLocation label Location of database .. . .. . The user can browse through directories and choose a file .",
"I would like to restrict the directory the user can select a file from .",
"Is there any way I can do that",
"If not could I do it using pyface.api FileDialog",
"Thank you .",
"No there is not a keyword to do that .",
"But it would not be that hard if you are willing to do some programming .",
"I am willing to do some programming but I m not sure how to do it .",
"Were are the default key-bindings strings defined",
"Can I make it beep",
"TraitsGUI is an older name for TraitsUI .",
"The name TraitsGUI is deprecated now : the github repo is there for legacy compatibility .",
"TraitsUI is the main interface for building UI s using Traits .",
"If you ve pushed very far into TraitsUI you may have bumped into some frustrations with getting things laid out the way you want .",
"Enaml allows a lot of really cool layout with a very gentle learning curve .",
"I need to create something where I will be able to render .",
"UPDATE : .. . .. . I changed the code to .. . .. . Where GlWidget is implemented like in this example http : qt.gitorious.org pyside pyside-examples blobs master examples opengl hellogl.py .",
"And I have a runtime crash .",
"But I am able to run the GL script from the example above .",
"UPDATE2 : .. . .. . Log file https : docs.google.com file d 0B5xCwCSQrt7XU3JNajJTVXNWYWs edit usp sharing .. . .. . UPDATE4 : Code was updated according to @Robert Kern suggestions .",
"Now it works .",
"Min Example https : drive.google.com folderview id 0B5xCwCSQrt7XWXRFMzRWYjZaOEU usp sharing .. . .. . MinExample 7z https : drive.google.com folderview id 0B5xCwCSQrt7XWXRFMzRWYjZaOEU usp sharing",
"I m afraid that you will have to provide more information about the crash like copy-pasting the exact traceback .",
"ok .",
"I uploaded the log .",
"I m not seeing an error that is related to a crash just some tracebacks from trying to load optional PyOpenGL components .",
"Why do you think this is a crash",
"Does a window show up then immediately disappear",
"Or does nothing happen",
"Can you post a complete minimal example that demonstrates the problem",
"Two things : Plugin.py still has from Task import Visualization where you should have from Visualization import Visualization .",
"And in your PythonEditorPane which it is time to rename your create method does not assign the GLWidget that you instantiated to self.control .",
"Fix those two things and your example works for me .",
"The control trait of a TaskPane is just the Qt widget object that you are using .",
"methods to do the actual rendering .",
"Pls look at my update .",
"I m trying to have different mouse click behavior when the shift key is held down .",
"However I can not detect when the shift key is pressed .",
"Thanks Chris Snyder",
"Any suggestions would be most welcome",
"This answer may be quite late for you but posting here for everyone s benefit .",
"You can workaround this by manually installing traitsui ."
]
}
|
{
"confidence": [
134.17733764648438,
104.7708511352539,
54.66637420654297,
47.01033401489258,
40.66853332519531,
15.605340957641602,
13.42834758758545
],
"content": [
"Question : PyFace is an Enthought library for Python that s supposed to provide toolkit-independent GUI facilities for use with other Enthought libraries . Can I make it beep Or do I have to resort to the underlying GUI toolkit .. . Answer : No but it will be possible in a future version of PyFace : I contributed a patch . https : github.com enthought pyface commit 83cef1505e7ab131a51a69e5dcdbd9f53060640e",
"Question : I was just reading about PyFace TraitsUI and TraitsGUI but I have problems to understand the difference between those projects . PyFace : GitHub https : github.com enthought pyface . The pyface project contains a toolkit-independent GUI abstraction-layer which is used to support the visualization features of the Traits package . TraitsUI : homepage http : code.enthought.com projects traits ui GitHub https : github.com enthought traitsui . The traitsui project contains a toolkit-independent GUI abstraction-layer which is used to support the visualization features of the Traits package . TraitsGUI : homepage http : code.enthought.com projects traits gui GitHub https : github.com enthought traitsgui . The TraitsGUI project contains a toolkit-independent GUI abstraction-layer known as Pyface which is used to support the visualization features of the Traits package . .. . Answer : TraitsGUI is an older name for TraitsUI . The name TraitsGUI is deprecated now : the github repo is there for legacy compatibility . TraitsUI is the main interface for building UI s using Traits . Pyface should be largely out of sight for most TraitsUI users providing an abstraction-layer between the OS UI and Python . If you re interested in developing UI s you should definitely take a look at Enaml http : docs.enthought.com enaml a constraints-based markup language for GUI building in Python . If you ve pushed very far into TraitsUI you may have bumped into some frustrations with getting things laid out the way you want . Enaml allows a lot of really cool layout with a very gentle learning curve .",
"Question : Trying to run an external program that uses the python backend and after having installed the canopy package after also trying the manual pyface builds I keep getting a weird and seemingly very basic error . Any suggestions would be most welcome .. . Answer : This answer may be quite late for you but posting here for everyone s benefit . This issue is mainly because of a missing traitsui dependency in pyface setup.py script . You can workaround this by manually installing traitsui .",
"Question : How I can write an OpenGl application using Enthought Framework I created a TasksApplication and I am stuck on this tutorial http : docs.enthought.com envisage tasks user-manual layout.html lifecycle-of-a-task I don t know what I can use instead PythonEditor there . I need to create something where I will be able to render . UPDATE : .. . .. . I changed the code to .. . .. . Where GlWidget is implemented like in this example http : qt.gitorious.org pyside pyside-examples blobs master examples opengl hellogl.py . And I have a runtime crash . But I am able to run the GL script from the example above . UPDATE2 : .. . .. . Log file https : docs.google.com file d 0B5xCwCSQrt7XU3JNajJTVXNWYWs edit usp sharing .. . .. . UPDATE4 : Code was updated according to @Robert Kern suggestions . Now it works . Min Example https : drive.google.com folderview id 0B5xCwCSQrt7XWXRFMzRWYjZaOEU usp sharing .. . .. . MinExample 7z https : drive.google.com folderview id 0B5xCwCSQrt7XWXRFMzRWYjZaOEU usp sharing Comment : I m afraid that you will have to provide more information about the crash like copy-pasting the exact traceback . Comment : ok . I uploaded the log . Comment : I m not seeing an error that is related to a crash just some tracebacks from trying to load optional PyOpenGL components . Are there no other messages Why do you think this is a crash Does a window show up then immediately disappear Or does nothing happen Can you post a complete minimal example that demonstrates the problem Comment : Two things : Plugin.py still has from Task import Visualization where you should have from Visualization import Visualization . And in your PythonEditorPane which it is time to rename your create method does not assign the GLWidget that you instantiated to self.control . Fix those two things and your example works for me . .. . Answer : The control trait of a TaskPane is just the Qt widget object that you are using . In the example that you link we happen to be getting it from another PyFace widget that wraps a Qt widget in a similar fashion so we just grab the control attribute from it . You should just directly use a QGLWidget http : qt-project.org doc qt-4.7 qglwidget.html as the control of your pane . Please consult the Qt documentation for how to use it . You can use PyOpenGL http : pyopengl.sourceforge.net in the paintGL etc . methods to do the actual rendering . Comment : Pls look at my update .",
"Question : Is there a way to find out which backend pyface is currently using .. . Answer : Comment : Please try to flesh out your answer a bit more . Just posting a code block without explanation or context is not good . In it s current state your answer might not help other people who are looking for an answer to this question in the future . Comment : While your admonishment is clearly well meaning I completely disagree with it . The question is about what API call to use to query a somewhat obscure library that bridges components together . In my answer this information is succinctly provided . In fact the entire point of posting here is to help people who might be looking for an answer to this question in the future . Comment : I realise that but answers on Stack Overflow are expected to be more than just a code dump . In it s current state your answer will not survive . I came across it in the first place because it was already flagged as low quality . Just adding one or two sentences like You can try this : or This will do .. . is enough . Comment : If it is deemed to be too low quality -- despite being a correct if possibly incomplete answer to a straightforward and somewhat obscure question -- then the collective moderation of the site should feel free to delete it . I would be pissed if that happened because it is not a bad answer it is also not a great answer . Comment : I fail to see how adding You can try this would add to the quality of the answer . It is filler . It would not substantively improve the answer . If a person reviewed this answer and decided that it is a bad answer because it consists only of code necessary to answer the question then in my opinion they made a mistake . If it is not deleted I will add new information to this answer if and when I find new useful information to add .",
"Question : null .. . Answer : I m trying to have different mouse click behavior when the shift key is held down . However I can not detect when the shift key is pressed . Other keys aside from some special ones that seem to do something already s l q w e etc seem to be detected just fine . Here is how I go about it .. . .. . Some other stuff that fails includes vtk obj.GetShiftKey which just fails to return anything at all . Thanks Chris Snyder",
"Question : null .. . Answer : I have a software that lets the user choose the database location from the traits.api File trait as shown below : .. . .. . class DbPreferencesHelper PreferencesHelper : dbLocation File .. . .. . class DbPreferencesPane PreferencesPane : view View Item dbLocation label Location of database .. . .. . The user can browse through directories and choose a file . I would like to restrict the directory the user can select a file from . Is there any way I can do that If not could I do it using pyface.api FileDialog Thank you . Comment : No there is not a keyword to do that . But it would not be that hard if you are willing to do some programming . Comment : I am willing to do some programming but I m not sure how to do it . Were are the default key-bindings strings defined"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
python
|
UNK_RELATION
|
drools-guvnor@drools@64
|
drools-guvnor -- drools-guvnor is a centralised repository for @placeholder knowledge bases with rich web based guis editors and tools to aid in the management of large numbers of rules .
|
{
"confidence": [
79.15631103515625,
71.36763000488281,
69.10954284667969,
69.002197265625,
68.56317138671875,
67.11814880371094,
66.08599853515625,
63.24602508544922,
63.24602508544922,
63.24602508544922,
63.21918487548828,
63.04119110107422,
62.632572174072266,
61.361968994140625,
61.361968994140625,
61.361968994140625,
61.01361846923828,
61.01361846923828,
61.01361846923828,
61.01361846923828,
60.62520217895508,
59.12956237792969,
59.1038818359375,
58.71084976196289,
58.67135238647461,
58.33245849609375,
58.31716537475586,
57.93104553222656,
57.891578674316406,
57.760005950927734,
57.17839813232422,
56.87147521972656,
56.75299835205078,
56.45503616333008,
56.25666809082031,
56.25347900390625,
56.25347900390625,
56.23030471801758,
56.10951614379883,
55.634254455566406,
55.49248504638672,
55.49248504638672,
55.49248504638672,
55.49248504638672,
55.49248504638672,
55.49248504638672,
55.49248504638672,
55.49248504638672,
55.49248504638672,
55.49248504638672,
54.65072250366211,
54.37261199951172,
54.22262954711914,
53.80393981933594,
53.673126220703125,
53.60843276977539,
53.60843276977539,
53.60843276977539,
53.60843276977539,
53.60843276977539,
53.39033508300781,
53.326881408691406,
53.326881408691406,
53.326881408691406,
53.326881408691406,
52.95805740356445,
52.24310302734375,
51.44282913208008,
51.350345611572266,
51.350345611572266,
50.747154235839844,
50.747154235839844,
50.747154235839844,
50.747154235839844,
50.747154235839844,
50.35905075073242,
50.168357849121094,
49.776039123535156,
49.776039123535156,
49.776039123535156,
49.41134262084961,
49.362648010253906,
49.148719787597656,
48.91748046875,
48.863101959228516,
48.736061096191406,
48.55635070800781,
48.27219009399414,
48.071067810058594,
48.071067810058594,
47.91027069091797,
47.854393005371094,
47.53148651123047,
47.47859191894531,
47.280975341796875,
47.24936294555664,
47.055877685546875
],
"content": [
"I am using drools-guvnor 5.5 for storing rules and modify using drools-guvnor web-gui .",
"I am new to drools and guvnor .",
"Drools-Guvnor 5.5.0-Final 2 .",
"I m new to Drools rule-engine and Guvnor .",
"I ve seen that drools-guvnor allows management of rf files .",
"Is Drools Guvnor a lightweight GUI or is there are a way to step it down",
"I m having trouble with the integration of Drools Camel Server and Guvnor. .",
"What is not clear from that answer was how to fix the problem in drools-guvnor .",
"So how can I achieve this in drools-guvnor plugin .",
"Hi I use Guvnor 5.5.0 version and Drools runtime is also 5.5.0",
"In this case using drools-guvnor.5.5.0.Final you need to download two jar files : .. . .. . You should place both jar files in your TOMCAT HOME webapps drools-guvnor WEB-INF lib folder .",
"i followed below link .. . .. . http : examples.javacodegeeks.com enterprise-java jboss-drools jboss-drools-guvnor-example .. . .. . I downloaded java project and guvnor war from the above link itself .",
"Upload it in drools-guvnor in package name called com.sample .. . .. . I read in drools-expert documentation that KnowledgeAgent is used for connect java application with drools-guvnor but i am not able to find any sample code for that .",
"But on how to integrate Java Drools-Guvnor is as follows.. . .. . .. . Hope it is helpful as well .",
"I got same issue in the case of JBPM Drools Guvnor too .",
"Using Drools 5.5.0.Final with Guvnor 5.5.0.Final with the sample mortgages package .",
"My business-rules are on Guvnor business rule editor by JBoss running on a BRMS DROOLS server version 5.4.0",
"Is there an option to delete the rules pojo package anything that we import or create in drools-guvnor",
"This is the piece provided by Drools to automatically reload rules from Guvnor or elsewhere when they are changed .",
"I am trying to use Guvnor UI to create drools rules but getting the following exception .",
"docs.jboss.org drools release 5.4.0.Final drools-guvnor-docs http : docs.jboss.org drools release 5.4.0.Final drools-guvnor-docs html ch04.html d0e1919 can you provide a sample rule with syntax errors that drools fails to deect at validate",
"I want to create a sample application in java which connect with drools-guvnor and load rules from it and execute in java side .",
"From drools-guvnor i have mapped DataInputSet and Association properly .",
"All in all Drools and Guvnor are powerful tools but it s not trivial to get them working .",
"Importantly how Drools Guvnor Expert jBPM Drools Fusion and optaPlanner all relate to",
"Have you tried Drools-Guvnor-5.4.0-Final or 5.5.0-Final or 5.6.0-Final",
"Guvnor manual http : docs.jboss.org drools release 5.4.0.Final drools-guvnor-docs html ch04.html d0e1919 has a nice section describing its use .",
"Try 1 : .. . .. . Returns : .. . .. . Try 2 : .. . .. . Returns : .. . .. . Referring : docs.jboss.org drools release 5.5.0.CR1 drools-guvnor-docs html ch09 dot html .. . .. . Thx",
"I don t understand why drools gives me 2 different sets of rules if I have only written one set of rules with the guvnor tool",
"I have Googled on integrating java web app + Drools + Guvnor and I m not getting anywhere .",
"Search the Guvnor docs for knowledge agent .",
"I am completely new to Drools although I have written very small rules and deployed in Guvnor .",
"The problem is that when I start the drools server it complains that it cannot find the class Message defined in the Import of the Rules. . .. . .. . Below the configuration of the Knowledge-servics.xml .. . .. . This is my rule in Guvnor",
"Using Drools Guvnor 5.5.0.Final with jboss-as-7.2.0.Alpha1-SNAPSHOT server .",
"This questions was answered on the Drools forum : http : drools.46999.n3.nabble.com rules-users-Guvnor-seems-to-copy-assets-across-External-RDBMS-and-file-system-td4021447.html",
"I m stuck with BRL rules in Guvnor. .",
": But essentially Guvnor is just a store for the rules .",
"You have 2 options : 1.- Copy your POJO jar in drools-server classpath 2.- You can programatically get the jar from Guvnor Guvnor exposes it through an url and add it to your classpath .",
"I need KIE Workbench formerly Drools Guvnor to let people graphically create edit jars with Facts and Rules and then store as jars in the local maven repository .",
"We try to switch to Drools 6 with the all new KIE workbench formerly known as Guvnor and the new maven-based artifacts .",
"Guvnor and Drools ran up fine and seemed happy to connect to the Oracle 11g instance .",
"The rule I am creating is as follows : .. . .. . Can drools-guvnor handle the Math functions",
"I understand the top level architectural changes in the guvnor 6.0 or rather drools workbench .",
"We will be having data fed in this database-table regularly and I was wondering if it was possible to import this data on a timely basis into Drools Guvnor",
"When using drools 5.5 deploy new rule using guvnor I got call into KnowledgeAgentEventListener s methods .",
"I am new to drools and java.I want to setup guvnor and use database for storing rules.How should I begin with",
"http : www.jboss.org jbossas downloads .. . .. . Then go to https : www.jboss.org drools downloads and download Workbench the new name for Guvnor .",
"I have referred few questions in stackoverflow on integrating drools app with guvnor and still not clear on this .",
"Thanks anyway I guess I have to read more to understand guvnor and drools",
"If you want to use Drools 6.4 why aren t you using the Kie-Workbench the replacement of Guvnor in 6.x instead",
"Summary .. . .. . I m certain I m not the first and surely not the last to consider options on deployment and change-management with Drools and Guvnor .",
"First here is the complete and correct format for the REST Json request to insert an Applicant instance to the rules engine using drools-server when the model been defined in drools-guvnor GUI interface and not uploaded as a POJO model .",
"This post is for looking insight ideas experience on rule development and deployment when working with Drools rules and Guvnor .",
"The DRL in guvnor will refer to java objects uploaded in guvnor .",
"I like to know how I can execute load rules created using Drools Guvnor from my java application .",
"Any other suggestions on the generally a Simple implementation of Integrating Java Application + Drools + Guvnor would be great .",
"I am using jboss products like GateIn JBPM Drools Guvnor...etc .",
"I am new to Drools Guvnor and have set up a basic rool framework using the same .",
"I m a bit new to Drools and Guvnor myself but I think I can make a suggestion .",
"I am using guvnor-drools and installed in two machines naming node 1 and node 2 .",
"When I had tried deploying Guvnor onto Glassfish I hit the same problem as here http : stackoverflow.com questions 13684673 drools-guvnor-on-glassfish-error .",
"Guvnor uses the JCR standard for storing assets such as rules .",
"It also makes it easier to write rules using Guvnor .",
"I am developing few rules on guvnor plugin .",
"I m building a rules project using Guvnor .",
"My guvnor rule is like : .. . .. . and using stateless knowledge session .",
"More accurately a DRL file is the Drools Rule Language text which can be written with a text-editor or is generated from your input in the Drools IDE Guvnor or its successor in 6.x .",
"How easy to integrate an application to Guvnor to read the rules",
"Environment : .. . .. . I am using drools-guvnor 5.4.0.Final with jbpm-form-builder.war downloaded from the following path .",
"I use Variable definitions to add Process variables and DataInputSet and DataOutputSet to map task inputs and outputs in drools-guvnor .",
"I am using Guvnor JBoss BRMS to manage my drools rule-engine which is deployed within JBoss EAP 5.3 .",
"I am using following code to access Drools Guvnor : .. . .. . Unfortunately KnowledgeAgentFactory class does not seem to be OSGI ready as it uses Class.forName to load agent provider .",
"I have a drools rule created via the Guvnor console and the rule validates and inserts a fact into the working memory if conditions were met .",
"According to https : simplesassim.wordpress.com tag drools-guvnor-rest-api it appears that you may also need to add your file content as a binary argument .",
"1 . fs fsentry .. . 2 . versioning fs fsentry .. . 3 . versioning pm binval .. . 4 . versioning pm bundle .. . 5 . versioning pm names .. . 6 . versioning pm refs .. . .. . I am using guvnor-webapp-drools-5.6.0 application .",
"@Kumar start with the developer guide http : docs.jboss.org drools release 6.0.0.CR4 drools-guvnor-docs html single index.html d0e3422 and if you run into problems ask here on SO .",
"To fix : In Guvnor.. .",
"We use guvnor this way .",
"The point is that they should not be in Guvnor .",
"Guvnor is not the runtime environment .",
"Currently I am using Guvnor in JBoss to sync with the rules from Oracle dabtabase as Repository Server .",
"I haven t written the rules myself I have used guvnor .",
"They don t exist in Guvnor - Guvnor just needs them to be able to compile rules so you can just modify their properties directly .",
"To properly delete your archived rules and packages go to the admin screen where there is a link which lets you view your archived items : .. . .. . http : docs.jboss.org drools release 5.5.0.Final drools-guvnor-docs html single d0e3275 .. . .. . You can then select a package and click Permanently delete package .",
"I tried to follow this link- http : www.javacodegeeks.com 2012 04 drools-guvnor-manage-access.html but it didnt work and I am clueless .",
"It is no longer part of drools distribution since drools 6 .",
"In my case three specific Drools changes were required to get Drools Guvnor 5.5.0.Final working with JBoss EAP 6 which is based on AS 7.1 and should translate to AS 7.2 : fix the XML replace seam-security and patch a Guvnor file .",
"I had issues in a Tomcat-8 JDK7 environment and had to test all point release versions of the Drools-Guvnor 5.x war to find the right war that would work reliably in my specific configuration .",
"Please define which version of Guvnor .",
"The steps for deploying Guvnor 5.4 are : .. . .. . 1 .",
"Guvnor does not .",
"See https : community.jboss.org thread 206645 https : issues.jboss.org browse GUVNOR-1989 https : issues.jboss.org browse GUVNOR-1976 http : drools.46999.n3.nabble.com How-configure-Guvnor-5-4-JAAS-with-jboss-7-0-2-td4020424.html and http : drools.46999.n3.nabble.com rules-users-Error-JAAS-Authentication-with-Guvnor-5-5-0-and-Authorization-Error-tt4023826.html for background info .",
"Does Drools support a lightweight GUI for editing the rules",
"I have created 3 rules using guided editor on guvnor plugin .",
"Unfortunately Drools in general and Guvnor in particular has a bunch of quirks which you may have to work around for instance you have to explode the Guvnor WAR file and edit files in WEB-INF beans.xml to set up a non-default configuration.. . .",
"I m new in Drools and Jboss tools .",
"Also it would not make sense to do this as the only reason to have a decision table in Guvnor is to enable editing of it in Guvnor ."
]
}
|
{
"confidence": [
100.73483276367188,
98.09091186523438,
92.9166488647461,
92.87876892089844,
91.85972595214844,
90.45996856689453,
89.76530456542969,
88.67839813232422,
87.26111602783203,
87.03650665283203,
87.0141372680664,
86.37309265136719,
86.04029083251953,
85.41925811767578,
85.24948120117188,
84.90011596679688,
83.95663452148438,
83.62109375,
83.4656753540039,
82.27820587158203
],
"content": [
"Question : I am using drools-guvnor 5.5 for storing rules and modify using drools-guvnor web-gui . I want to create a sample application in java which connect with drools-guvnor and load rules from it and execute in java side . Steps I followed for this as below . 1 . Create a sample Decision Table in excel . 2 . Upload it in drools-guvnor in package name called com.sample .. . .. . I read in drools-expert documentation that KnowledgeAgent is used for connect java application with drools-guvnor but i am not able to find any sample code for that . Can someone please help me on this issue . .. . Answer : Example code for creating a knowledge agent is in the Drools Expert user guide . http : docs.jboss.org drools release 5.5.0.Final drools-expert-docs html single d0e2239 .. . .. . The following is a commented version of the code found in that section of the manual .",
"Question : I m having trouble with the integration of Drools Camel Server and Guvnor. . Version 5.5.0 .. . .. . I ve created a JAR which contains POJO and used it in Guvnor to create a BRL rule in the future will be created by not technical people . . The problem is that when I start the drools server it complains that it cannot find the class Message defined in the Import of the Rules. . .. . .. . Below the configuration of the Knowledge-servics.xml .. . .. . This is my rule in Guvnor .. . Answer : The binary package doesn t contain the java classes . You have 2 options : 1.- Copy your POJO jar in drools-server classpath 2.- You can programatically get the jar from Guvnor Guvnor exposes it through an url and add it to your classpath . Hope it helps Comment : Yep I copied the jar in the drools-server classpath. . I didn t know the other option thanks",
"Question : null .. . Answer : I have referred few questions in stackoverflow on integrating drools app with guvnor and still not clear on this . I have standalone drools application the rules in DRL file uses custom java classes that are part of my application . For Guvnor integration I have uploaded the DRL file under appropriate package and uploaded required class files as an individual model JAR . I use knowledgeAgent in standalone application and changeset xml pointing to package URL which guvnor exposes as suggested in this http : stackoverflow.com questions 11222954 how-and-is-it-worth-to-integrate-java-webapp-drools-guvnor post and below exception is thrown .. . .. . java.lang.RuntimeException : KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage .. . at org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource KnowledgeAgentImpl.java : 796 at org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase KnowledgeAgentImpl.java : 1103 at org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources KnowledgeAgentImpl.java : 844 at org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase KnowledgeAgentImpl.java : 684 at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet KnowledgeAgentImpl.java : 207 at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet KnowledgeAgentImpl.java : 186 Caused by : java.io.IOException : Server returned HTTP response code : 500 for URL : http : localhost.com guvnor-5.5.0.Final-tomcat-6.0 org.drools.guvnor.Guvnor package com LATEST at sun.net.www.protocol.http.HttpURLConnection.getInputStream Unknown Source at org.drools.io.impl.UrlResource.grabStream UrlResource.java : 210 at org.drools.io.impl.UrlResource.getInputStream UrlResource.java : 146 at org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource KnowledgeAgentImpl.java : 759 .. . 8 more .. . .. . Can someone help me with step by step activities involved in integrating Drools application with Guvnor Thanks in advance Comment : Couple of questions . Have you built your package successfully What do you see if you go to the following in your web browser localhost.com guvnor-5.5.0.Final-tomcat-6.0 http : localhost.com guvnor-5.5.0.Final-tomcat-6.0 org.drools.guvnor.Guvnor package com LATEST Comment : @Steve There were issues while building the package in guvnor and I removed all unwanted code in DRL and now the package is built successfully . When executing the standalone application pointing to localhost : 8080 guvnor-5.5.0.Final-tomcat-6.0 rest packages http : localhost : 8080 guvnor-5.5.0.Final-tomcat-6.0 rest packages com.myfirstapp source the application runs fine and it does nothing on my custom objects . Comment : Sounds like a good start . If you need help with the app doing nothing you ll need to show code inserting facts and the DRL . You may find some of the following to be useful tools : github.com gratiartis sctrcd-payment-validation-web blob master https : github.com gratiartis sctrcd-payment-validation-web blob master src main java com sctrcd drools util TrackingAgendaEventListener.java and github.com gratiartis sctrcd-payment-validation-web blob master https : github.com gratiartis sctrcd-payment-validation-web blob master src main java com sctrcd drools util TrackingWorkingMemoryEventListener.java .. . which can be handy for logging what is in working memory and your rule activations . Comment : @Steve I have already enabled the log using the code : KnowledgeRuntimeLogger logger KnowledgeRuntimeLoggerFactory.newConsoleLogger ksession and it tracks the execution details . I see only 2 activities are getting executed OBJECT ASSERTED ACTIVATION CREATED for all my rules . I badly need to understand how it works. . The DRL in guvnor will refer to java objects uploaded in guvnor . From standalone application if i point to guvnor DRL and run application how will the pojo attributes will get updated in standalone program after the rules get executed basically 2 diff JVM right Comment : Sounds like the basics are working . object asserted means that a fact has been inserted into the session . activation created means that one of your rules fired . All the Java objects are local to your application one JVM They don t exist in Guvnor - Guvnor just needs them to be able to compile rules so you can just modify their properties directly . Similarly you can invoke static-methods .",
"Question : I am planning on introducing Java rules and currently in the process of evaluating Drools to externalize physically and logically the business-rules from the application . Since these business-rules would be very often by the business I would want the business to make necessary changes to the rules via GUI . I have Googled on integrating java web app + Drools + Guvnor and I m not getting anywhere . My Questions : .. . .. . 1 . Does Drools support a lightweight GUI for editing the rules 2 . Is Drools Guvnor a lightweight GUI or is there are a way to step it down 3 . How easy to integrate an application to Guvnor to read the rules Any other suggestions on the generally a Simple implementation of Integrating Java Application + Drools + Guvnor would be great . Any pointers to tutorials would also do it for me . Comment : Here is the outcome of my analysis on the various Rules Frameworks . Hope this helps blog.sudhakarduraiswamy.in java http : www.blog.sudhakarduraiswamy.in java what-is-rules-engine-and-brief-analysis-of-whats-available-in-the-market .. . Answer : The above answer is well explained . But on how to integrate Java Drools-Guvnor is as follows.. . .. . .. . Hope it is helpful as well .",
"Question : I set up SQL Server as the external repository and left everything else in guvnor and jboss AS7 configured pretty much according to defaults . When I create assets in guvnor I see that changes are being made in the MSSQL db . Despite changes to the db however I m still seeing changes to the Repository and Workspace folders . It gets more interesting when I truncate the tables in the external guvnor db and restart guvnor it seems to get all of its assets back from those two folders . Am I doing something wrong Is it reconstructing the assets from lucene indexes If MSSQL is already indexing things is the lucene index still necessary Are these basic JCR concepts that I am not grasping Thanks Yuri .. . Answer : This questions was answered on the Drools forum : http : drools.46999.n3.nabble.com rules-users-Guvnor-seems-to-copy-assets-across-External-RDBMS-and-file-system-td4021447.html",
"Question : Using Drools 5.5.0.Final with Guvnor 5.5.0.Final with the sample mortgages package . When submitting REST json request with the following Batch Execution Command : .. . .. . returns : 500 Internal Server Error .. . .. . The Applicant class is defined in the mortgages package within an XSD like so : .. . .. . How can I tell drools where to find the Applicant class which is defined in the mortgage sample as an XSD file .. . .. . knowledge-services.xml currently looks like this : .. . .. . I suspect that changing the REST json request to fully specify the package name for Applicant class might work . But can t seem to find where the fully qualified package name for Applicant is declared Acceptable answer must show an example which works without having to write java code since the whole point of the REST interface is to access drools through a web service interface . Is there a spring configuration or some other way to write the json request that will work .. . Answer : Since no one replied I am posting the answer that worked for me along with the root cause and step-by-step procedure I used to debug the problem . Please do comment if there is a better way . First here is the complete and correct format for the REST Json request to insert an Applicant instance to the rules engine using drools-server when the model been defined in drools-guvnor GUI interface and not uploaded as a POJO model . Root cause : TOMCAT HOME webapps drools-server WEB-INF classes knowledge-services.xml had incorrect resource . The relevant parts of my corrected knowledge-services.xml : .. . .. . Secondary issue : The authentication credentials were not specified in knowledge-services.xml which resulted in this error : .. . .. . Third issue : The example mortgage package was not built as a binary package in Guvnor . To fix : In Guvnor.. . Packages. . mortgages..Edit..build package .. . .. . Additional note : INFO level logging is not enabled by default in drools-server . To enable extra logging so that you can see detailed debug messages in TOMCAT HOME logs catalina.log follow these steps : .. . .. . 1 . Go to TOMCAT HOME webapps drools-server WEB INF classes .. . 2 . create a file logging.properties .. . 3 . add these lines : .. . .. . org.apache.catalina.core.ContainerBase . Catalina .level INFO org.apache.catalina.core.ContainerBase . Catalina .handlers java.util.logging.ConsoleHandler .. . .. . HTH Comment : Hi I would like to integrate drools with my jersey rest web-services . In rest all the condition will be generated and then inserted in to drools engine to get the matched rules . How to integrate with the jersey rest web service . Please give me a step by step guidence . I am very new in this . Please help . Thanks . Kumar Shorav",
"Question : Is there an option to delete the rules pojo package anything that we import or create in drools-guvnor Guvnor version is 5.5.0 Deployed on Tomcat 7.0.21 Comment : Yes . If you let us know which version of Guvnor you are using we might even be able to explain how . Comment : @Steve Guvnor version is 5.5.0 please help me in resolving this issue . .. . Answer : I don t have a running installation of that version of Guvnor at the moment so the following is based on memory . Hopefully it s close to what you need . If you access the package screen one of the drop-down menus has an archive option . Archive anything you wish to delete . However when you archive a resource it is not deleted . To properly delete your archived rules and packages go to the admin screen where there is a link which lets you view your archived items : .. . .. . http : docs.jboss.org drools release 5.5.0.Final drools-guvnor-docs html single d0e3275 .. . .. . You can then select a package and click Permanently delete package . Alternatively tick the check-box against any archived items you are ready to delete permanently and click Delete selected asset . Comment : Thanks it worked",
"Question : We will be having data fed in this database-table regularly and I was wondering if it was possible to import this data on a timely basis into Drools Guvnor Comment : Can you be any more specific Do you want to control the whole logic through a database or only the properties of the decision table It is possible to make direct connection to DB from Drools or you could simply insert your facts to working memory based on the data in DB Comment : There s nothing out of the box . Also it would not make sense to do this as the only reason to have a decision table in Guvnor is to enable editing of it in Guvnor . And every time the database-table was updated you would be replacing all of those edits . Comment : Hi I just want to store the properties of the decision table . I understand the drawbacks of this but the client doesn t want to use Guvnor s interface for editing the rules . .. . Answer : If you want to maintain rules in a database-table then you should be looking at rule templates : .. . .. . http : docs.jboss.org drools release 6.0.1.Final drools-docs html single index.html d0e4969 .. . .. . Rule templates provide a relatively simple mechanism for merging DRL with data . FWIW - The documentation for this in the manual is poor so here is a hint on the kind of thing you need to do : .. . .. . To generate rules from a combination of database data and a template you will need to import org.drools.template.jdbc.ResultSetGenerator . This class can be used to generate DRL code from a database query result set and a template . Then you create a package through the API and add that generated DRL to it . Comment : Yes we have tried to use rule templates and upload them manually in Drools . Is there a way to automatically feed the data in these spreadsheets in Guvnor I would prefer feeding directly from the DB which the client would just update through an interface but I m all open for any options . Comment : The point is that they should not be in Guvnor . Guvnor is not the runtime environment . It is a place for editing rules . Therefore if you intend to maintain rules in a database-table then those rules should not be in Guvnor . Comment : I understand your point . The only thing is that there is an immense amount of combinations for the available data which would prove difficult to manage in Guvnor s interface . I obviously am not an expert on this which is probably why I m having a hard time understanding what can and what cannot go into Guvnor . Comment : The rule templates that you can create in Guvnor are completely different things from the Expert rule templates . Or at least how you use them is completely different . I have added some example code above demonstrating how to generate DRL from a database result set and an Expert template . Comment : I will look into this thank you very much for the help .",
"Question : I am planning on introducing Java rules and currently in the process of evaluating Drools to externalize physically and logically the business-rules from the application . Since these business-rules would be very often by the business I would want the business to make necessary changes to the rules via GUI . I have Googled on integrating java web app + Drools + Guvnor and I m not getting anywhere . My Questions : .. . .. . 1 . Does Drools support a lightweight GUI for editing the rules 2 . Is Drools Guvnor a lightweight GUI or is there are a way to step it down 3 . How easy to integrate an application to Guvnor to read the rules Any other suggestions on the generally a Simple implementation of Integrating Java Application + Drools + Guvnor would be great . Any pointers to tutorials would also do it for me . Comment : Here is the outcome of my analysis on the various Rules Frameworks . Hope this helps blog.sudhakarduraiswamy.in java http : www.blog.sudhakarduraiswamy.in java what-is-rules-engine-and-brief-analysis-of-whats-available-in-the-market .. . Answer : I m in the process of doing something akin to what you want to do . Since these business-rules would be very often by the business I would want the business to make necessary changes to the rules via GUI . .. . .. . WARNING WARNING WARNING It s a common misconception that as long as there s a GUI non-programmers can use it . That s.. . not the conclusion I ve come to . It helps but the hard part of programming isn t writing code it s coming up with good solutions to the right problems . I m certain some of the more intelligent and technically inclined business folks can do stuff with Guvnor but don t expect it to be some kind of yellow brick road to the Land of Magical Bliss . You still have to provide the business people with a sane data model and API which lets them do what they need but which prevents them from doing by accident what they don t want to do . 1 . Does Drools support a lightweight GUI for editing the rules .. . .. . 2 . Is Drools Guvnor a lightweight GUI or is there are a way to step it down .. . .. . Well lightweight is subject for discussion but Guvnor works fairly well and doesn t require more than a browser so I think it s OK . .. . .. . 3 . How easy to integrate an application to Guvnor to read the rules .. . .. . Well once you ve got Guvnor up and running wiring up your application to use a KnowledgeAgent to connect to Guvnor and listen for new rule updates isn t particularly hard . Unfortunately Drools in general and Guvnor in particular has a bunch of quirks which you may have to work around for instance you have to explode the Guvnor WAR file and edit files in WEB-INF beans.xml to set up a non-default configuration.. . . But once you ve got that straightened out I think it works pretty well . As for documentation the Javadocs can be a bit sparse at times but the web site http : www.jboss.org drools documentation has some pretty good stuff and including several books . All in all Drools and Guvnor are powerful tools but it s not trivial to get them working . If you really need what they have to offer they re worth it but it might also be worth considering if a simpler scripting solution will suffice . .. . .. . Now if you find yourself actually needing Drools here s my top piece of advice - keep separate data models for your database and your rules . It does mean there s a lot of boring conversion code to write but it s well worth it . The app I m working on uses JPA for database matters and it wouldn t have been very pleasant to use that data model in our rules . Several reasons : .. . .. . What s fits your data-layer doesn t necessarily fit Drools and vice versa . .. . .. . We have a tree structure which in JPA naturally is a @OneToMany relation with the children in a list in the parent node . Working with lists in Drools was rather painful so we flattened it to a structure where we insert one ParentNode object and a bunch of ChildNode objects which was far easier to work with . Dare to refactor . .. . .. . The rule s data model needs to live inside of Guvnor too - and that means you could break all rules if you rename an entity class or something like that . A separate data model for rules means you can refactor your database stuff without worries . Show them what they need to see . .. . .. . Databases can grow fairly complex but the rules normally don t need to care about many of these complexities . Exposing these complexities to the people editing rules can cause a lot of unnecessary confusion . For example we ve found that for our scenarios there s absolutely no need to expose rule writers to many-to-many relationships which proved very complicated to handle in Drools - so we make them look like one-to-many instead and everything becomes more natural . Protection . .. . .. . We ve designed most our rules to work like this pseudo-code : .. . .. . .. . and so for each rule package it s clearly defined which response commands you can insert and what they do . After we ve run the rules in our app we pick out the objects inserted into the session by the rules and act upon them the visitor pattern https : secure.wikimedia.org wikipedia en wiki Visitor pattern Java example has proven very useful to avoid long if instanceof else if instanceof else chains . I m very happy we did it this way instead of letting the rule writers do whatever they think they want to do with our JPA objects . Anyway hope this helps . Comment : +1 For the warning about non-programmers writing rules . Comment : +1 thorough answer .. . i love this forum : Comment : Hi gustafc I would like to integrate drools with my jersey rest web-services . In rest all the condition will be generated and then inserted in to drools engine to get the matched rules . How to integrate with the jersey rest web service . Please help . Thanks Comment : @Kumar start with the developer guide http : docs.jboss.org drools release 6.0.0.CR4 drools-guvnor-docs html single index.html d0e3422 and if you run into problems ask here on SO .",
"Question : I m new to using drools and guvnor .. . .. . I have deployed a tomcat server that serves business-rules .. . .. . The problem is that I get two different answers if I use code that goes against the server with type DRL or with PKG .. . .. . If I go against the server with DRL type I get one result .. . .. . http : localhost : 8180 guvnor org.drools.guvnor.Guvnor package PkgDinamicoBV LATEST.drl .. . .. . property name type value DRL .. . .. . If I go against the server with PKG type I get a different .. . .. . http : localhost : 8180 guvnor org.drools.guvnor.Guvnor package PkgDinamicoBV LATEST .. . .. . property name type value PKG .. . .. . I don t understand what I have to do to get both ways to access the server to produce the same result .. . .. . I have build the package in guvnor so I expected to get the same result in both ways to access my local server .. . .. . Many thanks for your help .. . .. . Simar Comment : the links you provided point to your local machine and we dont have access to your local machine : Comment : Of course . I have explained myself badly . What I don t understand is why I get 2 different results going to the same server but in 2 different ways . Comment : can t really say if you dont show your outputs for both cases Comment : Thanks anyway I guess I have to read more to understand guvnor and drools .. . Answer : DRL and PKG are file types for two different things . Compared to the programming language C they correspond to .c and .o . More accurately a DRL file is the Drools Rule Language text which can be written with a text-editor or is generated from your input in the Drools IDE Guvnor or its successor in 6.x . A DRL file must be compiled by the Drools DRL compiler used in the Builder the result is a binary Rule Package file the .PKG . For creating a Rule Base and from it in turn a session you may use the rule package . Comment : Thanks for your explanation . Why I don t understand is how I get 2 different results from the same rules . I haven t written the rules myself I have used guvnor . I don t understand why drools gives me 2 different sets of rules if I have only written one set of rules with the guvnor tool",
"Question : I have imported the DRL file and required pojo as individual jar file in guvnor . I could see the dependent classes appearing as fact for individual rule and Guvnor exposes those rules via URL . I use changeset to consume the URL and apply the rules for my data . When I do that I get below exception message for all the class I imported in the DRL file . Unable to Analyse Expression .. . .. . Error : unable to resolve method using strict-mode : org.drools.spi.KnowledgeHelper . .. . .. . Can someone help me in resolving this issue Thanks in advance Comment : Please define which version of Guvnor . Comment : Hi I use Guvnor 5.5.0 version and Drools runtime is also 5.5.0 Comment : @Steve can you please help me in resolving this issue Comment : @Steve I have mentioned dialect as java and now the error message is gone . But I still did not succeed in what I m doing . I have a standalone drools app which has DRL file that validates my incoming data and flags the erroneous data . Say I have an user object to validate age check eligibility for voting In my DRL the user object will be imported and rule defined for age check . In case of erroneous message I will set something in user object itself . How do I make this whole thing available in Guvnor for runtime rule updation Comment : I suspect you may need to create a new question around that . : But essentially Guvnor is just a store for the rules . You application needs to run separately and load in the rules from a remote Guvnor instance . Search the Guvnor docs for knowledge agent . This is the piece provided by Drools to automatically reload rules from Guvnor or elsewhere when they are changed . .. . Answer : Without seeing the DRL I ll take a guess . I suspect that you re using the mvel dialect but your DRL is doing things which assume the Java dialect . Try changing that . You can see an example of this here : .. . .. . Throwing exception in Guvnor Guided Editor Rule http : stackoverflow.com questions 19194122 throwing-exception-in-guvnor-guided-editor-rule .. . .. . If you post the DRL then I may well need to reconsider and change delete this answer . :",
"Question : null .. . Answer : I m working on a project that involves creating work-flows in Drools flow . I have a lot of rule flow rf files that I want to be available for viewing through a web UI . I ve seen that drools-guvnor allows management of rf files . But it seems that it does not allow users to view them only downloading works . I ve also heard that the bpmn file-format works with Guvnor but in my work-flows i need to use global objects which i don t think are supported . So my queries are Is there a way to display rf files on Guvnor and Can globals be used in bpmn files Comment : No matter It seems that I was using an outdated version of drools . The latest version along with the eclipse-plugin allows creation of BMPN2 processes which can handle globals and imports . Moreover the eclipse-plugin allows conversion from rf to bpmn easily",
"Question : I am new to Drools Guvnor and have set up a basic rool framework using the same . I just want to know if current Drool file is correct or not . As of now I have no way except running it end-to-end . Is there any to check compilation issues immediately EDIT : .. . .. . When we have syntax errors for example string.Contains instead of string.contains validate verify pass successfully and so does Build Package option . Let me know If I am missing anything . Apart from this I don t have much idea about QA section in fact we haven t put any test there . Thanks .. . Answer : In Guvnor you can .. . .. . 1 Validate individual rules by Source - Validate menu can be seen when rule is open .. . .. . 2 Define and run a test scenario using QA section . Guvnor manual http : docs.jboss.org drools release 5.4.0.Final drools-guvnor-docs html ch04.html d0e1919 has a nice section describing its use . 3 Use Validate Configuration and Build Package buttons on Edit tab of your package . This will compile all rules in your package . I suggest you use use validate menu on every edit to a rule and write test scenarios that cover 100 of your rules . Comment : when we have syntax errors say string.Contains instead of string.contains validate passes successfully and so does third option . Let me know If I am missing anything . Apart from this I don t have much idea about QA section in fact we haven t put any test there . I will try that any good tutorial examples will be helpful . Thanks Comment : You can see the chapter in Drools manual about test scenarios . docs.jboss.org drools release 5.4.0.Final drools-guvnor-docs http : docs.jboss.org drools release 5.4.0.Final drools-guvnor-docs html ch04.html d0e1919 can you provide a sample rule with syntax errors that drools fails to deect at validate Comment : if string.Contains hello although C should be c in contains Drool s Validate Verify don t detect it . Comment : I have tried the contains example and Guvnor 5.4 gave the correct error messages . Can you please post the rule in question Comment : I am using Drools 5.3 . Can it be the reason",
"Question : Below is the screen of jboss guvnor 5.5 building and deploying a package . enter image description here http : i.stack.imgur.com AZbrG.png .. . .. . what is the equivalent process of creating snapshot for deployment in guvnor 6.0 cr3 In other words I am looking on deploying rules written using guvnor 6.0 and execute it from a java application . where the changeset.xml holded the snapshot url of the package . I understand the top level architectural changes in the guvnor 6.0 or rather drools workbench . But I could nt find a way to deploy rules and execute from an java application . .. . Answer : As far as I know Guvnor will create a maven artifact containing the package assets . You then use that artifact to instantiate a kbase ksession . BTW forget about KnowledgeAgent . It is no longer part of drools distribution since drools 6 . Hope it helps Comment : Can you point to an example showing how to instantiate a kbase session on a maven artifact that will be of great help . Comment : @Esteban Aliverti : Please provide some example on connecting Guvnor to java application . Comment : I don t know if there is any integration test . I haven t checked the code lately . You should ask in Drools mailing list . More information about the way Drools 6 handles kieSessions and kieBases can be found here : blog.athico.com 2013 10 configuration-and-convention-based.html http : blog.athico.com 2013 10 configuration-and-convention-based.html",
"Question : I am new to drools and java.I want to setup guvnor and use database for storing rules.How should I begin with I have been trying to figure it out but haven t clearly understood how to start . .. . Answer : If you want to get an idea of the things you can do in workbench you re best off starting with the videos here : .. . .. . http : blog.athico.com 2013 12 drools-60-workbench-and-editor-videos.html .. . .. . It s a web application so you need a web server first . JBoss AS is the only web server on which it is tested properly so go and download that if you want to avoid spending your learning time trying to get Guvnor Workbench working on Tomcat Jetty Glassfish WebSphere etc . http : www.jboss.org jbossas downloads .. . .. . Then go to https : www.jboss.org drools downloads and download Workbench the new name for Guvnor . Deploy it on your web server and browse to it . And then just follow the instructions in the documentation : .. . .. . http : docs.jboss.org drools release 6.0.1.Final drools-docs html single index.html d0e13220 .. . .. . Note that Workbench does not store rules in a database earlier versions did it now uses Git . Comment : Hey thanks for your response.Can you please tell me what will fit in my use-case using database will help or something else Rules in my case are values like if a 5 b abcd then c jkl and d asd . These values needed to be updated in real-time . Comment : If you re looking at ongoing updates to values over time you should read the section on Complex Event Processing : docs.jboss.org drools release 6.0.1.Final drools-docs http : docs.jboss.org drools release 6.0.1.Final drools-docs html single index.html DroolsComplexEventProcessingChapter Comment : Let me tell you my use-case clearly.Based on values of some attributes values of other attributes are decided.Attributes are not gonna change just their values will change.I want further processing should take place on these updated values.And these values will be added or updated frequently.So I am asking database is good solution to store values and rule-engine forming rules fetching those values at run time . Comment : One more thing when I say I want to store rules in database I mean individual value combination of attributes not rule files.Like mentioned here : stackoverflow.com questions 4392664 http : stackoverflow.com questions 4392664 drools-storing-rules-in-database Comment : Generally the database interactions won t happen in the rules . You need to insert facts into working memory . These facts can be Java classes which have been marshalled from values held in a database if you like . You should really just start at the beginning and work through some tutorials before designing your application any further .",
"Question : We try to switch to Drools 6 with the all new KIE workbench formerly known as Guvnor and the new maven-based artifacts . Now I d like to use the the system described in this blog post http : blog.athico.com 2013 12 deployment-with-drools-60.html in the second image Deployment : Loading the rules via HTTP from the workbench repository the dotted arrow going from HTTP on the left directly into the application . The problem is that I have no idea how to load the artifact into my KieServices KieModule object . I basically do not want to use maven I also cannot provide the path to maven s settings.xml globally as a Java parameter so this option is out . I think that a similar issue is this one http : stackoverflow.com questions 20995133 why-does-loading-drools-6-kie-jar-into-code-fail . As mentioned there I also tried to load an URL resource but the problem seems to be that the system cannot determine what kind of ResourceType the given URL http : localhost : 8080 kie-drools maven2 .. . -1.0.0.jar is . And yes I can access the .jar from the repository directly from the browser without authentication . Any ideas or tutorials how to do this My testing code : .. . .. . The error : .. . .. . Thanks in advance .. . Answer : Here are the steps All the steps are mandatory .. . .. . Add kie-clie dependency in your pom .. . .. . dependency .. . groupId org.kie groupId .. . artifactId kie-ci artifactId .. . version 6.2.0.Final version .. . dependency .. . .. . .. . Add your KIE workbench maven repo to your POM .. . .. . repository .. . id guvnor-m2-repo id .. . name Guvnor M2 Repo name .. . url http : localhost : 8080 drools maven2wb url .. . repository .. . .. . .. . Provide your repo credentials into settings.xml .. . .. . server .. . id guvnor-m2-repo id .. . username admin username .. . password @dmin password .. . server .. . .. . .. . Java code .. . .. . KieServices ks KieServices.Factory.get .. . ReleaseId releaseId ks.newReleaseId groupID artifactID LATEST .. . KieContainer kieContainer ks.newKieContainer releaseId .. . KieSession kieSession kieContainer.newKieSession .. . kieSession.insert object .. . kieSession.fireAllRules",
"Question : I am using Guvnor JBoss BRMS to manage my drools rule-engine which is deployed within JBoss EAP 5.3 . I ve altered Guvnor to use an Oracle 11g instance for it s RDBMS . I used Guvnor to generate a new repository.xml and placed this into bin folder of the JBoss directory . Guvnor and Drools ran up fine and seemed happy to connect to the Oracle 11g instance . I then proceeded to create a package and add a new rule . The rule I added is below : .. . .. . I validated this rule and then rebuilt the package . Everything worked fine However I then proceeded to add a function above the rule with the intention of using this in the rule . The rule altered to what is below : .. . .. . I validated this rule and rebuilt the package . However an error was then thrown up . It was unable to save the item . In my JBoss logs the following error was shown Note : not the complete stacktrace only added what I believe to be the root cause .. . .. . When Drools Guvnor is using the default DBMS solution the rule validates and builds fine . It s since moving the DBMS to Oracle 11g that the rule can no longer be validated and the package built . I m at a loss as to why this is happening . Any help offered would be much appreciated . Thanks .. . .. . UPDATE Right I found what I believe is the problem . There was something I missed in the example above which I have found to be the cause of the error . I am using the Math functions java.lang.Math and this seems to cause the error shown above . The rule I am creating is as follows : .. . .. . Can drools-guvnor handle the Math functions If not how do I go about using this Thanks Comment : Have you tried exporting the repository.xml and importing it instead of replacing the original repository.xml in the bin folder Comment : Hi jBug I can t find the option to import a repository there is only export . .. . Answer : It seems like there is a problem with your db configuration guvnor jackrabbit might not be able to create all the necessary tables in the oracle repository . try to do a fresh db connection to a new oracle schema . Comment : Hi alikox I ll give this a whirl and see how if it fixes the problem . Comment : One thing I did create a new schema and it appears to have created all the tables . The table referenced in the exception is present it s just trying to insert null into it for some reason . Comment : I tried what you suggested alikox and that didn t work . I m tempted to go back to using the default JackRabbit solution provided by Guvnor out of the box Comment : @ScreamingMage Sorry to hear that . The reason I suggested this possibility was I had encountered a similar error when using Oracle 10g repository and Guvnor could not create all of its tables due to a Locale difference .",
"Question : Any examples for accessing Guvnor server using cURL Try 1 : .. . .. . Returns : .. . .. . Try 2 : .. . .. . Returns : .. . .. . Referring : docs.jboss.org drools release 5.5.0.CR1 drools-guvnor-docs html ch09 dot html .. . .. . Thx .. . Answer : This worked for me on Guvnor 5.5.0.Final under Tomcat 7 .. . .. . Using : .. . .. . Returns : .. . .. . Troubleshooting : .. . .. . This error occurs because resteasy no longer includes json support in the jars according to this post http : stackoverflow.com questions 5080633 could-not-find-jaxbcontextfinder-for-media-type-application-json by @sstarcher . What is not clear from that answer was how to fix the problem in drools-guvnor . In this case using drools-guvnor.5.5.0.Final you need to download two jar files : .. . .. . You should place both jar files in your TOMCAT HOME webapps drools-guvnor WEB-INF lib folder . which looks like this on some systems : .. . .. . Next stop and restart the webserver . On Tomcat from the TOMCAT HOME bin directory you can use the . shutdown.sh and . startup.sh commands . 401 - Unauthorized . This occurs if you don t use the -u user : pass optional argument . Out of the box guvnor uses a fake basic authenticator which requires headers to work . 404 -Not Found . This error will occur if you have not specified the correct name of the directory or resource in the request . 405 - Method Not allowed . Happens when you mangle the curl options forget quotes etc . 406 - Not Acceptable . This error will occur if you specified an unsupported Accept : Header using the -H option for curl . HTH",
"Question : I m stuck with BRL rules in Guvnor. . I m trying to execute rules from my application using Drools Server this solution because in production I can use more server and maybe improve performance. . Not sure about this as it s the first time that in my company we are using Drools . . So basically the rule is . . Given an object Route setting the property selectedOutboundJourney that I uploaded in guvnor in a jar I d like to get another object with the property selectedReturnJourney set. . but Is it possible to get the same object Actually I get a Route object where the selectedReturnJourney is null . I m not sure if using BRL is a good solution given the troubles that I m having. . It seems easy to use for non technical people that may want to change the rules or creating new ones . Anyway. . This is the BRL that I created in Guvnor : .. . .. . This is the code I m using : .. . .. . The class DroolsHttpClient is : .. . .. . If I use a DRL like below it words perfectly without using the getObjectCommand : .. . .. . Can anyone help me out please .. . Answer : Assuming you only have one fact in your Knowledge Session at the start after the execution of the following rule .. . .. . you will have two Route facts in your session since you just have inserted the second one . If you want to modify the original fact use the following rule : Comment : Thanks a lot At this point I don t see any reason to create BRL in Guvnor because the THEN section contains only Insert Fact and Logically Insert Fact . . no mention about modify in the docs. . Comment : If you assign a name to your fact you can later modify it . It is not very inituative but it is there . You can also use guvnor to manage your free form - Technical Rules . We use guvnor this way .",
"Question : null .. . Answer : I m new to Drools rule-engine and Guvnor . I have written some basic rules in DRL file and it works fine as standalone application . In order to add update rules at runtime I have deployed Guvnor on my tomcat 7.0.21 . Via UI I have imported the DRL file and required POJO as model Jar . Created new Changeset via guvnor and added all the imported rules through assets . Final xml structure it formed is as below .. . .. . When I placed this change set in the standalone application and executed the application it was throwing below exception message .. . .. . The version of Drools runtime is 5.5.0 and Guvnor is 5.5.0 . Please help me to fix the bug . Thanks in advance Comment : The HTTP error-code is : 505 HTTP Version Not Supported i.e . The server does not support the HTTP protocol version used in the request . Comment : Seems I have used wrong URL . Once corrected It started working ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
drools
|
UNK_RELATION
|
web-push@notifications@100
|
web-push -- the web-push api http : w3c.github.io push-api lets users of your web app receive push @placeholder at any time even in the background that is even when your web app is not currently running in the foreground on the user s device or even when the browser on the user s device is not currently running .
|
{
"confidence": [
72.30879211425781,
69.4776611328125,
68.28832244873047,
67.55481719970703,
67.05006408691406,
66.52153015136719,
64.93765258789062,
64.07086944580078,
63.83950424194336,
63.50442886352539,
63.12980651855469,
62.94167709350586,
62.01953887939453,
62.01953887939453,
61.19979476928711,
60.77001190185547,
60.70392990112305,
60.5140380859375,
60.43566131591797,
60.43566131591797,
60.43566131591797,
59.57212448120117,
59.2416877746582,
59.183265686035156,
59.183265686035156,
58.7781867980957,
58.720436096191406,
58.51951217651367,
58.4910774230957,
58.29343795776367,
58.06865692138672,
57.32500076293945,
56.913368225097656,
56.913368225097656,
56.704978942871094,
56.284873962402344,
56.17919158935547,
55.93115234375,
55.92134094238281,
55.92134094238281,
55.92134094238281,
55.92134094238281,
55.55697250366211,
55.329490661621094,
55.16414260864258,
54.38469314575195,
54.337459564208984,
54.337459564208984,
54.337459564208984,
54.337459564208984,
54.337459564208984,
53.604454040527344,
53.54570770263672,
53.27855682373047,
53.27855682373047,
53.27855682373047,
53.03181457519531,
52.69561004638672,
52.619102478027344,
52.55367660522461,
52.55367660522461,
52.453529357910156,
52.26445770263672,
52.07548141479492,
52.06624984741211,
52.0072135925293,
51.87202835083008,
51.87078857421875,
51.528621673583984,
51.37193298339844,
51.36955261230469,
51.27730941772461,
51.23033142089844,
50.745784759521484,
50.57805252075195,
50.5143928527832,
50.310577392578125,
50.18388748168945,
50.149864196777344,
50.01055908203125,
49.94757080078125,
49.54587936401367,
49.327945709228516,
49.057315826416016,
48.936946868896484,
48.902191162109375,
48.886566162109375,
48.79426956176758,
48.565982818603516,
48.53042984008789,
48.11724853515625,
47.996925354003906,
47.70709228515625,
47.70709228515625,
47.70709228515625,
47.70709228515625,
47.69377899169922,
47.54375457763672,
47.50883865356445,
47.451175689697266
],
"content": [
"You can use the web-push library https : github.com web-push-libs web-push for Node.js .",
"For web use Push API for Chrome and other browsers .",
"The time-updater serves two other purposes : .. . .. . Its simple code checks that Push is configured properly in your Vaadin app web server and web browser .",
"The spec is at w3c.github.io push-api http : w3c.github.io push-api and Firefox is already implementing it and it will eventually get implemented in Edge as well .",
"@collimarco To put it plainly : a user has an endpoint and receives web-push .",
"I implemented web-push notifications .",
"GCM topics are not supported by web-push .",
"Is it even possible in native chrome push-api",
"Firefox nightly now has support for push and it supports the web-push protocol .",
"The Push API in the browser provides the subscription ID which I presumably need to set as the deviceToken in the installation on the device in order to send a push to this device .",
"Question : do you want the push to occur only when the user has an open browser with the web application open",
"During the development of web-push https : www.npmjs.com package web-push with GCM and chrome .",
"I m trying implement push-notification for web .",
"Are these the intended behaviors is this the limit of Web Push Notifications",
"Create a web page that uses service workers and the standard Push API and somehow communicate data between the addon and the web page .",
"The pushsubscriptionchange event is documented as part of the Push API specification https : w3c.github.io push-api the-pushsubscriptionchange-event .",
"What I m trying to do is make a web app that has a Service Worker installed to show push notifications to the user using Push Notifications API on Chrome and Firefox .",
"I m building a Progressive Web App that uses Web Push Notifications and want to avoid showing notifications to users on either desktop or mobile that are already currently looking at my site .",
"If you re using a standard Web Push service e.g .",
"And for web-push I only use text as payload .",
"for Node.js https : github.com marco-c web-push .",
"From the doc https : developers.google.com web updates 2015 03 push-notifications-on-the-open-web : .. . .. . The endpoint should be saved on your server for each user since you ll need them to send push messages at a later date .",
"In web-push notifications documentation https : developers.google.com web updates 2015 03 push-notifications-on-the-open-web hl en I see that service-worker can get triggered by few events like push notificationclick .",
"I m using service-worker for push notifications following this https : developers.google.com web updates 2015 03 push-notifications-on-the-open-web article .",
"You can see an example here : https : github.com mozilla wp-web-push blob master wp-web-push lib js sw.php .",
"Basically push messaging for web apps can be implemented through service workers and web app manifests .",
": It isn t Mozilla Push Notifications this is the Web Push standard that also Chrome will adopt soon .",
"If you want to write a web app that runs inside their web browser then you cannot use Apple push notifications and probably no alternative notification service will suffice .",
"Unfortunately the Web Push standard currently doesn t support sending a notification to multiple subscribers .",
"An option that I m using in my WordPress web-push plugin https : github.com mozilla wp-web-push is to add a query argument to the URLs opened via notifications see this code https : github.com mozilla wp-web-push blob c7e67383a4aa870b57bacca16df87fff0ccd5e36 wp-web-push lib js sw.php L31 .",
"I have been reading for past few hours about Push Notification API http : www.w3.org TR push-api and Web Notification API http : www.w3.org TR notifications .",
"It is possible to build a webapp progressive web app as they re calling them these days that can send push notifications even after the page has been closed .",
"I m trying to understand the capabilities of the Web Push Notifications https : developers.google.com web updates 2015 03 push-notifications-on-the-open-web hl en via Google Cloud Messaging and Chrome .",
"See the article Push Notifications on the Open Web https : developers.google.com web updates 2015 03 push-notificatons-on-the-open-web for a step-by-step how-to and code-snippets you can use .",
"The event is also triggered when the user removes and re-grants the push permission see https : github.com w3c push-api issues 116 .",
"There is a new API called Push API spec http : www.w3.org TR push-api which is a web standard based on service workers http : www.html5rocks.com en tutorials service-worker introduction and available to normal websites .",
"Even the Push-related .jar file is bundled with Vaadin .",
"I ve been reading through the docs for Chrome s implementation of the Web Push API here http : updates.html5rocks.com 2015 03 push-notificatons-on-the-open-web and I noticed the API says you promise to show a notification whenever you receive a push and under limitations it s stated you have to show a notification when you receive a push message .",
"With the web-push library you should be able to use both indistinctly .",
"I d like to implement Mozilla web-push notifications in website .",
"I ve setup a web-push system and it works fairly well .",
"I m using Web push notifications with Chrome and they work great .",
"The Web Push standard https : tools.ietf.org html draft-ietf-webpush-protocol-02 currently doesn t allow it .",
"I have already been through different blogs explaning about service-worker one of them is open Web Push notification https : developers.google.com web updates 2015 03 push-notificatons-on-the-open-web .",
"All Web apps a Firefox user accesses that receive push notifications get them from a server given by the dom.push.serverURL user preference .",
"Yes you can send off-site push notifications without an app using the W3C Push API .",
"The payload for web-push notifications doesn t work the same way as it works for Android .",
"How to send a notification to multiple subscribers using web-push package of Node.js",
"I m trying to encrypt web-push notification payload for Chrome .",
"Just search for web-push notifications to get a few of them .",
"Hopefully Chrome will move over to supporting the web-push protocol at a later date .",
"Context : I am building a progressive-web-apps that sends my users push notifications with service-worker .",
"Here is the documentation https : developers.google.com web updates 2015 03 push-notifications-on-the-open-web hl en and example https : developers.google.com web fundamentals getting-started push-notifications hl en .",
"Here is the Chrome developer guide https : developers.google.com web updates 2016 03 web-push-encryption hl en .",
"https : developers.google.com web updates 2015 03 push-notifications-on-the-open-web hl en .. . 2 .",
"See https : developers.google.com web updates 2015 03 push-notifications-on-the-open-web .. . .. . On iOS this is not possible .",
"I m not sure I run tests for my web-push library github.com marco-c web-push https : github.com marco-c web-push both in Firefox and Chromium and they work but in the tests I m always using the latest versions .",
"I m following this tutorial by Gooogle : .. . .. . https : developers.google.com web updates 2015 03 push-notifications-on-the-open-web .. . .. . I ve tried but don t know how to get the data in the push-notification .",
"The pushsubscriptionchange https : developer.mozilla.org en-US docs Web Events pushsubscriptionchange event is fired by the browser when the push-notification server wants the client to resubscribe .",
"I think what you are looking for is the push notifications for web-applications .",
"The chrome team seems to be considering it for web-push too but so far there is no ETA .",
"You install their JavaScript client library on your website and in case your website is not HTTPS enabled they use a workaround to subscribe visitors for push notifications since web-push notifications are only supported for HTTPS enabled websites .",
"What s described at developers.google.com web updates 2015 03 https : developers.google.com web updates 2015 03 push-notifications-on-the-open-web is already a W3C standard .",
"If I have both a native app and a progressive web app using web-push notifications powered by service-worker is there a way to prevent a user from receiving duplicate notifications if they opt in to receiving notifications from the web site and also have the app installed",
"The Push API requires two backends",
"Basically you have to : .. . .. . collect the endpoint device token and register a service-worker a snippet of code that will be executed later using Javascript and the Push API .. . store the endpoint to the server .. . when something happens from your backend you send the notifications to the browser manufacturer s service .. . the browser manufacturer s service delivers the notification to the browser which has a permanent connection to it .. . .. . You can read this tutorial https : developers.google.com web updates 2015 03 push-notifications-on-the-open-web for Chrome and the Push API reference https : developer.mozilla.org en-US docs Web API Push API by MDN .",
"Accurate today push messages are received and shown in Chrome for Android even if the browser isn t running .",
"You might be able to use one of the Firefox modules that implement Web Push mxr.mozilla.org mozilla-central source dom push http : mxr.mozilla.org mozilla-central source dom push .",
"Currently the only mobile-browser that supports the Push API is Chrome in Android however more will probably come soon .",
"I want to use the HTML 5 inbuilt notifications API to push notifications from the server when the user is on a particular page .",
"You can do real push notifications with Web apps today in Chrome using Service Workers https : developer.mozilla.org en-US docs Web API Service Worker API Using Service Workers and PushManager https : developer.mozilla.org en-US docs Web API PushManager from the W3C Push API https : developer.mozilla.org en-US docs Web API Push API .",
"Every time you receive a push message on the device when you finish handling the event a notification must be left visible on the device .",
"Send push and receive double push - first one is ok second is This site has been updated in background .. . 6 .",
"So while there may be an alternative way Firefox extensions can connect with Mozilla Push Service the only publicly-documented way is through the standard Web Push API https : developer.mozilla.org en-US docs Web API Push API Using the Push API that relies on service workers which are not available yet for use in Firefox extensions .",
"Check out this demo https : simple-push-demo.appspot.com and this guide explains how to do it : https : developers.google.com web fundamentals engage-and-retain push-notifications",
"I have plan to integrate Push Notifications for Chrome Push API and Notification API .",
"Actually in your case it s not the user who is blocking the notifications : it s Safari who refuses to subscribe to push notifications because the push package is invalid .",
"I am trying to use Parse with push notifications on the web powered by service-worker .",
"for OS X and Push API requires 43v .",
"There currently aren t any browsers on iOS that support the Web Push Notifications feature Chrome for desktop and Android do or Service Workers as you rightfully point out .",
"A downside to the current implementation of the Push API in Chrome is that you can t send any data with a push message .",
"Only those users that happen to have an extension installed that requires background mode like hangouts will be able to receive push notifications when chrome is not running .",
"Hello I am working to include push notifications for chrome basically I followed steps https : developers.google.com web updates 2015 03 push-notifications-on-the-open-web although I then added different stuff .",
"How we can send a notification to multiple subscribers using web-push package of Node.js",
"And I want to know if push messaging works even when we don t have the browser opened",
"Web App Startup Shutdown Hooks .. . .. . Ideally we want to be informed when the web app starts up deployed and when the web app shuts down or undeployed .",
"I m using Google Chrome Service Worker to implement a push-notification service for my web-users .",
"You can refer to push messaging codelab https : developers.google.com web fundamentals getting-started push-notifications hl en on how to implement it .",
"You need HTTPS only for the Push API not for Safari",
"This is mentioned on the 3rd point in here : .. . .. . https : developers.google.com web updates 2015 03 push-notificatons-on-the-open-web what-are-the-limitations-of-push-messaging-in-chrome-42 .. . .. . So it might happen that somehow you are skipping the push-notification though you got a push message from GCM and you are getting a push-notification with some default message like This site has been updated in the background .",
"If you want to build everything from scratch I suggest reading this tutorial https : developers.google.com web updates 2015 03 push-notifications-on-the-open-web .",
"You can attach a payload to a push message and access it through the data property of the event https : developer.mozilla.org en-US docs Web API PushMessageData .",
"I m trying to implement push notifications in a progressive-web-apps and am using the new Payload support in Chrome .",
"These are obviously distinct and I believe this distinction is causing me issues with the web-push library .",
"Would someone give me an example of code on how to implement web-push notifications in Rails4",
"Payloads are coming soon likely Chrome 50 or 51 based on the Web Push protocol .",
"That should be considered authoritative and it mentions there onpushsubscriptionchange is exposed https : w3c.github.io push-api events as part of ServiceWorkerGlobalScope .",
"Can I use a push service other than Google s GCM https : developers.google.com cloud-messaging when using the new Push API with service workers",
"The user is actually subscribed to push notifications .. . 2 .",
"I have read the Question and Answer Minimal example of Push in Vaadin 7 app @Push http : stackoverflow.com q 27808460 642706 ."
]
}
|
{
"confidence": [
100.1948013305664,
90.45108795166016,
90.16973114013672,
86.044189453125,
83.99005126953125,
83.27696990966797,
81.78392791748047,
80.31505584716797,
79.8554458618164,
79.79554748535156,
79.18964385986328,
78.75120544433594,
78.66851043701172,
78.42083740234375,
78.20909881591797,
78.1963882446289,
77.94820404052734,
77.91158294677734,
77.55061340332031,
76.2530517578125
],
"content": [
"Question : We re developing a website which sends push notifications to end users using GCM . We ve gone through Service Worker and all . We have developed a prototype using this codelab https : developers.google.com web fundamentals getting-started push-notifications hl en tutorial . It is working so far but the only issue is the notifications are displayed only when Chrome is opened . When Chrome is closed the notifications don t reach the users . I want to know is there any way we can overcome this and display the notifications even when the browser is closed similar to Safari Push Notification . Thanks in advance .. . Answer : If you have a background https : developer.chrome.com extensions manifest permissions permission your background page will be able to show notifications even when Chrome window is closed . It was stated in this documentation https : developer.chrome.com extensions declare permissions . When any installed hosted app packaged app or extension has background permission Chrome runs invisibly as soon as the user logs into their computer before the user launches Chrome . The background permission also makes Chrome continue running even after its last window is closed until the user explicitly quits Chrome . You need to use the background permission with a background page https : developer.chrome.com extensions background pages event page https : developer.chrome.com extensions event pages or a background window https : developer.chrome.com apps app window for hosted apps . For web use Push API for Chrome and other browsers . The advantage of using push messages is that even if your page is closed your service-worker will be woken up and be able to show a notification . Web Sockets and EventSource have their connection closed when the page or browser is closed so it s not recommended . Here is the documentation https : developers.google.com web updates 2015 03 push-notifications-on-the-open-web hl en and example https : developers.google.com web fundamentals getting-started push-notifications hl en . Comment : They are talking about chrome app and extensions . Will it work for a website Comment : I edited my answer . :",
"Question : I m developing a simple website and I want my website to display push notifications to my users . It is something similar to how facebook.com displays notifications in chrome and firefox . I m also working on an Android app that also supports push notifications through GCM . So I need help on how to add push-notification support to my website . Thanks in advance .. . Answer : Both Firefox and Chrome support the Push API . Currently Firefox adhere to the standard while Chrome uses an hybrid solution Push API + GCM . Basically you have to : .. . .. . collect the endpoint device token and register a service-worker a snippet of code that will be executed later using Javascript and the Push API .. . store the endpoint to the server .. . when something happens from your backend you send the notifications to the browser manufacturer s service .. . the browser manufacturer s service delivers the notification to the browser which has a permanent connection to it .. . .. . You can read this tutorial https : developers.google.com web updates 2015 03 push-notifications-on-the-open-web for Chrome and the Push API reference https : developer.mozilla.org en-US docs Web API Push API by MDN . If you prefer a third party service I suggest the one I have developed : https : pushpad.xyz",
"Question : I know this question pops up quite a bit but it is always in different context.. . I need to create a mobile-website and wondering if it is possible to ask the user s permission to push notifications after the user closed the site session and moved on.. . like Facebook s Desktop notifications but on the mobile.. . Is there a way to ask the user for this general permission and push notifications from a server regardless if the user is on your mobile-website or not Like native apps do.. . Cheers .. . Ajar .. . .. . Just to explicitly clarify - this is NOT about phonegap or any other cross-compiling neither it is referring to on-site in session sockets real-time communication . Comment : I believe this is what you re looking for : developers.google.com web updates 2015 03 https : developers.google.com web updates 2015 03 push-notifications-on-the-open-web hl en Although I have no idea how widely supported that is especially on mobile-devices . You may need to experiment Comment : Hi Dave thank you for responding . I saw this link but it relates only to chrome which have an impressive 40 market-share of mobile browsers but still you loose 60 in the process.. . netmarketshare.com https : www.netmarketshare.com browser-market-share.aspx qprid 1 qpcustomb 1 Is there a wider html5 standard or polyfill for push notifications for all browsers Comment : I suspect that Chrome s attempt will migrate into or be replaced by a standard given enough time . But it looks like for now it is the best available . Since this is entirely new functionality rather than a simple convenience around existing features you won t be able to polyfill it . Comment : Got it Dave - thank you Comment : What s described at developers.google.com web updates 2015 03 https : developers.google.com web updates 2015 03 push-notifications-on-the-open-web is already a W3C standard . The spec is at w3c.github.io push-api http : w3c.github.io push-api and Firefox is already implementing it and it will eventually get implemented in Edge as well . More info at MDN at developer.mozilla.org en-US docs Web API Push API https : developer.mozilla.org en-US docs Web API Push API Using the Push API .. . Answer : Yes you can send off-site push notifications without an app using the W3C Push API . However the only mobile-browser that supports them is Chrome on Android while most desktop browsers already support them . If you want to build everything from scratch I suggest reading this tutorial https : developers.google.com web updates 2015 03 push-notifications-on-the-open-web . However it s a lot of work : consider third party services like Pushpad http : pushpad.xyz .",
"Question : I have been reading for past few hours about Push Notification API http : www.w3.org TR push-api and Web Notification API http : www.w3.org TR notifications . I also discovered that Google Apple gives push-notification service for free via GCM and APNS respectively . I am trying to understand if we can implement push-notification to browsers using Desktop Notification which I believe is what Web Notification API does . I saw a google documentation on how this can be done for Chrome here https : developers.google.com cloud-messaging chrome client here https : developers.google.com web fundamentals getting-started push-notifications hl en . Now what am still not able to understand is : .. . .. . 1 . Can we use GCM APNS to send push-notification to all Web Browsers including Firefox Safari 2 . If not via GCM can we have our own back-end to do the same I believe all these answered in one answer can help a lot of people who are having similar confusions . Comment : sure you can run your own backend but it s complicated . .. . Answer : I assume you are talking about real push notifications that can be delivered even when the user is not surfing your website otherwise check out WebSockets or legacy methods like long-polling . Can we use GCM APNS to send push-notification to all Web Browsers including Firefox Safari GCM is only for Chrome and APNs is only for Safari . Each browser manufacturer offers its own service . If not via GCM can we have our own back-end to do the same The Push API requires two backends One is offered by the browser manufacturer and is responsible for delivering the notification to the device . The other one should be yours or you can use a third party service like Pushpad http : pushpad.xyz and is responsible for triggering the notification and contacting the browser manufacturer s service i.e . GCM APNs Mozilla push servers http : autopush.readthedocs.org en latest .",
"Question : I know this question pops up quite a bit but it is always in different context.. . I need to create a mobile-website and wondering if it is possible to ask the user s permission to push notifications after the user closed the site session and moved on.. . like Facebook s Desktop notifications but on the mobile.. . Is there a way to ask the user for this general permission and push notifications from a server regardless if the user is on your mobile-website or not Like native apps do.. . Cheers .. . Ajar .. . .. . Just to explicitly clarify - this is NOT about phonegap or any other cross-compiling neither it is referring to on-site in session sockets real-time communication . Comment : I believe this is what you re looking for : developers.google.com web updates 2015 03 https : developers.google.com web updates 2015 03 push-notifications-on-the-open-web hl en Although I have no idea how widely supported that is especially on mobile-devices . You may need to experiment Comment : Hi Dave thank you for responding . I saw this link but it relates only to chrome which have an impressive 40 market-share of mobile browsers but still you loose 60 in the process.. . netmarketshare.com https : www.netmarketshare.com browser-market-share.aspx qprid 1 qpcustomb 1 Is there a wider html5 standard or polyfill for push notifications for all browsers Comment : I suspect that Chrome s attempt will migrate into or be replaced by a standard given enough time . But it looks like for now it is the best available . Since this is entirely new functionality rather than a simple convenience around existing features you won t be able to polyfill it . Comment : Got it Dave - thank you Comment : What s described at developers.google.com web updates 2015 03 https : developers.google.com web updates 2015 03 push-notifications-on-the-open-web is already a W3C standard . The spec is at w3c.github.io push-api http : w3c.github.io push-api and Firefox is already implementing it and it will eventually get implemented in Edge as well . More info at MDN at developer.mozilla.org en-US docs Web API Push API https : developer.mozilla.org en-US docs Web API Push API Using the Push API .. . Answer : Chrome supports this functionality on Android as well as desktop . See https : developers.google.com web updates 2015 03 push-notifications-on-the-open-web .. . .. . On iOS this is not possible .",
"Question : I know this question pops up quite a bit but it is always in different context.. . I need to create a mobile-website and wondering if it is possible to ask the user s permission to push notifications after the user closed the site session and moved on.. . like Facebook s Desktop notifications but on the mobile.. . Is there a way to ask the user for this general permission and push notifications from a server regardless if the user is on your mobile-website or not Like native apps do.. . Cheers .. . Ajar .. . .. . Just to explicitly clarify - this is NOT about phonegap or any other cross-compiling neither it is referring to on-site in session sockets real-time communication . Comment : I believe this is what you re looking for : developers.google.com web updates 2015 03 https : developers.google.com web updates 2015 03 push-notifications-on-the-open-web hl en Although I have no idea how widely supported that is especially on mobile-devices . You may need to experiment Comment : Hi Dave thank you for responding . I saw this link but it relates only to chrome which have an impressive 40 market-share of mobile browsers but still you loose 60 in the process.. . netmarketshare.com https : www.netmarketshare.com browser-market-share.aspx qprid 1 qpcustomb 1 Is there a wider html5 standard or polyfill for push notifications for all browsers Comment : I suspect that Chrome s attempt will migrate into or be replaced by a standard given enough time . But it looks like for now it is the best available . Since this is entirely new functionality rather than a simple convenience around existing features you won t be able to polyfill it . Comment : Got it Dave - thank you Comment : What s described at developers.google.com web updates 2015 03 https : developers.google.com web updates 2015 03 push-notifications-on-the-open-web is already a W3C standard . The spec is at w3c.github.io push-api http : w3c.github.io push-api and Firefox is already implementing it and it will eventually get implemented in Edge as well . More info at MDN at developer.mozilla.org en-US docs Web API Push API https : developer.mozilla.org en-US docs Web API Push API Using the Push API .. . Answer : On iOS this is not possible . You can implement notifications on the desktop version of Safari however those won t work on the mobile iOS version . Only native iOS apps which would include hybrid apps in this case allow push notifications on iOS .",
"Question : Google Cloud Messaging GCM is a service that enables developers to send data from servers to both Android applications or Chrome apps and extensions . I am developing a chrome and a firefox extension add-on . I am using the Web Extension APIs for Firefox extension . Now Web Extension APIs don t support chrome.gcm . APIs yet . Essentially a firefox extension cannot talk to GCM . Is there something else like GCM to which a firefox extension can talk to Something provided by the Firefox just like GCM provided by Google for its browser Chrome If not can someone please explain how to achieve this in a Firefox Extension Update : Even for web apps firefox doesn t use something similar to GCM . They use service workers . Can Firefox Browser Extensions interact with service workers .. . Answer : Firefox extensions currently can t use service workers directly according to an implementor who worked on service-workers support in Firefox http : logs.glob.uno c freenode 23whatwg s 1 20Feb 202016 e 1 20Feb 202016 c983254 . Is there something else like GCM to which a firefox extension can talk to Something provided by the Firefox just like GCM provided by Google for its browser Chrome Yes there s a Firefox equivalent of GCM . All Web apps a Firefox user accesses that receive push notifications get them from a server given by the dom.push.serverURL user preference . If you check dom.push.serverURL in about : config you ll see wss : push.services.mozilla.com which is the Mozilla Push Service https : mozilla-push-service.readthedocs.org en latest essentially Mozilla s equivalent of GCM . The backend of that runs AutoPush a Python-based open-source Push Server software project https : autopush.readthedocs.org en latest and the client-side of it is as noted in the question exposed to Web apps through service workers . So while there may be an alternative way Firefox extensions can connect with Mozilla Push Service the only publicly-documented way is through the standard Web Push API https : developer.mozilla.org en-US docs Web API Push API Using the Push API that relies on service workers which are not available yet for use in Firefox extensions . Comment : So do you know of any alternatives using which Firefox extensions can connect with Mozilla Push Service Comment : You might be able to use one of the Firefox modules that implement Web Push mxr.mozilla.org mozilla-central source dom push http : mxr.mozilla.org mozilla-central source dom push . Comment : @Marco How I think this also is for web apps only . Comment : @ankitG those modules are internal they can t be used by web content but can be used by addons . I m not sure about the how you have to investigate by looking at their source code . Comment : There s also something else that you could do . Create a web page that uses service workers and the standard Push API and somehow communicate data between the addon and the web page .",
"Question : I am currently sending web-notifications on Firefox desktop browsers . Unfortunately deleted tokens are still pushable through Mozilla Push Server . To delete the token i.e . the subscription endpoint generated by the ServiceWorker I just clear the cache history . Then I send a notification to the deleted endpoint : Mozilla returns a 201 Created telling us the notification has been created for the user and ready to be send . But if I repeat the same steps with a Chrome browser Google Cloud Messaging tells us that the token is not registed cf GCM documentation https : developers.google.com cloud-messaging http-server-ref error-codes Unregistered Device . However I can clearly see in Mozilla documentation http : autopush.readthedocs.io en latest http.html errors that there are error codes for this situation : cf errno 103 - Expired URL endpoint or errno106 - Invalid subscription . Also I must say that if I block the native notification permission previously granted Mozilla returns in consequence a errno106 - Invalid Subscription error . The problem is when the token has been deleted . Comment : I don t understand what you mean when you say the token has been deleted . A token is deleted meaning that is no longer valid when the user blocks the native notification permission . Comment : @collimarco To put it plainly : a user has an endpoint and receives web-push . But if he clears his browser-cache he won t receive web-notifications anymore . So this endpoint becomes useless . I want Mozilla to tell me that I should never send to this endpoint anymore . Comment : I agree with you . There are some cases when you don t know if the notification will be delivered . However this is a problem regarding the Push API specs or how Mozilla handles that : I don t think that here on StackOverflow someone can provide a solution . .. . Answer : Mozilla has been working on this unwanted behavior : BugZilla 1277615 https : bugzilla.mozilla.org show bug.cgi id 1277615 .. . .. . It is now fixed with Firefox Developer Edition v49 and it returns a errno106 - No such subscription in this situation .",
"Question : null .. . Answer : I m trying to understand the capabilities of the Web Push Notifications https : developers.google.com web updates 2015 03 push-notifications-on-the-open-web hl en via Google Cloud Messaging and Chrome . I ve implemented and tested it in Chrome full browser and the UX is pretty good specifically : .. . .. . If the Chrome application is open then a visible notification arrives good . When the User clicks the notification then : .. . .. . 1 . If the User s browser is on mysite.com then the postMessage is delivered good . 2 . If the User s browser is NOT on mysite.com then a new window is opened good . However the mobile behavior -- the more important case -- seems to leave a lot to be desired . .. . .. . I m using Samsung s Remote Test Lab http : developer.samsung.com remotetestlab and running an actual Galaxy S6 remotely .. . .. . .. . If Chrome is open at all either on mysite.com or not then there is no indication of the notification bad if the User is not on my site . If Chrome is open in the foreground either on mysite.com or not but the phone is locked then there is no indication of the notification very bad . If Chrome is open in the background and the phone is locked then there is an indication of the notification good . Are these the intended behaviors is this the limit of Web Push Notifications Or have I somehow implemented my code wrong .. . .. . Thank you Comment : Everything you have described above is not the behaviour I have seen on Nexus Android devices .",
"Question : I m developing a simple website and I want my website to display push notifications to my users . It is something similar to how facebook.com displays notifications in chrome and firefox . I m also working on an Android app that also supports push notifications through GCM . So I need help on how to add push-notification support to my website . Thanks in advance .. . Answer : You can use Service Workers in order to display notifications from a website as stated in Implementing GCM Client on Chrome https : developers.google.com cloud-messaging chrome client . You can refer to push messaging codelab https : developers.google.com web fundamentals getting-started push-notifications hl en on how to implement it . Comment : That codelab tutorial really helped me . Thank you so much And I want to know if push messaging works even when we don t have the browser opened Comment : Accurate today push messages are received and shown in Chrome for Android even if the browser isn t running . On desktop Chrome has to be running but lets be honest people always have a browser window sat around somewhere :",
"Question : All of my questions are in context of Chrome Web Push Notifications as released in Chrome Version 42 . 1 GCM API returns Success for even those Registration IDs which are no longer valid . When a person right clicks on the notification and clicks on Disable notifications from xyz.com the person can no longer receive notifications . However when i send the same RegistrationID to GCM API it still returns success for that particular registration . When i resubscribe again i get a new RegistrationID . Therefore I suspect that the previous one gets disabled . Is this intended behaviour Is there any way for us to know if people have unsubscribed by right clicking on the notification and mark them as inactive in our database in case the user never comes back again . 2 GCM Documentation for Error NotRegistered says The client app isn t configured to receive push messages or the app was uninstalled from the device . Can you please explain what does The client app isn t configured to receive push messages mean Comment : These are two questions . but the second one is easy notregistered means you can no longer send to that ID . Please post as two questions you might get answers . .. . Answer : Disable notifications from xyz.com .. . .. . All this does is revoke the notification permission in Chrome and unregister from push . The GCM server might take a while to realize that such registration is no longer valid since the unregistration happens locally and it can take a while to be synced back to the servers . Is there any way for us to know if people have unsubscribed by right clicking on the notification and mark them as inactive in our database in case the user never comes back again . Sending messages to that registration id will eventually start returning a permanent error one of InvalidRegistration NotRegistered InvalidPackageName MismatchSenderId .. . .. . You can see a working example of this in https : github.com johnmellor push-api-appengine-demo blob master main.py L349",
"Question : We re developing a website which sends push notifications to end users using GCM . We ve gone through Service Worker and all . We have developed a prototype using this codelab https : developers.google.com web fundamentals getting-started push-notifications hl en tutorial . It is working so far but the only issue is the notifications are displayed only when Chrome is opened . When Chrome is closed the notifications don t reach the users . I want to know is there any way we can overcome this and display the notifications even when the browser is closed similar to Safari Push Notification . Thanks in advance .. . Answer : In Chrome . Only those users that happen to have an extension installed that requires background mode like hangouts will be able to receive push notifications when chrome is not running . It does not seem like a good idea to rely on it . The chrome team seems to be considering it for web-push too but so far there is no ETA . https : code.google.com p chromium issues detail id 402456",
"Question : This is my first post on the forum so please educate me if I got the tag forum or content wrong . I am developing an app targeting iPhone and Android which is a real-time location based social network . The app will not be deployed through market place app-store . From what I understand my only option is to make a web-app HTML5 JS . All the functionality should be support except for a need to send push notifications to other users . The options I have considered are : - Send an email however this is not very real-time . - Send an SMS however this has some significant costs associated . - Linking to an IM of choice for the user and sending the notification through that IM .. . .. . As I understanding it all cross-platform frameworks sich as PhoneGab compiles to native and requires to be deployed through the app stores to take advantage of their APIs correct me if I am wrong . Any easy work-around for a location based push-notification app framework to be offered outside the app stores EDIT : I expect to distribute the app via a web-site . EDIT : The app service is a dating concept on the slightly sleezy side so I am afraid it will not pass the review gates and thus not be possible to distribute in the stores . Of course I could try using PhoneGap or Titanium and then do the webapp if it doesn t pass . Thanks for your support Comment : You ve said how you don t want to distribute the app but how do you want to distribute the app Comment : @MarcusAdams I expect to distribute the app through a website .. . Answer : If you build a native app or you use a native wrapper like Phonegap around an html javascript app you have to distribute it through the App store . If you go for a website you can send real push notifications using the Push API there are service like Pushpad https : pushpad.xyz that make it easier . Currently the only mobile-browser that supports the Push API is Chrome in Android however more will probably come soon .",
"Question : I ve been reading through the docs for Chrome s implementation of the Web Push API here http : updates.html5rocks.com 2015 03 push-notificatons-on-the-open-web and I noticed the API says you promise to show a notification whenever you receive a push and under limitations it s stated you have to show a notification when you receive a push message . After implementing the example on my localhost I used cURL to send a push-notification successfully . I was curious so I commented out the lines that actually call the showNotification function and put in a console.log instead and found that I could in fact send receive and totally ignore a push-notification . I even tried using an if-statement to control whether or not to show them based on global boolean that I controlled from my main page and that worked . So I was wondering if anyone knew what they meant by saying you need to show a notification and that silent push notifications weren t available This wasn t just for the heck of it I legitimately may need to control whether or not to show these notifications in my web app so it would be great if this were actually possible . Code below in case you re curious . EDIT : On Chrome 47 if it s relevant . UPDATE : After further experimenting I found the obvious issue that I can t update the original global variable once the user navigates away and then re-navigates to the same page . However I was able to circumvent this using a variable on the serviceworker itself and sending a message to the service-worker using the API described here https : googlechrome.github.io samples service-worker post-message to toggle the showNotifications boolean . .. . Answer : You do have to show a notification and if you don t show a notification you get a forced notification from the browser saying This site has been updated in the background . But the requirements that show the scary message have been relaxed slightly : .. . .. . As of Jan . 16 it seems like up to the last 10 notifications are checked for whether each showed a notification or not . If one notification in the last ten notifications did not show a notification that s considered an accident and the browser won t show the scary This site has been updated in the background . You have to miss two notifications in the last ten for the scary message to appear . Note : If the URL in the address-bar of the active browser tab matches the origin of your page and the browser is not minimized you are not required to show a notification . This is probably why your tests succeeded if you were on the page itself while running your tests . Chromium bug that tracks the implementation : https : code.google.com p chromium issues detail id 437277 .. . .. . Relevant lines of source code : https : code.google.com p chromium codesearch chromium src chrome browser push messaging push messaging notification manager.cc l 249 https : code.google.com p chromium codesearch chromium src chrome browser push messaging push messaging notification manager.cc l 249 Comment : Wow Thanks for this answer . Great find",
"Question : I have heard that push notifications are now supported in Chrome including Android as a website but the documents I can find talk about chrome.gcm as only available in a Chrome App or Chrome Extension . What do I do .. . Answer : chrome.gcm https : developer.chrome.com apps gcm was a proprietary push API built for Chrome Apps and Extensions which the user has to install . There is a new API called Push API spec http : www.w3.org TR push-api which is a web standard based on service workers http : www.html5rocks.com en tutorials service-worker introduction and available to normal websites . This walkthrough explains how to send notifications from your website and should get you up and running : https : developers.google.com web fundamentals getting-started push-notifications",
"Question : I am implementing chrome push-notification for my website users . Which I am able to do successfully via service-worker . I am following these articles tutorials .. . .. . 1 . https : developers.google.com web updates 2015 03 push-notifications-on-the-open-web hl en .. . 2 . http : www.html5rocks.com en tutorials service-worker introduction .. . .. . This works very well when I want to send notification NOW i.e . without scheduling for future . My Problem : .. . .. . I want to schedule this notification for later in the day may be recurring which I can do via cron . But GCM does not send you payload as stated here https : developers.google.com web updates 2015 03 push-notifications-on-the-open-web hl en and I quote . A downside to the current implementation of the Push API in Chrome is that you can t send any data with a push message . Nope nothing . The reason for this is that in a future implementation payload data will have to be encrypted on your server before it s sent to a push messaging endpoint . This way the endpoint whatever push provider it is will not be able to easily view the content of the push message . This also protects against other vulnerabilities like poor validation of HTTPS certificates and man-in-the-middle attacks between your server and the push provider . However this encryption isn t supported yet so in the meantime you ll need to perform a fetch to get information needed to populate a notification . Because of this I am not able to figure out for which scheduled notification I have received push event in browser . As there might be multiple notification sent to GCM . I am fetching last record in notification tables i.e . I am always showing last record data . As I don t know for which notification I am receiving push event in chrome browser . My Question : .. . .. . Is there a workaround to schedule notifications and show correct ones to the client browser Is it even possible in native chrome push-api .. . Answer : When you fetch the notification data you can mark this entry as read or delete it . Doing this way you can achieve that when there are two messages for user to show the first fetch request takes the first unread message and marks it as read and the second one can t take the previous message as it is already marked . Another solution would be to take all unread messages in one fetch request and show all of them to user . Doing this you might have empty pushes that do nothing .",
"Question : This is my first post on the forum so please educate me if I got the tag forum or content wrong . I am developing an app targeting iPhone and Android which is a real-time location based social network . The app will not be deployed through market place app-store . From what I understand my only option is to make a web-app HTML5 JS . All the functionality should be support except for a need to send push notifications to other users . The options I have considered are : - Send an email however this is not very real-time . - Send an SMS however this has some significant costs associated . - Linking to an IM of choice for the user and sending the notification through that IM .. . .. . As I understanding it all cross-platform frameworks sich as PhoneGab compiles to native and requires to be deployed through the app stores to take advantage of their APIs correct me if I am wrong . Any easy work-around for a location based push-notification app framework to be offered outside the app stores EDIT : I expect to distribute the app via a web-site . EDIT : The app service is a dating concept on the slightly sleezy side so I am afraid it will not pass the review gates and thus not be possible to distribute in the stores . Of course I could try using PhoneGap or Titanium and then do the webapp if it doesn t pass . Thanks for your support Comment : You ve said how you don t want to distribute the app but how do you want to distribute the app Comment : @MarcusAdams I expect to distribute the app through a website .. . Answer : Question : do you want the push to occur only when the user has an open browser with the web application open I m asking the question since you insist on the fact that you must do a web app and not native apps . If it s the case you may use some javascript push libraries . But be aware the even if it s js you ll have an additional socket connection open in addition to the native one for the push . So this will be battery consuming which could be a reason why people would stop using your app . If you want real-time notification you d better address the native push mechanism on each platform maybe with phonegap or titanium Comment : Yes the challenge is that I want to find a way to do push notifications when the app is not active . That s why I figure I have to link-to some native notification outside the app . Email is possible but not very real-time . SMS is more real-time but costly . IM could be a way . I am assuming other have had the same challenge and may have found a way to solve it",
"Question : I have a web application . I want to use the HTML 5 inbuilt notifications API to push notifications from the server when the user is on a particular page . Is it possible .. . Answer : It depends on what you want to achieve : .. . .. . if you want to send a push notifications to the user while is surfing your website you can use WebSockets and optionally the Notifications API to give the notification a native style .. . if you want off-site push notifications that are delivered even when the user is not on your website you should use a combination of the Push API to trigger the offline event and the Notifications API to display the notification you can read more here http : stackoverflow.com a 34920874 51387 or use a service like Pushpad https : pushpad.xyz",
"Question : null .. . Answer : I am trying to use Parse with push notifications on the web powered by service-worker . The Push API in the browser provides the subscription ID which I presumably need to set as the deviceToken in the installation on the device in order to send a push to this device . How am I able to set the deviceToken for my installation on the client Comment : Note that parse is being deprecated in 12 months so perhaps you want to consider other options . See announcement in parse.com https : parse.com",
"Question : I ve read the push subscription can get out of sync between the browser and the push service . I ve seen two remediations both look to be non-standard : .. . .. . 1 . ServiceWorkerGlobalScope.onpushsubscriptionchange https : developer.mozilla.org en-US docs Web API Push API Using the Push API Handling premature subscription expiration .. . 2 . GCM send response mentioned here https : developers.google.com web updates 2015 03 push-notifications-on-the-open-web keeping-the-subscription-up-to-date spelled out here https : developers.google.com cloud-messaging http .. . understandably non-standard .. . .. . I presume any application should handle both of these points at which a subscription can be identified to be out-of-sync and any all . Questions : .. . .. . 1 . In general are there always just the two areas an application can be made aware of a subscription out-of-sync situation 1 . service-worker event 2 . push service response Seems reasonable looking for confirmation . 2 . Will the ServiceWorkerGlobalScope.onpushsubscriptionchange event or some equivalent make it into the authoritative standard https : slightlyoff.github.io ServiceWorker spec service-worker index.html 3 . In lieu of a service-worker event standard why not just keep the expected subscription endpoint around in client-side state and anytime you query the PushManager for the subscription check if it is out-of-sync different than expected .. . Answer : The pushsubscriptionchange event is documented as part of the Push API specification https : w3c.github.io push-api the-pushsubscriptionchange-event . That should be considered authoritative and it mentions there onpushsubscriptionchange is exposed https : w3c.github.io push-api events as part of ServiceWorkerGlobalScope . I don t know offhand whether pushsubscriptionchange event is fired in all browsers that support the Push API as of this writing but I believe the general idea is that it s the eventual solution to the use-case you describe ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
notifications
|
UNK_RELATION
|
solaris-studio@linux@305
|
solaris-studio -- oracle solaris-studio oracle s advanced c c++ and fortran development tool suite delivers the latest in compiler optimizations multithread performance and powerful analysis tools for the best application performance and reliability on oracle solaris oracle linux and red hat enterprise @placeholder operating systems .
|
{
"confidence": [
86.53663635253906,
72.18212890625,
66.92644500732422,
64.376220703125,
63.297119140625,
62.21977996826172,
61.69652557373047,
61.104286193847656,
59.1134033203125,
58.121307373046875,
57.71361541748047,
56.4732666015625,
56.251197814941406,
55.24385070800781,
54.1414680480957,
53.79676818847656,
52.52703857421875,
52.45441436767578,
50.84009552001953,
49.13636779785156,
47.51665496826172,
47.4820556640625,
46.71073913574219,
46.71073913574219,
45.40886306762695,
45.40886306762695,
44.42646789550781,
44.334468841552734,
43.848533630371094,
42.626007080078125,
42.626007080078125,
42.47701644897461,
42.35426330566406,
42.35426330566406,
42.35426330566406,
41.46733093261719,
39.7638053894043,
37.509830474853516,
36.81010818481445,
36.77447509765625,
36.17298126220703,
36.087318420410156,
35.96429443359375,
35.47260284423828,
35.47260284423828,
35.47260284423828,
35.47260284423828,
33.69776153564453,
32.87969207763672,
32.73137664794922,
32.17729187011719,
32.081932067871094,
31.283824920654297,
30.59413719177246,
30.25172996520996,
29.25647735595703,
26.213634490966797,
25.842208862304688,
24.693660736083984,
24.02265739440918,
23.64818000793457,
23.025651931762695,
22.822650909423828,
22.822650909423828,
22.570707321166992,
22.523578643798828,
22.21908950805664,
22.15105628967285,
21.723777770996094,
21.625667572021484,
21.29090118408203,
20.78240966796875,
20.161762237548828,
19.924734115600586,
19.841283798217773,
19.69631576538086,
19.30001449584961,
19.30001449584961,
18.670541763305664,
18.670541763305664,
18.60143280029297,
18.566835403442383,
18.566835403442383,
18.566835403442383,
18.566835403442383,
18.33310890197754,
18.33310890197754,
18.33310890197754,
18.33310890197754,
18.03754425048828,
17.977928161621094,
17.878164291381836,
17.363264083862305,
17.110210418701172,
17.110210418701172,
16.97481918334961,
16.77109146118164,
16.43781089782715,
16.323280334472656,
16.20038414001465
],
"content": [
"I have been trying to compile an O-O fortran code with the fortran compiler of the Oracle Solaris Studio 12.4 suite the latest as far as I know .",
"The C++ preprocessor of Oracle Solaris Studio 12.3 removes whitespace completely when expanding VA ARGS .",
"-bash-3.2 export PATH PATH : usr ccs bin .. . .. . CC is from Oracle Solaris Studio 12.3 .",
"OS : Solaris 11 Compiler : CC from Oracle Solaris Studio 12.4 .. . .. . Output requested : .. . .. . If I use csignal instead of signal.h I get the following error :",
"When I run memory access checking on the sample project http : www.oracle.com technetwork server-storage solarisstudio downloads solaris-studio-samples-1408618.html provided by Oracle with Oracle Solaris Studio I ran into this error message : .. . .. . Please re-config Project memorychecks to be compiled with Oracle Solaris Studio12 Update 3 or higher .",
"Oracle Solaris Studio is the current name for the Sun cc compilers but Solaris 8 is a very old release and is about to end support life in a few months and software for it is no longer being made available for download other than via an Oracle support contract .",
"I tried to build Boost V1.57 with the brand new Solaris Studio 12.4 compiler on the Intel Solaris V11.2 platform .",
"Include the c-header and link into the project compiled with Solaris Studio .",
"Solaris Studio is generating the most puzzling of error messages .",
"From The Docs : http : docs.oracle.com cd E37069 01 html E37071 gndfg.html .. . .. . In C++ 11 mode the CC compiler uses the g++ ABI and a version of the g++ runtime library that is supplied with Oracle Solaris Studio .",
"It does appear to be an issue with the Solaris Studio 12.3 C++ preprocessor .",
"I m using java solaris-studio performance analyzer mainly to get use of the hardware counters .",
"Or is this a Solaris Studio bug when it mangles symbols",
"Is there an installation problem with my Solaris compiler",
"Problem description .. . .. . I am unable to compile libpqxx-4.0.1 on Solaris 10 using Solaris Studio 12.3 .",
"Solaris Studio 12.4 can be run in C++11 mode where it uses the GNU libstdc++ to provide its standard-library .",
"@Deduplicator I know that Solaris Studio has issues with some STL components .",
"If you don t specifically have a requirement for Sun Studio tcgware maintains a catalog of pre-compiled Solaris packages including for Solaris 8 Sparc .",
"It is a bug in the compiler and you have to report it to Oracle .",
"I don t have Solaris Studio so I can t confirm with that .",
"Is this a consequence of some obscure C++ rule implemented only on Solaris",
"Is someone able to compile this code successfully with an other Solaris compiler",
"So I am just wondering if a Boost or Solaris Studio developer reads this and helps me with some patches.. .",
"Looks like the Boost developers do not actively test with Solaris Studio any more .",
"I would like to extend my library which currently compiles only using gcc to be used by Solaris Studio as well .",
"@n.m . Solaris Studio does not compile my library since it does not compile third pary libs such as Apache Qpid",
"It depends whether you pay for the support to Oracle .",
"Edit boost archive detail register archive.hpp and change line 31 from : .. . .. . to : .. . .. . A long time ago somebody added a workaround for a bug in an old version of Solaris Studio but now Solaris Studio 12.4 finds the workaround code to be invalid but can cope with the code all the other compilers see .",
"The source at the end of the question will provoke what I believe is a mangling error on Solaris Studio and not on other compilers .",
"The first thing to know about building Boost with Solaris Studio is that the Jam file hasn t been updated for over 5 years and uses STLport as its C++ standard-library .",
"If you re not using STLport for the rest of your C++ code then ask another question about changing the Boost Jam files for Solaris Studio to use a different standard-library .",
"-bash-3.2 which CC .. . .. . -bash-3.2 cd libpqxx-4.0.1 .. . .. . -bash-3.2 . configure --prefix var tmp build install test --enable-shared --enable-documentation .. . .. . make from usr ccs bin was unable to build it earlier so now I try using dmake from Oracle Solaris Studio 12.3 .",
"I wasn t able to find any working link for Sun cc all I found are broken-links to Sun Solaris Studio .",
"update .. . .. . I found something looks like contains Solaris Studio 11 but I didn t use it I managed to find something locally .",
"I m trying to track down the problem that s producing an assembler error line 1 : Illegal flag - on Solaris 11.3 x64 under Sun Studio 12.3 .",
"I need to compile openssl on solaris 8 sparc the compilation is broke due to missing cc compiler .",
".. . Fortunately none of the C++ system libraries shipped with Solaris or Studio is affected by this bug or the hidden option so you don t need to worry about different versions of those libraries .",
"I think the Boost developers would be best off taking these out given that they no longer test on Solaris because the default visibility is global and at least that works .",
"Background .. . .. . If you demangle the symbol name that CC is complaining about you can see that it is compiling a const type 0 argument as the first argument : .. . .. . With g++ 3.4.6 on the exact same Solaris 10 box the symbols from block 1 demangle as : .. . .. . Why Oracle cannot achieve the same thing is beyond me .",
"The Linker scopes may not change after symbol definition errors are caused by an attempt to use Solaris symbol visibility directives .",
"I m deep inside an old rev 1.3.4 of synergy-project.org building it on Solaris Studio 12.4 There are 2 places in this program where a function is called with a pointer for argument and the pointer gets mangled on the way in .",
"An alternative site for downloading the latest pre-compiled version of gcc for Solaris is http : unixpackages.com however while it has the latest packages it is subscription based USD 20 for 10 packages .",
"After reporting my problem to Oracle I just got their answer : .. . .. . Thank you for reporting this and sorry for the problem .",
"The problem is that Solaris lint documentation specifies how to do this for only a few warning types as far as I can tell .",
"In the past the following form was used and the Solaris documentation suggests that this is still allowed but it doesn t seem to work .",
"Complicating the issue is that the Solaris lint does not give error numbers but rather uses identifiers like E CAST INT TO SMALL INT .",
"I ve never seen the line -e511 form with Solaris lint before - are you sure those aren t for another lint product",
"For the platform not supported message from the context library you re out-of-luck if you re on Solaris but maybe it doesn t matter if you re not using this particular Boost library .",
"The Sun Studio compiler is a special kind of hell .",
"I am trying to build Scipy on Solaris 11 although was able to proceed with build and installation I am constantly faced with following while running .. . .. . python -c from scipy.linalg import sqrtm .. . .. . isapython2.7 : fatal : relocation error : file usr lib python2.7 site-packages scipy linalg fblas.so : symbol zgemv : referenced symbol not found .. . .. . I have BLAS OpenBLAS and LApack libraries also I treid building with sunperf library shipped with Solaris Studio Which is suppose to be better performance alternative to BLAS and LAPack .",
"The following innocuous function fails to compile on Solaris Studio 12.3 .. . .. . which fails with the error message .. . .. . Could not find a match for std : : string : : basic string std : : istreambuf iterator char std : : char-traits char std : : istreambuf iterator char std : : char-traits char needed in OOTest : : FetchData const std : : string .",
"I m trying to compile a sample from boost-asio on Solaris-10 using SunStudio 12.4 .",
"It has already been fixed in our current development and ported to Studio 12.4 .",
"Did you try the suggestions for the Sun Studio compiler on the boost 1.57 page",
"One of the procedures has a variable of the other type as dummy argument : .. . .. . This program compiles and executes fine with gfortran : .. . .. . However compilation with the Solaris f95 crashes : .. . .. . If I do any further simplification to the source code then f95 compiles successfully .",
"Also most systems by now have a C++ ABI .",
"stackoverflow.com questions 27490165 http : stackoverflow.com questions 27490165 sun-studio-compiler-with-shared-libs-exceptions-do-not-work",
"The resulting c-header and binary are compiler independent as there is no name-mangling anymore .",
"No need to write anything in C extern C to get C linkage is enough .",
"I tried to post the errors on the OTN development forum https : community.oracle.com community-server 26 storage systems systems-development-and-management-tools application development in c c 2B 2B and fortran solaris-studio c c 2B 2B fortran compilers but it turned out that my simple OTN account does not let me add new posts .",
"-bash-3.2 pwd .. . .. . -bash-3.2 ls -al .. . .. . -bash-3.2 usr sfw bin gtar xf libpqxx-4.0.1.tar.gz .. . .. . Python 2.4.6 the usr bin python in Solaris 10 had trouble with a script so I did a quick and dirty patch .",
"Even if you re running in the default C++03 mode you d probably want to use the Apache C++ standard-library .",
"If you have a support contract you can get the Studio 12.4 patch for it otherwise the next release will contain the fix .",
"I m new to Sun Studio so I m trying to figure out how to do this without turning to Stack Overflow .",
"The link-to the Sun C++ Frontend Tales is broken for instance .",
"You could also add a C++ header-only wrapper for your C API to make it easily reusable from C++ and exception safe .",
".. . .. . Note : Besides name-mangling also watch out for problems related to exception-handling http : stackoverflow.com questions 27490165 sun-studio-compiler-with-shared-libs-exceptions-do-not-work .",
"no installation step just to see that all libraries can be built : .. . .. . Here is a compressed list of errors : .. . .. . IMO any decent C++ compiler should be able to build Boost as I can hardly imagine any serious C++ project without the Boost libraries .",
"Write wrapper functions in C which expose the relevant parts of the interface with extern C linkage .",
"In particular the documentation states : Complete support for polymorphism in Fortran 2003 is available .",
"Running mach build on SunOS 11.2 configure fails in the obj-i386-pc-solaris2.11 intl icu target directory claiming the C compiler can t make executables because cc is being invoked with what appears to be a MS compiler flag -MD .",
"But the compiler crashes .",
"Could you post the relevant corresponding C++ code fragment as well",
"As long as your library exposes a C API compatible with platform ABI sizes and alignments of C types calling conventions and does not throw C++ exceptions you are not going to have troubles linking your library using other compilers or languages .",
"It is as simple as that a bug in a piece of software a compiler .",
"I wanted to help see boost.org development running regression tests.html http : www.boost.org development running regression tests.html but that does not work either the process jam log object cannot be compiled .",
"In general internal error means the compiler has a bug .",
"Disclaimer : I ve never used Oracle s compiler before .",
"I expected problems only when exceptions pass the c-layer but it seems execptions are problematic in general",
"I need to be able to suppress lint warnings on specific lines of C code and I would like to do this with in-line directives .",
"The original code was cleaned out to make it a compilable C++ standalone source .",
"I am afraid those suggestions refer to much older versions of the compiler .",
"I tried to change the compiler from gcc to cc but the problem still exists .",
"Dump all the predefined compiler macros with cc -xdumpmacros -E dev-null .",
"So what makes you think you could compile it with a F95 compiler",
"Even though iterator traits is not a C++11 feature for some reason SunStudio can t compile it unless it is compiling in c++11 mode .",
"I thought it was C++03 so I m really confused as to why it can t compile it without setting std to c++11 .",
"I need std c++11 to compile but when I compile with c++11 on I can t link .",
"Both clang 3.5 and GCC 4.9.1 output hello world for both C and C++ for me .",
"OBJS memtest.o init array.o init array loc.o print list.o free list.o bld cust list.o CCFLAGS -c -g -DSTRDUP LDFLAGS -g gc memtest : OBJS CC -o gc memtest -lgc dbg -g OBJS memtest : OBJS cc LDFLAGS OBJS -o memtest",
"Autoconf is a nightmare when it doesn t work and it often doesn t especially if you aren t working on the Microsoft-of-the-Unix world namely Linux .",
"But iterator traits isn t even a C++11 feature is it",
"To illustrate here is a simple test program vaargs.c : .. . .. . The C preprocessor works as expected : .. . .. . But the C++ preprocessor removes the space between hello and world :",
"You might need to recompile all of the C++ code including 3rd-party libraries using this option .",
"I then got to the stage which was most important for my code to communicate with a proprietary C++ API .",
"Brief summary : 1 Bootstrapping went OK : .. . .. . 2 Build command-line note that I put b2 and the compiler in my PATH .",
"I strongly suspect that this is related to the use of -std c++11 .",
".. . .. . Complete source .. . .. . The following source is compilable as is on any compiler .",
"I was pretty sure the line 1 part was a red herring so I went straight to the Illegal flag - part because that s exactly the error you d get if --divide was actually interpreted as -- -d -i -v -i -d -e which is a totally common way that unix programs interpret their arguments .",
"It was compiled with g++ since I had it and other tools in my PATH ."
]
}
|
{
"confidence": [
102.08414459228516,
96.72786712646484,
94.85547637939453,
91.61421203613281,
83.28871154785156,
81.80342102050781,
68.40347290039062,
67.48204040527344,
66.03055572509766,
64.7665786743164,
62.98903274536133,
61.99058532714844,
46.70552062988281,
46.553401947021484,
44.10617446899414,
40.898277282714844,
39.89242172241211,
35.88991928100586,
35.88991928100586,
25.51954460144043
],
"content": [
"Question : I have been trying to compile an O-O fortran code with the fortran compiler of the Oracle Solaris Studio 12.4 suite the latest as far as I know . But the compiler crashes . Here is a simplified version of my problem . I define two simple types with one type-bound procedure each . One of the procedures has a variable of the other type as dummy argument : .. . .. . This program compiles and executes fine with gfortran : .. . .. . However compilation with the Solaris f95 crashes : .. . .. . If I do any further simplification to the source code then f95 compiles successfully . For instance it works fine if : .. . .. . type0 has no type-bound procedure .. . type1 has no type-bound procedure .. . procedure print diff is replaced by a subroutine with no other argument than self .. . .. . Is there anything I am doing wrong Is there an installation problem with my Solaris compiler Is someone able to compile this code successfully with an other Solaris compiler Does someone know what the error-code means I haven t been able to find that out Comment : In general internal error means the compiler has a bug . This is something to discuss with the vendor usually . Comment : Ican confirm the error on my machine . With gfortran it compiles and prints 7 . It is a bug in the compiler and you have to report it to Oracle . A patch might be available to paying customers only . You can try to find a workaround . Comment : Isn t this F2003 code So what makes you think you could compile it with a F95 compiler Disclaimer : I ve never used Oracle s compiler before . Comment : @NoseKnowsAll : Well f95 based on fortran95 standard but it also includes numerous 200x features extensions . In particular the documentation states : Complete support for polymorphism in Fortran 2003 is available . Maybe it does not include full support of type-bound procedures . Comment : It formally supports them but they have a bug . Read again : Internal Error . It is as simple as that a bug in a piece of software a compiler . Nothing new . Report and hope it to be fixed . It may have been already fixed but the patch may be unavailable to you . It depends whether you pay for the support to Oracle . .. . Answer : After reporting my problem to Oracle I just got their answer : .. . .. . Thank you for reporting this and sorry for the problem . This is a known problem . It has already been fixed in our current development and ported to Studio 12.4 . If you have a support contract you can get the Studio 12.4 patch for it otherwise the next release will contain the fix .",
"Question : null .. . Answer : When I run memory access checking on the sample project http : www.oracle.com technetwork server-storage solarisstudio downloads solaris-studio-samples-1408618.html provided by Oracle with Oracle Solaris Studio I ran into this error message : .. . .. . Please re-config Project memorychecks to be compiled with Oracle Solaris Studio12 Update 3 or higher . I tried to change the compiler from gcc to cc but the problem still exists . Is it possible that the problem is with the Makefile Comment : It s possible it s the Makefile . More details would help . Comment : OBJS memtest.o init array.o init array loc.o print list.o free list.o bld cust list.o CCFLAGS -c -g -DSTRDUP LDFLAGS -g gc memtest : OBJS CC -o gc memtest -lgc dbg -g OBJS memtest : OBJS cc LDFLAGS OBJS -o memtest Comment : The details could be seen in the sample project",
"Question : I need to compile openssl on solaris 8 sparc the compilation is broke due to missing cc compiler . I wasn t able to find any working link for Sun cc all I found are broken-links to Sun Solaris Studio . update .. . .. . I found something looks like contains Solaris Studio 11 but I didn t use it I managed to find something locally . url : https : updates.oracle.com download 12685437.html Comment : Oracle Solaris Studio is the current name for the Sun cc compilers but Solaris 8 is a very old release and is about to end support life in a few months and software for it is no longer being made available for download other than via an Oracle support contract . .. . Answer : An alternative site for downloading the latest pre-compiled version of gcc for Solaris is http : unixpackages.com however while it has the latest packages it is subscription based USD 20 for 10 packages . gcc also has 4 or 5 dependencies pre-requisite packages to install so keep that in mind when choosing your subscription plan . You can also get pre-compiled versions of openssl and dependencies from there and avoid the need to compile your own but if you expect to need to compile other packages in the future then getting gcc is probably the better strategy .",
"Question : I need to compile openssl on solaris 8 sparc the compilation is broke due to missing cc compiler . I wasn t able to find any working link for Sun cc all I found are broken-links to Sun Solaris Studio . update .. . .. . I found something looks like contains Solaris Studio 11 but I didn t use it I managed to find something locally . url : https : updates.oracle.com download 12685437.html Comment : Oracle Solaris Studio is the current name for the Sun cc compilers but Solaris 8 is a very old release and is about to end support life in a few months and software for it is no longer being made available for download other than via an Oracle support contract . .. . Answer : If you don t specifically have a requirement for Sun Studio tcgware maintains a catalog of pre-compiled Solaris packages including for Solaris 8 Sparc . http : jupiterrise.com tgcware tgcware.solaris.html .. . .. . You can get gcc and dependencies there .",
"Question : I tried to build Boost V1.57 with the brand new Solaris Studio 12.4 compiler on the Intel Solaris V11.2 platform . I tried to post the errors on the OTN development forum https : community.oracle.com community-server 26 storage systems systems-development-and-management-tools application development in c c 2B 2B and fortran solaris-studio c c 2B 2B fortran compilers but it turned out that my simple OTN account does not let me add new posts . Hence the question to SO . Brief summary : 1 Bootstrapping went OK : .. . .. . 2 Build command-line note that I put b2 and the compiler in my PATH . This is a stage build i.e . no installation step just to see that all libraries can be built : .. . .. . Here is a compressed list of errors : .. . .. . IMO any decent C++ compiler should be able to build Boost as I can hardly imagine any serious C++ project without the Boost libraries . So I am just wondering if a Boost or Solaris Studio developer reads this and helps me with some patches.. . Many thanks for any hints Comment : Did you try the suggestions for the Sun Studio compiler on the boost 1.57 page boost.org doc libs 1 57 0 doc html bbv2 http : www.boost.org doc libs 1 57 0 doc html bbv2 reference.html bbv2.reference.tools.compiler.sun Comment : I am afraid those suggestions refer to much older versions of the compiler . The link-to the Sun C++ Frontend Tales is broken for instance . Looks like the Boost developers do not actively test with Solaris Studio any more . I wanted to help see boost.org development running regression tests.html http : www.boost.org development running regression tests.html but that does not work either the process jam log object cannot be compiled . This happens well before any of the actual tests can be run . Ain t look good : - .. . Answer : The first thing to know about building Boost with Solaris Studio is that the Jam file hasn t been updated for over 5 years and uses STLport as its C++ standard-library . This may not be what you want . Solaris Studio 12.4 can be run in C++11 mode where it uses the GNU libstdc++ to provide its standard-library . Even if you re running in the default C++03 mode you d probably want to use the Apache C++ standard-library . If you re not using STLport for the rest of your C++ code then ask another question about changing the Boost Jam files for Solaris Studio to use a different standard-library . Moving on to the exact error messages you re seeing I think all the ones in the archive library have the same cause and it s easy to fix . Edit boost archive detail register archive.hpp and change line 31 from : .. . .. . to : .. . .. . A long time ago somebody added a workaround for a bug in an old version of Solaris Studio but now Solaris Studio 12.4 finds the workaround code to be invalid but can cope with the code all the other compilers see . For the platform not supported message from the context library you re out-of-luck if you re on Solaris but maybe it doesn t matter if you re not using this particular Boost library . The Linker scopes may not change after symbol definition errors are caused by an attempt to use Solaris symbol visibility directives . I think the Boost developers would be best off taking these out given that they no longer test on Solaris because the default visibility is global and at least that works . To make all symbols global and avoid these problems edit boost config compiler sunpro cc.hpp and delete these lines : .. . .. . and also edit libs math build Jamfile.v2 and delete this line : .. . .. . For the last few errors you pasted more context is needed to see where they come from . Comment : Thanks a lot for the very detailed comments . I ll try your suggestions in the next few days and report back here -- unfortunately I am very busy right now with less interesting things : -",
"Question : The C++ preprocessor of Oracle Solaris Studio 12.3 removes whitespace completely when expanding VA ARGS . Can anybody confirm this behaviour on their system Is it a known compiler bug Are there any workarounds for this problem To illustrate here is a simple test program vaargs.c : .. . .. . The C preprocessor works as expected : .. . .. . But the C++ preprocessor removes the space between hello and world : Comment : Both clang 3.5 and GCC 4.9.1 output hello world for both C and C++ for me . I don t have Solaris Studio so I can t confirm with that . Comment : It does appear to be an issue with the Solaris Studio 12.3 C++ preprocessor . The problem does not occur with the previous version 12.2 . .. . Answer : This is a compiler bug as per N3337 http : www.open-std.org jtc1 sc22 wg21 docs papers 2012 n3337.pdf 16.3.2 cpp.stringize p2 the rest of the quote is snipped : .. . .. . A character string literal is a string-literal with no prefix . If in the replacement list a parameter is immediately preceded by a preprocessing token both are replaced by a single character string literal preprocessing token that contains the spelling of the preprocessing token sequence for the corresponding argument . Each occurrence of white space between the argument s preprocessing tokens becomes a single space character in the character string literal . Comment : Actually the removal of whitespace occurs before the stringize step in the expansion of VA ARGS . Comment : Agreed the text of N3337 isn t 100 clear on this .",
"Question : The source at the end of the question will provoke what I believe is a mangling error on Solaris Studio and not on other compilers . The error message was reformatted with new lines for clarity : .. . .. . Note how the two functions runGenEntries s first parameter differ only by one character the s at the end of Rule .. . .. . This seems to happen when the first parameter is of type : .. . .. . And doesn t happen when the first parameter is instead of type : .. . .. . Which resolves to the same type in the end Is this a consequence of some obscure C++ rule implemented only on Solaris Or is this a Solaris Studio bug when it mangles symbols .. . .. . Complete source .. . .. . The following source is compilable as is on any compiler . The define will either activate the code that provokes the error or activate code which would be supposed to produce the same result but this time without bug : .. . .. . This code was compiled on the following plaform : Comment : Doesn t fix the bug but FWIW long type names like that differing in only a single character is someday going to be a maintenance nightmare as well as a likely source of potential very hard to find bugs especially if the two types have similar interfaces.. . Comment : @twalberg : Good observation . Note that this is not the original code . The original code was cleaned out to make it a compilable C++ standalone source . .. . Answer : Short answer .. . .. . Short answer : this appears to be unfixable bug 6532605 I see it referenced on numerous google searches but I cannot open the bug itself on https : support.oracle.com rs type bug id 6532605 https : support.oracle.com rs type bug id 6532605 . A workaround done by Qt developers is to put the method definition in a separate compilation unit .cpp file . Background .. . .. . If you demangle the symbol name that CC is complaining about you can see that it is compiling a const type 0 argument as the first argument : .. . .. . With g++ 3.4.6 on the exact same Solaris 10 box the symbols from block 1 demangle as : .. . .. . Why Oracle cannot achieve the same thing is beyond me . The Qt Workaround .. . .. . The Qt code where this bug workaround are referenced is here https : qt.gitorious.org qt qtxmlpatterns source ede75fb49c9ed59304976b8ba1523874771f7c87 3asrc xmlpatterns functions qsequencegeneratingfns p.h L128 . We can see there are two functions declared with a similar name : .. . .. . And each is compiled in its own source here https : qt.gitorious.org qt qtxmlpatterns source b52522963a86206ca8c7489bfacd5cc226bf201c 3asrc xmlpatterns functions qsequencefns.cpp L308 and here https : qt.gitorious.org qt qtxmlpatterns source b52522963a86206ca8c7489bfacd5cc226bf201c 3asrc xmlpatterns functions qsequencegeneratingfns.cpp L182 to work around the bug . Unsupported solution : Change the mangling option in ccfe .. . .. . From here https : community.oracle.com thread 1995039 start 0 tstart 0 you can also compile with -Qoption ccfe -abiopt mangle6 . With these flags the code compiles successfully and the symbols demangled are : .. . .. . The problem is that this compilation option is not supported https : community.oracle.com thread 2364317 tstart 0 as written by Steve Clamage : .. . .. . Finally the compiler has a hidden option to fix all known mangling bugs unconditionally . We don t publicize the option because .. . .. . It is unstable . Future patches or releases could change mangling if more bugs are found . You might need to recompile all of the C++ code including 3rd-party libraries using this option . If you create a library with this option it might be incompatible with code compiled without the option . As with all hidden options it is subject to change or removal without notice . We view this option as use at your own risk . .. . If after all these caveats you still want to try the option here it is : .. . .. . .. . -Qoption ccfe -abiopt mangle6 .. . .. . .. . Be sure to add it to every CC command and recompile everything . .. . Fortunately none of the C++ system libraries shipped with Solaris or Studio is affected by this bug or the hidden option so you don t need to worry about different versions of those libraries .",
"Question : I would like to extend my library which currently compiles only using gcc to be used by Solaris Studio as well . My idea is to do the following : .. . .. . 1 . Write wrapper functions in C which expose the relevant parts of the interface with extern C linkage . 2 . Then build this library using gcc . The resulting c-header and binary are compiler independent as there is no name-mangling anymore . 3 . Include the c-header and link into the project compiled with Solaris Studio . Question : Is this a feasible approach or is there a better solution to this problem .. . .. . Note : Besides name-mangling also watch out for problems related to exception-handling http : stackoverflow.com questions 27490165 sun-studio-compiler-with-shared-libs-exceptions-do-not-work . Comment : No need to write anything in C extern C to get C linkage is enough . Also most systems by now have a C++ ABI . Just make sure to avoid using anything not covered by it Which means mostly some library-features . Comment : An arguably better solution is to keep the library as source code and compile for whatever platform on demand . Comment : @Deduplicator I know that Solaris Studio has issues with some STL components . Would this work for methods like code myMethod std : : vector myClass data code Comment : @n.m . Solaris Studio does not compile my library since it does not compile third pary libs such as Apache Qpid Comment : Well that sucks . File bug reports with both vendors . .. . Answer : Your plan is correct . As long as your library exposes a C API compatible with platform ABI sizes and alignments of C types calling conventions and does not throw C++ exceptions you are not going to have troubles linking your library using other compilers or languages . You could also add a C++ header-only wrapper for your C API to make it easily reusable from C++ and exception safe . Comment : You were right to point out exceptions as a possible issue . I expected problems only when exceptions pass the c-layer but it seems execptions are problematic in general stackoverflow.com questions 27490165 http : stackoverflow.com questions 27490165 sun-studio-compiler-with-shared-libs-exceptions-do-not-work",
"Question : Problem description .. . .. . I am unable to compile libpqxx-4.0.1 on Solaris 10 using Solaris Studio 12.3 . Background .. . .. . The first thing I did when I needed libpqxx was to search for it in OpenCSW using opt csw bin pkgutil -a libpqxx . However the package in OpenCSW is listed as being version 5.0 REV 2012.05.06 and looking at CSWlibpqxx5-0 http : www.opencsw.org packages CSWlibpqxx5-0 on the OpenCSW website seems to indicate that this is an old unstable snapshot . I would like a stable version . I downloaded libpqxx-4.0.1.tar.gz from the libpqxx website and compiled it . It was compiled with g++ since I had it and other tools in my PATH . It worked . Everything was coming along nicely . I was able to SELECT from my database and so on . I then got to the stage which was most important for my code to communicate with a proprietary C++ API . My code would no longer compile with g++ after I attempted to link-to the libraries for this API . The API includes examples which I had previously compiled using CC . The examples do not compile using g++ . I figured that I d have to compile my code using CC as well instead of using g++ . My code would not compile using CC . There was something with the g++ compiled libpqxx-4.0.1 that CC did not like . Thus I decided that I d need to compile libpqxx-4.0.1 using CC also instead of using g++ . Steps taken .. . .. . To eliminate problems caused by a potentially misconfigured environment I ve been using my account on the system since 2012 and over time various environment-variables and such have accumulated I created a new user on the system with a clean home-directory . Below is a transcript of what I did next leading up to the build error . -bash-3.2 pwd .. . .. . -bash-3.2 ls -al .. . .. . -bash-3.2 usr sfw bin gtar xf libpqxx-4.0.1.tar.gz .. . .. . Python 2.4.6 the usr bin python in Solaris 10 had trouble with a script so I did a quick and dirty patch . -bash-3.2 diff libpqxx-4.0.1 tools splitconfig splitconfig .. . .. . -bash-3.2 cp splitconfig libpqxx-4.0.1 tools .. . .. . My PATH at this point is only usr bin . -bash-3.2 echo PATH .. . .. . I need ld . It is found in usr ccs bin . -bash-3.2 export PATH PATH : usr ccs bin .. . .. . CC is from Oracle Solaris Studio 12.3 . See details under heading additional information . -bash-3.2 which CC .. . .. . -bash-3.2 cd libpqxx-4.0.1 .. . .. . -bash-3.2 . configure --prefix var tmp build install test --enable-shared --enable-documentation .. . .. . make from usr ccs bin was unable to build it earlier so now I try using dmake from Oracle Solaris Studio 12.3 . -bash-3.2 which make .. . .. . -bash-3.2 which dmake .. . .. . -bash-3.2 dmake .. . .. . Additional information .. . .. . -bash-3.2 cat etc release .. . .. . -bash-3.2 usr bin version .. . .. . -bash-3.2 pkgchk -l -p usr bin CC .. . .. . -bash-3.2 pkginfo grep SPRO Comment : Does the code you want to link with require that you use the old default implementation of the standard-library If yes prepare the aspirin . If not please use one of the 2 alternatives provided by this compiler -library stlport4 or stdcxx4 . It is funny how they have an autoconf test for reverse iterator that says no but they still use it.. . Comment : @MarcGlisse : Thank you for your comment it was the missing piece of information I needed to get libpqxx-4.0.1 to build . .. . Answer : How I got libpqxx to build .. . .. . Clean mess from previous attempt .. . .. . rm -rf install test .. . .. . rm -rf libpqxx-4.0.1 .. . .. . Logged out logged in set PATH . export PATH usr bin : usr ccs bin .. . .. . Create install test dir extract libpqxx tarball go into extracted dir .. . .. . mkdir install test .. . .. . usr sfw bin gtar xf libpqxx-4.0.1.tar.gz .. . .. . cd libpqxx-4.0.1 .. . .. . Apply patches .. . .. . Mine .. . .. . cat . . splitconfig.diff .. . .. . patch -i . . splitconfig.diff tools splitconfig .. . .. . Patches from OpenCSW .. . .. . These two patches were written for the development version of libpqxx but they apply cleanly to libpqxx-4.0.1 using gpatch installed from OpenCSW . The patches were found at https : buildfarm.opencsw.org source xref opencsw csw mgar pkg libpqxx trunk files 0001-Can-t-instantiate-a-const-iterator-from-non-const.patch and https : buildfarm.opencsw.org source xref opencsw csw mgar pkg libpqxx trunk files 0002-Don-t-test-for-reverse-iters-if-they-re-not-there.patch via https : buildfarm.opencsw.org source xref opencsw csw mgar pkg libpqxx trunk Makefile via http : www.opencsw.org package libpqxx5 0 link called OpenGrok . Both of the patches I used were from revision 17955 of OpenCSW . opt csw bin gpatch src connection base.cxx . . 0001-Can-t-instantiate-a-const-iterator-from-non-const.patch .. . .. . opt csw bin gpatch test unit test binarystring.cxx . . 0002-Don-t-test-for-reverse-iters-if-they-re-not-there.patch .. . .. . Configure and make make install .. . .. . CXXFLAGS -library stlport4 . configure --prefix var tmp build install test --enable-shared yes --enable-static no --enable-documentation yes .. . .. . make .. . .. . make install .. . .. . The documentation for some reason is built but not installed . That s just a minor problem though .",
"Question : null .. . Answer : I am trying to build Scipy on Solaris 11 although was able to proceed with build and installation I am constantly faced with following while running .. . .. . python -c from scipy.linalg import sqrtm .. . .. . isapython2.7 : fatal : relocation error : file usr lib python2.7 site-packages scipy linalg fblas.so : symbol zgemv : referenced symbol not found .. . .. . I have BLAS OpenBLAS and LApack libraries also I treid building with sunperf library shipped with Solaris Studio Which is suppose to be better performance alternative to BLAS and LAPack . Any ideas suggestions",
"Question : null .. . Answer : Consider the following example : .. . .. . CC test.cpp succeeds . But .. . .. . I also tried the following : .. . .. . But yields the same error . -m64 doesn t help either . Nor does - lstdc++ -lgcc s -lCrunG3 . OS : Solaris 11 Compiler : CC from Oracle Solaris Studio 12.4 .. . .. . Output requested : .. . .. . If I use csignal instead of signal.h I get the following error : Comment : Hasn t this been asked just about ten minutes ago Comment : @cad...umm i think 23 minutes.. . Comment : @cad you know something more strange . I have seen this kind of trend from a week . May be some students from the same class are here . Asking similar questions regarding their work . Comment : I deleted my question I think I m allowed to do it because in the meanwhile I found out it s not specific to linking and can be reproduced by a small example . So I opened a in my opinion better question to avoid the show me your code and show me the compiler-flags questions . And I m at a workplace so I coudln t provide the exact information . Comment : From the CONFORMING TO section of a recent Linux man-page for sigset : SVr4 POSIX.1-2001 . These functions are obsolete : do not use them in new programs . POSIX.1-2008 marks sighold sigignore sigpause sigrelse and sigset as obsolete recommending the use of sigaction 2 sigprocmask 2 pthread sigmask 3 and sigsuspend 2 instead .",
"Question : null .. . Answer : I m using java solaris-studio performance analyzer mainly to get use of the hardware counters . But every time I try and use them I get this error : .. . .. . This is an example command-line : .. . .. . Any help gratefully received",
"Question : I m trying to compile a sample from boost-asio on Solaris-10 using SunStudio 12.4 . Compiling with GCC 4.9.2 works but down the line I will be required to support both compilers so just switching is not an option . CC -V output : CC : Sun C++ 5.13 SunOS sparc 2014 10 20 .. . .. . Compilation Line : for each cpp file .. . .. . CC -m32 -std c++11 -I . asio-1.10.6 include -I . boost include boost-1 58 -c .cpp -o .o .. . .. . Linker Line : note that .o is actually a list of all the object-files previously generated .. . .. . CC -m32 -L . boost sparc sun release32 lib .o -o httpServer -lCrun -lCstd -lxnet -lboost system .. . .. . The Problem : .. . .. . I get a bunch of unresolved symbols for standard-library stuff like string ios base locale etc . . I posted the linker errors here http : textuploader.com x269 . I strongly suspect that this is related to the use of -std c++11 . I included this option because of a compilation issue with iterator traits . Even though iterator traits is not a C++11 feature for some reason SunStudio can t compile it unless it is compiling in c++11 mode . The error regarding iterator traits : .. . .. . Error : iterator traits is not a member of std . .. . .. . The code causing this compile failure is in boost boost detail iterator.hpp . Code follows . Other things which include and use this header generate errors like Error : iterator traits is not a member of boost : : detail and then other syntax errors because now it thinks all the following code is invalid . Other Things I ve Tried : .. . .. . Adding -lC before -lCrun the linker can t find that library .. . Adding -lc similar issue . Checked in the SUNWspro libs directory and found that libCrun.so and libCstd.so both exist . Putting -lCstd before -lCrun .. . .. . Other Less Relevant Information : .. . .. . SPARC .. . the asio sample in question is the httpServer I believe it s under the server directory in examples Comment : I deleted my answer because I think I was wrong . Maybe I glossed over your linker errors before . Comment : Try adding -lstdc++ to your compiler args . Comment : @TechnikEmpire the linker can t find the sdtc++ library . Also in a previous comment you suggested adding -lm . I tried that as well and although the linker can find it it makes no difference . Comment : docs.oracle.com cd E37069 01 html E37071 gndfg.html http : docs.oracle.com cd E37069 01 html E37071 gndfg.html - It s definitely an issue with simply failing to link-to the standard-library somehow . Comment : If you just just your linked compiler errors as search terms you ll come across dozens of posts like this stackoverflow.com questions 7038258 http : stackoverflow.com questions 7038258 gcc-4-5-2-linker-gots-problem-while-using-exceptions-c all pointing to the source issue . According to do the docs in C++11 mode it s simply using the standard-library provided by g++ 4.8.2 . Search your file system and obviously where it should be paths trying to find this to see if it s even on your system . .. . Answer : From The Docs : http : docs.oracle.com cd E37069 01 html E37071 gndfg.html .. . .. . In C++ 11 mode the CC compiler uses the g++ ABI and a version of the g++ runtime library that is supplied with Oracle Solaris Studio . For this release version 4.8.2 of the g++ runtime library is used . .. . An ABI describes the low-level details in the generated object code . Modules that use different ABIs cannot successfully be linked together into a program . This means that you must use C++11 mode on all modules in your program or none of them . So with that said you must specify --std c++11 to the linker phase too . You re not doing this presently . Comment : But iterator traits isn t even a C++11 feature is it I thought it was C++03 so I m really confused as to why it can t compile it without setting std to c++11 . I will look into posting code tomorrow . Comment : It s both . I need std c++11 to compile but when I compile with c++11 on I can t link . Interesting about the fact that the compiler only supports x86 architectures . Comment : Ah Okay that s really good info . Thanks for all your effort .",
"Question : I m trying to track down the problem that s producing an assembler error line 1 : Illegal flag - on Solaris 11.3 x64 under Sun Studio 12.3 . The Sun Studio compiler is a special kind of hell . Systematically removing -xO2 -native -m64 -Kpic etc .. . does not resolve it . I found a similar report over at Mozilla http : gcc.gnu.org bugzilla show bug.cgi id 9362 but dropping the debugging symbols did not resolve it . The first line of the assembler file is .file .. . shown below so its not clear to me where the illegal flags is coming from . Why am I experiencing line 1 : Illegal flag - and how do I fix it .. . .. . Adding -v and -keeptmp results in the following . Comment : What is the simplest commandline that produces the same error E.g . cc test.cxx .. . Answer : Your problem is -Wa --divide which according to multiple sources --divide is not a valid parameter to the assembler . For example see https : docs.oracle.com cd E37069 01 html E54439 fbe-1.html for accepted parameters . To arrive at this conclusion I started with your -v output . The key lines I saw were that it failed right after running fbe and that the error was Assembler : line 1 : Illegal flag - . I was pretty sure the line 1 part was a red herring so I went straight to the Illegal flag - part because that s exactly the error you d get if --divide was actually interpreted as -- -d -i -v -i -d -e which is a totally common way that unix programs interpret their arguments . So then I just googled fbe command-line-arguments or something similar to see if that was a valid parameter . Comment : Thanks Mark . Please forgive my ignorance.. . How did you identify -Wa --divide from the diagnostics Where is the Line 1 its referring to I m new to Sun Studio so I m trying to figure out how to do this without turning to Stack Overflow . To show you how naive I am I did not know fbe was a program or it was the assembler .",
"Question : I need to be able to suppress lint warnings on specific lines of C code and I would like to do this with in-line directives . This is for a very large body of legacy code that I am porting to 64 bit and I d much rather put the directives in the code than in the Makefile that runs lint as the latter is quite obscure . The problem is that Solaris lint documentation specifies how to do this for only a few warning types as far as I can tell . In the past the following form was used and the Solaris documentation suggests that this is still allowed but it doesn t seem to work . Complicating the issue is that the Solaris lint does not give error numbers but rather uses identifiers like E CAST INT TO SMALL INT . Here is the old way and there are lots of these in the code already : Comment : Have you tried line -eE CAST INT TO SMALL INT just substituting the identifier for the error number Comment : Wondering if OP should suppress these warnings . Maybe post an example of code with a warning that OP would like to suppress Comment : @chux - Agreed . When porting old code to 64-bit I d think lint warnings such as E CAST INT TO SMALL INT are exactly the kinds of problems that must be fixed especially if they involve size-t and or pointer code written by someone who knows that size-t is an unsigned int . That sounds all too likely here . Comment : I ve never seen the line -e511 form with Solaris lint before - are you sure those aren t for another lint product Comment : I tried the lint -e.. . and it did not work . The existing code had a number of lines of that form from ancient history when lint -e number did work . I am suppressing the warnings because the particular piece of code will not encounter a case where more than 32 is needed but is part of a huge code base where it is not worth rewriting tons of code potentially introducing bugs in order to make this warning go away naturally . .. . Answer : Described in Lint Directives Section at this link http : docs.oracle.com cd E18659 01 html 821-1384 bjaih.html scrolltoc .. . .. . There are two inline ways to suppress lint warnings for a single line of code - the old way and the recommended new way . The old way is to use a LINTED comment : LINTED .. . .. . The new way is to use a lint macro : NOTE LINTED msg .. . .. . The new way also requires including note.h .",
"Question : Solaris Studio is generating the most puzzling of error messages . And the error message is : .. . .. . line 161 : Error : Cannot use char to initialize const char . Why should it be a problem to add constness I am stuck please help me out.. . .. . .. . .. . .. . The pointer char inbufptr points to the beginning of the array and does not promise to keep anything constant . Now if I now have a pointer char const inbufptr pos this type promises not the change the contents of the array but I can still change where the pointer points to . If I do that I have not changed the array and I don t see a problem with that . .. . Answer : Assume this was legal . Now you can change inbufptr but inpufptrpos is const thus it should not be changed . You see that this doesn t make much sense . It s like const is not respected With the help of this http : stackoverflow.com questions 1468148 initialization-between-types-const-int-const-and-int-is-not-allowed-why answer I hope this helped : Comment : Yeah I didn t think of that thanks nice question by the way @Beginner +1",
"Question : I m deep inside an old rev 1.3.4 of synergy-project.org building it on Solaris Studio 12.4 There are 2 places in this program where a function is called with a pointer for argument and the pointer gets mangled on the way in . Compiling and linking in -m64 . What can I look at in build flags or other to figure out why this is haywire In the log below the program is breakpointed inside the function that sees the wrong pointer . It s parent up on the stack has the correct data : .. . .. . The code : .. . .. . ...where m parser resolves to : .. . .. . .. . Notice how m parser gets reloaded as the comm protocol moves along . In answer to the question about stepping into the function : it is broken upon entry to the function and causes the function to crash soon after . If I hardcode parseHandshakeMessage into handleData it works correctly . However I have other examples in this system that rely on function-pointers to work correctly . I might post the compile flags they re redundant and extensive . Comment : Could you post the relevant corresponding C++ code fragment as well Also are you sure you have stopped the program at a point the argument is actually initialized Maybe you need to step over the first line of the callee or something Comment : Producing an MCVE http : stackoverflow.com help mcve is the best thing you could do . If you can t make one i.e . the bug goes away when you remove some code then that is a strong clue as to where the bug is comign from . .. . Answer : Try compiling everything with +W2 -xport64 . That might generate a lot of errors warnings . Ideally your code should be clean of all warnings especially those generated from -xport64 .",
"Question : null .. . Answer : The following innocuous function fails to compile on Solaris Studio 12.3 .. . .. . which fails with the error message .. . .. . Could not find a match for std : : string : : basic string std : : istreambuf iterator char std : : char-traits char std : : istreambuf iterator char std : : char-traits char needed in OOTest : : FetchData const std : : string . Now I checked the file std : : string and found the following .. . .. . SO I guess std : : string has a declaration for the overload .. . .. . which should have matched .. . .. . but unfortunately it didn t . So I have two questions .. . .. . 1 . Why doesn t my construction via std : : istreambuf iterator char doesn t match 2 . What is this macro RWSTD NO MEMBER TEMPLATES for Note .. . .. . 1 . Based on the comment I tried to generate the pre-processor output by running CC -E test.cpp pre.out and found the iterator version was not generated . So I tried undefining RWSTD NO MEMBER TEMPLATES but that didn t help . Comment : Can you check preprocessor output to see if that macro is in fact skipping that constructor declaration Comment : @aschepler : As per the pre-processor output the iterator version of the constructor was not generated so I tried undefining the macro RWSTD NO MEMBER TEMPLATES but that didn t help Comment : Your standard-library implementation is probably outdated . Use a different implementation . See here https : community.oracle.com message 9936913 . Comment : Hello did you find a solution for that problem which I am also facing",
"Question : Solaris Studio is generating the most puzzling of error messages . And the error message is : .. . .. . line 161 : Error : Cannot use char to initialize const char . Why should it be a problem to add constness I am stuck please help me out.. . .. . .. . .. . .. . The pointer char inbufptr points to the beginning of the array and does not promise to keep anything constant . Now if I now have a pointer char const inbufptr pos this type promises not the change the contents of the array but I can still change where the pointer points to . If I do that I have not changed the array and I don t see a problem with that . .. . Answer : This is an age-old problem whereby intuitively you think you can add const ness but in fact adding const ness indirectly violates const -correctness . The standard itself even has an example of it to help set people back on the correct path : .. . .. . http : kera.name articles 2009 12 a-question-on-indirect-constness Comment : My answer wasn t that bad in comparison to this or was it I don t care about the reputation I just want to see my mistake . Can you take a look please : Comment : @G.Samaras : You didn t quite get the example right . Comment : Can you please explain why so I can learn from my mistake : Comment : @G.Samaras : Study this one and you ll see Comment : @G.Samaras : Hint : inpufptrpos is not the problem e.g . you can have int x 5 const int ptr x x 6 and not have trouble -- this is the equivalent of your example",
"Question : null .. . Answer : Running mach build on SunOS 11.2 configure fails in the obj-i386-pc-solaris2.11 intl icu target directory claiming the C compiler can t make executables because cc is being invoked with what appears to be a MS compiler flag -MD . Even thought I am running mach with CC and SOLARIS SUNPRO CC set to cc CXX and SOLARIS SUNPRO CXX set to CC in the environment this flag seems to be coming from RTL FLAGS in config config.mk but by rights it shouldn t be happening because of the ifeq around it . Can anyone tell me how to fix this please Comment : Dump all the predefined compiler macros with cc -xdumpmacros -E dev-null . Run that in same environment . Maybe the build-process is picking up on something else . Dumping predefined macros for all major compilers : nadeausoftware.com articles 2011 12 http : nadeausoftware.com articles 2011 12 c c tip how list compiler predefined macros Comment : Thanks for a good suggestion but it doesn t work . I have resorted to editing the configure scripts and putting in the right flags at the point where they are needed . Autoconf is a nightmare when it doesn t work and it often doesn t especially if you aren t working on the Microsoft-of-the-Unix world namely Linux ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
linux
|
UNK_RELATION
|
jena-rules@semantic-web@63
|
jena-rules -- jena-rules is java-based framework for building @placeholder applications.an environment for rdf rdfs and owl sparql and includes a rule-based inference engine.three kind of rules according with their execution model : forward rules backward rules and hybrid rules .
|
{
"confidence": [
90.30596160888672,
89.44332885742188,
88.56098175048828,
86.03824615478516,
84.4814682006836,
82.82989501953125,
81.47252655029297,
80.28741455078125,
78.32440948486328,
78.05496978759766,
76.83082580566406,
73.61338806152344,
71.91321563720703,
71.38377380371094,
71.38377380371094,
69.45719146728516,
68.18782806396484,
67.70263671875,
66.35873413085938,
65.32199096679688,
64.56011199951172,
63.88151550292969,
63.88151550292969,
63.78709411621094,
62.866146087646484,
59.15678405761719,
58.36019515991211,
57.05633544921875,
56.8239631652832,
56.695274353027344,
56.24909210205078,
56.24909210205078,
55.563804626464844,
55.07716369628906,
54.95946502685547,
54.69731140136719,
54.667816162109375,
54.145774841308594,
54.145774841308594,
54.13337707519531,
53.69038772583008,
53.48072052001953,
53.48072052001953,
53.48072052001953,
53.48072052001953,
53.48072052001953,
53.46897506713867,
53.13685607910156,
52.92323303222656,
52.77568817138672,
52.22547149658203,
51.146358489990234,
50.167816162109375,
49.78990936279297,
49.11042022705078,
48.59243392944336,
48.59243392944336,
47.811004638671875,
46.50934600830078,
46.50934600830078,
46.50934600830078,
44.744903564453125,
43.952598571777344,
43.38782501220703,
42.97430419921875,
42.59845733642578,
42.59845733642578,
42.592071533203125,
42.44736862182617,
41.40564727783203,
41.159690856933594,
39.471763610839844,
39.12843322753906,
39.030426025390625,
38.942710876464844,
38.413509368896484,
38.302276611328125,
38.04698944091797,
37.12474822998047,
37.12474822998047,
36.930416107177734,
36.330421447753906,
36.330421447753906,
35.05805587768555,
35.05805587768555,
34.77682113647461,
34.72731018066406,
34.41063690185547,
34.41063690185547,
33.37480926513672,
33.37480926513672,
33.35541534423828,
32.974971771240234,
32.83782958984375,
31.691158294677734,
31.61737823486328,
31.61737823486328,
31.443187713623047,
30.754745483398438,
30.754745483398438
],
"content": [
"please how creating Jena Rules .",
"Jena rules aren t RDF and you don t read them into a model .",
"For this I want to use Jena Rules on a inferred model .",
"The .rules files are files with rules used by all the different Jena reasoners http : jena.apache.org documentation inference .",
"You can do math with Jena rules .",
"RDFS is RDF and it is implemented internally using rules .",
"Yes you can do this in both Jena Rules and in Jena ARQ the query processing engine for SPARQL .",
"This is a little trickier since Jena rules nodes or atoms if you will resemble rdf triples and it can be a little tricky to specify complex rules in this format .",
"You can directly place SWRL rules in your ontology without having to specify an external rule file as you must with Jena rules .",
"I am working with Jena SPARQL API and I want to execute queries on my RDF files after applying inference rules .",
"In Jena Rules .. . .. . In Jena rules you could write something along the lines of : .. . .. . This would require you to construct a Jena Builtin http : stackoverflow.com a 23270901 2528639 for the nextSmallest portion of the query .",
"Anyhow your new problem has to do with reading the model in and nothing to do with Jena API Rules Test : how many and what are the methods to write rules in Jena .",
"Is it possible to perform i o from within forward- or backward-chaining rules",
"I ve read the documentation of Jena and Fuseki about reasoners and rules but I don t understand how to create step by step simple rules .",
"I have designed a set of Jena rules where some of these rules keep working for a very long time without returning results .",
"Way : .. . .. . I did not find any way to express this rule in SWRL or Jena rules .",
"Also specifically will Jena ensure that if I try to write a SPARQL Update query which does not follow these rules that update will fail to insert and an error will be returned",
"I am currently messing around with Jena trying to create rules to add to my generic reasoner .",
"List Rule rules new ArrayList OWLFBRuleReasoner ReasonerRegistry.getOWLReasoner .getRules rules.addAll Rule.rulesFromURL file : JENA RULES FILE GenericRuleReasoner completeReasoner new GenericRuleReasoner rules",
"And rules don t end with .",
"There is my SWRL Rules .. . .. . thanks to all",
"You seem to be assuming that Jena is at fault which may be the case but without seeing your data rules and code it is impossible to say .",
"enter image description here http : i.stack.imgur.com ZH6VE.jpg .. . .. . There is a Jena rules .. . I don t know prefix b and fb .",
"I used the backward-chaining-rule because previous to makeSkolum I worked with makeInstance which is only usable in backward hybrid rules .",
"So you have a couple options here : .. . 1 Encode your rules as SWRL rules in your ontology .",
"There s always a chance that your data or rules induces a particular pathological situation for the rules engine and that you may be able to fix this by changing your rules or applying them in a different way .",
"This might be a bit too broad as it stands and you don t have any guarantee that there are counterparts in the Jena builtins for each SWRL builtin but you could use the OWL-API to walk the rules and translate each one into a corresponding Jena rule .",
"download URL is https : jena.apache.org download index.cgi and click jena-2.11.1-source-release.zip MD5 PGP .. . .. . rules dir - jena-core src main resources etc",
"Also specifically will Jena ensure that if I try to write a SPARQL Update query which does not follow these rules that update will fail to insert and an error will be returned .. . .. . I don t know whether Jena supports something like this out of the box but you probably could probably either : .. . .. . 1 .",
"When I used OWL I proceeded this way : .. . .. . I want to do the same thing with inferences rules i.e . load my .rul file like this : .. . .. . This didn t work with .rul files the rules are not executed .",
"You can get an existing reasoner and extract its rules and add some more of your own rules to create a custom reasoner .",
"I created a .rul file that contains all my rules now I want to run those rules and execute my queries .",
"To fix it merely call register before parsing your rules .",
"My goal is to create new individuals based on the given information inside of that rules and assign properties to them .",
"I have a Jena Model filled with statements and use a GenericRuleReasoner with custom rule strings as follow Example directly taken from Jena tutorial page https : jena.apache.org documentation inference index.html .. . .. . From my understanding of Jena reasoner new inference model inf would contain statements from model as well as newly inferred statements generated by the rules .",
"I tried to reduce my OWL file to check whether the rules are entering an infinite-loop or not .",
"This might not all that hard but remember that Jena is really RDF-based and for full OWL reasoning you ll need another reasoner that integrates with Jena e.g . Pellet but there are others too I think .",
"There are lots of examples on Stack Overflow and elsewhere of how to write Jena rules so I think the key question here is how to rewrite this specific SWRL rule .",
"You can however create a custom builtin for Jena rules that would remove statements you feed it through your rule file or use an API call on the OntModel by specifying some underlying logical conditions in your program .",
"Something like the following doesn t work since backward rules only allow one head clause .",
"This can be done through protege or if you are feeling confident do it yourself using the swrl xml syntax : .. . Reference : http : www.w3.org Submission SWRL 5 .. . .. . 2 Write the equivalent rules in Jena i.e in a text file with the Jena rule syntax .",
"My purpose is to create the next rules : .. . .. . The principle in SWRL syntax is : .. . .. . Thanks in advance .",
"It might be useful to include example data rules and code that reproduces the problem .",
"From GenericRuleReasoner OWLFBRuleReasoner you can get the list of the rules .",
"As for removing outdated statements you can t directly do so through rules .",
"In fact I want to load a .rul file and execute the rules iside it .",
"It is possible to translate this kind of expression into a Jena rule",
"For example for the owl-fb.rules https : raw.githubusercontent.com ghillairet p2 e62531429e5412038e753de2850eb65f685a206f jena org.apache.jena etc owl-fb.rules file it is : .. . .. . OWL rule set v0.3 This rule set is designed to implement owl f lite using the hybrid rule system mixture of forward and backward chaining .",
"This method introduces a triple to the inference graph : .. . .. . The idea behind this is that rules within the domain will be sensitive to the existance of this triple and then generate a RB VALIDATE REPORT http : grepcode.com file repo1.maven.org maven2 org.apache.jena jena-core 2.11.2 com hp hpl jena vocabulary ReasonerVocabulary.java ReasonerVocabulary.0RB VALIDATION REPORT when a constraint of the domain fails .",
"Treating the existing OWL domain as an example of this we can search for rules that signal a violation of OWL s domains-specific constraints from etc owl-fb.rules : .. . .. . This forward-chaining rule introduces a backward-chaining rule that expresses a rb : violation when an individual is a member of disjoint classes .",
"If you find that type of behavior acceptable you could simply use a forward chaining rule that adds multiple backwards chaining rules e.g .",
"You can enter SWRL rules in presentation syntax in the Prot g http : protege.stanford.edu editor then save your ontology in RDF XML format .",
"UPGRADE .. . .. . In order to better understand how can I create rules in Jena I followed the example in https : jena.apache.org documentation inference RULEexamples .. . .. . I created three files : The first is ReasoningJena.java .. . .. . The rdf file is : demoData.rdf .. . .. . And the rules file is : file.rules .. . .. . I run all in Eclipse SW Version : Luna Service Release 2 4.4.2 with JDK 1.7 And I obtained these errors : .. . .. . Why",
"First you define a Builtin usually by extending BaseBuiltin and then you use BuiltinRegistry.theRegistry.register Builtin to make it available to Jena rule-based inference .",
"In the documentation particularly in the Examples https : jena.apache.org documentation inference RULEexamples section there s some code that shows how to read rules from a string .",
"Firstly these two rules can t use at the same time.The rule2 should be used after rule1 .",
"Thank you so much.Problem solved.Firstly these two rules can t use at the same time.The rule2 should be used after rule1 .",
"I have already tried to use default builtins writing rules that use them in a text file readable from Eclipse using Java .",
"I m asking your help to understand how to create my own property rules in fuseki .",
"I don t clearly understand what write in the config.ttl file in order to fuseki takes into account my rules on my ontology .",
"I know that it can be modelled differently but I need to use class relations for rules in instances .",
"My Jena rule .. . .. . Some of my ontology",
"Look at the builtin primitives http : jena.apache.org documentation inference RULEbuiltins that come with Jena .",
"HeadAction http : jena.apache.org documentation javadoc jena com hp hpl jena reasoner rulesys Builtin.html headAction 28com.hp.hpl.jena.graph.Node 5B 5D 20int 20com.hp.hpl.jena.reasoner.rulesys.RuleContext 29 is called if your Builtin is in the consequence result-of a forward-chaining rule .",
"Duplicated on the mailing list at mail-archives.apache.org mod mbox jena-users 201407.mbox http : mail-archives.apache.org mod mbox jena-users 201407.mbox 3C1404900986.26653.YahooMailNeo 40web133105.mail.ir2.yahoo.com 3E and received a response from Dave Reynolds and duplicated at answers.semanticweb.com : answers.semanticweb.com questions 29125 http : answers.semanticweb.com questions 29125 jena-rules-test-a-literal-property-to-string .",
"I m trying to figure out if Jena or any other SPARQL Update server will enforce ontological constraints .",
"I m trying to figure out if Jena or any other SPARQL Update server will enforce ontological constraints .",
": I am newbie on Java but also in Jena.. .",
"See section You need RDFS reasoning too of my answer http : stackoverflow.com a 24786478 1281433 to Problems with inference examples from apache-jena framework http : stackoverflow.com q 24786035 1281433 for an example .",
"I m interested in using Jena to build a fault diagnostic ontology-based expert-system .",
"I would like to call this function from Jena rule",
"I am not sure about Jena but OWL-API lets you temporarily add a concept to the ontology manager and then you can check the consistency of the ontology .",
"That tutorial is more than just Jena .",
"To build an inference model : .. . .. . See ModelFactory for other ways to build models e.g . RDFS inference directly .",
"The default ontological reasoning within Jena should provide decent validation of standard owl ontologies .",
"I ve used the above rule in Jena but I got A B C eg : q Yes which is wrong .",
"In first-order-logic your original rule could be written as : .. . .. . x y p x y wedge v y 1 rightarrow q x yes .. . .. . What you re actually trying to capture would be : .. . .. . x y p x y rightarrow v y 1 rightarrow q x yes .. . .. . That s harder to capture in Jena rules because to check whether y p x y rightarrow v y 1 holds or not all Jena can do is check whether there are currently any counterexamples .",
"What different things each OWL and RDFS files",
"i am working about inferences on Jena .",
"How can I create customized builtins in Jena",
"Nearly alternatively i could also create SubClassOf rules which do the mapping between all combinations but that would produce a lot of dirt in the model and i would like to be able to add even more filtering conditions instead of making more general .",
"stackoverflow.com questions 25422914 http : stackoverflow.com questions 25422914 jena-rule-for-validation-af-a-ontology",
"I found that built-in function can be called from jena rule but I would like to call my own function .",
"First we can jump over to Builtin https : jena.apache.org documentation javadoc jena com hp hpl jena reasoner rulesys Builtin.html s javadoc in order to identify what Builtin s exist .",
"If you need an equivalent of Max that can use XSDDateTime https : jena.apache.org documentation javadoc jena com hp hpl jena datatypes xsd XSDDateTime.html literals then you indeed may have to make some yourself .",
"In ARQ SPARQL .. . .. . The first question is whether or not you want the results to be in your graph with your data as in the rule-based approach or if you simply want the results .",
"According to the javadoc http : jena.apache.org documentation javadoc jena com hp hpl jena reasoner rulesys builtins Now.html Now will Bind the first arg to the current date time in the current locale and timezone . I haven t tried using Now but I d expect that the current date time in the current locale and timezone is a some sort of RDF literal perhaps a date or datetime",
"Has anyone any suggestions or examples how I could do this in Jena",
"I succeeded in creating modifying merging ontologies with Jena API and Eclipse .",
"Now I would like to understand how can I write a simple rule in Eclipse using Jena API and if there is one or more methods for doing this .",
"For example in Prot g I used to write a rule in SWRL like this to calculate the mean of a triangular distribution : .. . .. . How can I translate it using Jena",
"After I did this I wanted to assign a timestamp to x so that I d know when the conclusion was come to I wanted to used the Now http : jena.apache.org documentation javadoc jena com hp hpl jena reasoner rulesys builtins Now.html builtin as follows .",
"At any rate the cast makes sense the JavaDoc says that OWLFBRuleReasoner https : jena.apache.org documentation javadoc jena com hp hpl jena reasoner rulesys OWLFBRuleReasoner.html is a Reasoner and a RuleReasoner but not a GenericRuleReasoner .",
"Using the code that you provided and Apache Jena 2.11.1 I cannot replicate the exception you are getting .",
"You can then use OWLAPI to save the rule s in RDF XML format .",
"Selecting Max https : jena.apache.org documentation javadoc jena com hp hpl jena reasoner rulesys builtins Max.html as per your mention of it can we go ahead and look up it s fully qualified class name on GrepCode .",
"We can see the exception is thrown from BaseBuiltin headAction .. . http : grepcode.com file repo1.maven.org maven2 org.apache.jena jena-core 2.11.0 com hp hpl jena reasoner rulesys builtins BaseBuiltin.java BaseBuiltin.headAction 28com.hp.hpl.jena.graph.Node 5b 5d 2Cint 2Ccom.hp.hpl.jena.reasoner.rulesys.RuleContext 29 .",
"Interesting that Syntax error in backward rule : matematica Unknown builtin operation mysum .",
"I m considering Jena for use in a fault diagnostic application and really like its capabilities .",
"I have an ontology with a lot of individuals and use the Jena reasoner to get information about them ."
]
}
|
{
"confidence": [
149.94589233398438,
142.81138610839844,
124.09669494628906,
124.07854461669922,
122.33564758300781,
113.0233154296875,
110.21199035644531,
110.06929779052734,
107.0248794555664,
101.83523559570312,
99.39865112304688,
92.87446594238281,
91.99522399902344,
90.73868560791016,
85.69969177246094,
85.5730972290039,
82.72065734863281,
79.64749145507812,
74.0782470703125,
70.13124084472656
],
"content": [
"Question : enter image description here http : i.stack.imgur.com ZH6VE.jpg .. . .. . There is a Jena rules .. . I don t know prefix b and fb . What different things each OWL and RDFS files PS . download URL is https : jena.apache.org download index.cgi and click jena-2.11.1-source-release.zip MD5 PGP .. . .. . rules dir - jena-core src main resources etc .. . Answer : The .rules files are files with rules used by all the different Jena reasoners http : jena.apache.org documentation inference . See the comments in the headers of the files . For example for the owl-fb.rules https : raw.githubusercontent.com ghillairet p2 e62531429e5412038e753de2850eb65f685a206f jena org.apache.jena etc owl-fb.rules file it is : .. . .. . OWL rule set v0.3 This rule set is designed to implement owl f lite using the hybrid rule system mixture of forward and backward chaining . It differs from earlier versions by more consistently sticking to instance reasoning by being design to work with the LP backward engine . .. . It includes an experimental forward version of the equality reasoning which not yet scalable . So b stands for backward chaining f for forward chaining and fb for a combination of the two .",
"Question : I am working with Jena SPARQL API and I want to execute queries on my RDF files after applying inference rules . I created a .rul file that contains all my rules now I want to run those rules and execute my queries . When I used OWL I proceeded this way : .. . .. . I want to do the same thing with inferences rules i.e . load my .rul file like this : .. . .. . This didn t work with .rul files the rules are not executed . Any ideas how to load a .rul file Thanks in advance . Comment : You forgot to ask a question . What problem are you running into exactly Comment : I edited my question . In fact I want to load a .rul file and execute the rules iside it . I tried same method as OWL files but didn t work . .. . Answer : Jena rules aren t RDF and you don t read them into a model . RDFS is RDF and it is implemented internally using rules . To build an inference model : .. . .. . See ModelFactory for other ways to build models e.g . RDFS inference directly .",
"Question : What I want to do : Create a validator for an ontology in Java . For this I want to use Jena Rules on a inferred model . Unfortunately I can t use both the standard reasoner ReasonerRegistry.getOWLReasoner and after this my own reasoner new GenericRuleReasoner Rule.rulesFromURL file : rulefile.txt . Is this possible somehow Comment : You can get an existing reasoner and extract its rules and add some more of your own rules to create a custom reasoner . See section You need RDFS reasoning too of my answer http : stackoverflow.com a 24786478 1281433 to Problems with inference examples from apache-jena framework http : stackoverflow.com q 24786035 1281433 for an example . I think that s the main problem here you called the rest additional so I ve removed the other bits . Ask them in a separate question . This helps keeps questions short and self-contained and keeps answers concise . Comment : Ok . I found out that works . But If I want to use the OWL-Reasoner I get a Class Cast Exception . Is there a solution to use OWL-Reasoner Comment : What does ReasonerRegistry.getOWLReasoner .getClass return Comment : A type Reasoner But solved it now by casting it to OWLFBRuleReasoner . Comment : OWLFBRuleReasoner is more specific than Reasoner so I d be surprised if you the .getClass call returns Reasoner but you can cast it to OWLFBRuleReasoner . At any rate the cast makes sense the JavaDoc says that OWLFBRuleReasoner https : jena.apache.org documentation javadoc jena com hp hpl jena reasoner rulesys OWLFBRuleReasoner.html is a Reasoner and a RuleReasoner but not a GenericRuleReasoner . .. . Answer : The answer from @Joshua is absolutely correct . The only thing you need to know is that you can parse the rdf reasoner to GenericRuleReasoner or the owl reasoner to OWLFBRuleReasoner . From GenericRuleReasoner OWLFBRuleReasoner you can get the list of the rules . List Rule rules new ArrayList OWLFBRuleReasoner ReasonerRegistry.getOWLReasoner .getRules rules.addAll Rule.rulesFromURL file : JENA RULES FILE GenericRuleReasoner completeReasoner new GenericRuleReasoner rules",
"Question : please how creating Jena Rules . There is my SWRL Rules .. . .. . thanks to all Comment : This might be a bit too broad as it stands and you don t have any guarantee that there are counterparts in the Jena builtins for each SWRL builtin but you could use the OWL-API to walk the rules and translate each one into a corresponding Jena rule . I ve been using this approach in generating some Prolog style code recently . .. . Answer : There is no code that can perform this type of conversion readily available unless you write it yourself of course however its really not required . You can directly place SWRL rules in your ontology without having to specify an external rule file as you must with Jena rules . So you have a couple options here : .. . 1 Encode your rules as SWRL rules in your ontology . This can be done through protege or if you are feeling confident do it yourself using the swrl xml syntax : .. . Reference : http : www.w3.org Submission SWRL 5 .. . .. . 2 Write the equivalent rules in Jena i.e in a text file with the Jena rule syntax . This is a little trickier since Jena rules nodes or atoms if you will resemble rdf triples and it can be a little tricky to specify complex rules in this format . Reference : https : jena.apache.org documentation inference RULEsyntax",
"Question : What I want to do : Create a validator for an ontology in Java . For this I want to use Jena Rules on a inferred model . Unfortunately I can t use both the standard reasoner ReasonerRegistry.getOWLReasoner and after this my own reasoner new GenericRuleReasoner Rule.rulesFromURL file : rulefile.txt . Is this possible somehow Comment : You can get an existing reasoner and extract its rules and add some more of your own rules to create a custom reasoner . See section You need RDFS reasoning too of my answer http : stackoverflow.com a 24786478 1281433 to Problems with inference examples from apache-jena framework http : stackoverflow.com q 24786035 1281433 for an example . I think that s the main problem here you called the rest additional so I ve removed the other bits . Ask them in a separate question . This helps keeps questions short and self-contained and keeps answers concise . Comment : Ok . I found out that works . But If I want to use the OWL-Reasoner I get a Class Cast Exception . Is there a solution to use OWL-Reasoner Comment : What does ReasonerRegistry.getOWLReasoner .getClass return Comment : A type Reasoner But solved it now by casting it to OWLFBRuleReasoner . Comment : OWLFBRuleReasoner is more specific than Reasoner so I d be surprised if you the .getClass call returns Reasoner but you can cast it to OWLFBRuleReasoner . At any rate the cast makes sense the JavaDoc says that OWLFBRuleReasoner https : jena.apache.org documentation javadoc jena com hp hpl jena reasoner rulesys OWLFBRuleReasoner.html is a Reasoner and a RuleReasoner but not a GenericRuleReasoner . .. . Answer : The default ontological reasoning within Jena should provide decent validation of standard owl ontologies . The following explains how to use that same mechansism for domains that may skirt outside of what owl provides . In order to have domain-specific conflicts be generated when using the GnericRuleReasoner one needs to stimulate the generation of a domain-specific ValidityReport when FBRuleInfGraph.validate http : grepcode.com file repo1.maven.org maven2 org.apache.jena jena-core 2.11.2 com hp hpl jena reasoner rulesys FBRuleInfGraph.java FBRuleInfGraph.validate 28 29 is called . This method introduces a triple to the inference graph : .. . .. . The idea behind this is that rules within the domain will be sensitive to the existance of this triple and then generate a RB VALIDATE REPORT http : grepcode.com file repo1.maven.org maven2 org.apache.jena jena-core 2.11.2 com hp hpl jena vocabulary ReasonerVocabulary.java ReasonerVocabulary.0RB VALIDATION REPORT when a constraint of the domain fails . Treating the existing OWL domain as an example of this we can search for rules that signal a violation of OWL s domains-specific constraints from etc owl-fb.rules : .. . .. . This forward-chaining rule introduces a backward-chaining rule that expresses a rb : violation when an individual is a member of disjoint classes . Comment : Hi sorry for my late response I tested your rule now and it s working but I don t know why . Maybe answering the following as short and specific as possible questions would help me : 1 Can you explain me why I have to use a backward rule here 2 And why do you split the two parts X owl : disjointWith Y and I rdf : type X I rdf : type Y 3 From where does the error description Two individuals both same and different may be due to disjoint classes or functional properties come from 4 What does noValue T rb : prototype I mean Comment : Can you please post your answer at my new question I think the other answer is more appropriate to this initial question . Maybe you can also add the rule to solve the problem in my question . stackoverflow.com questions 25422914 http : stackoverflow.com questions 25422914 jena-rule-for-validation-af-a-ontology",
"Question : Let A x1 x2 xn . We want to calculate the difference between xi and xj where xj is min x in A colon x xi . It is possible to translate this kind of expression into a Jena rule Comment : You can do math with Jena rules . You ll need to explain how you are representing the set of numbers and where you want to store the result . That said this would probably be much easier if you use SPARQL . You could use a single query to get all the results that you want and you could even use a construct query to build the results in RDF which could be added back to your model . .. . Answer : Yes you can do this in both Jena Rules and in Jena ARQ the query processing engine for SPARQL . The Setup .. . .. . Let us assume that you have defined a structured representation of your data . For Xi you have an object that corresponds to something like this N3 : .. . .. . Then for your set A you can define its values as an RDF Collection such as rdf : List http : www.w3.org TR rdf-schema ch list . The following N3 woudl describe the set A 4.3 4.2 for example . In Jena Rules .. . .. . In Jena rules you could write something along the lines of : .. . .. . This would require you to construct a Jena Builtin http : stackoverflow.com a 23270901 2528639 for the nextSmallest portion of the query . The above rule would for a given value x0 within a particular set set attempt to identify the nextSmallest element x1 and if that succeeds construct a new node calculated and associate the difference with it by means of some domain-specific : hasValue property . As a style note I also introduced a : derivedFrom property in order to trace where that node came from so it wouldn t be useless as a calculation result . In ARQ SPARQL .. . .. . The first question is whether or not you want the results to be in your graph with your data as in the rule-based approach or if you simply want the results . If you simply want the results you have a choice as to whether or not the results are in a graph form . The simplest approach would be to simply SELECT the results : .. . .. . The above query was written off the top of my head so it may need some tweaks . The gist of it is that you retrieve any two members of the collection and orient them such that x0 is the smaller of the two . You then throw out the bound pairs if there exists any pair between them . The query-engine will consider the cartesian-product of the set when selecting bindings for x0 and x1 including when sameTerm x0 x1 so using FILTER x0Val x1Val provides a quick way to discard trivially poor bindings .",
"Question : I succeeded in creating modifying merging ontologies with Jena API and Eclipse . I succeeded also in starting the OWL reasoner and Pellet reasoner in Eclipse . Now I would like to understand how can I write a simple rule in Eclipse using Jena API and if there is one or more methods for doing this . For example in Prot g I used to write a rule in SWRL like this to calculate the mean of a triangular distribution : .. . .. . How can I translate it using Jena UPGRADE .. . .. . In order to better understand how can I create rules in Jena I followed the example in https : jena.apache.org documentation inference RULEexamples .. . .. . I created three files : The first is ReasoningJena.java .. . .. . The rdf file is : demoData.rdf .. . .. . And the rules file is : file.rules .. . .. . I run all in Eclipse SW Version : Luna Service Release 2 4.4.2 with JDK 1.7 And I obtained these errors : .. . .. . Why UPDATE 2 I made some changes on file.rules internal code correcting it as : .. . .. . and I obtained this error-code : Comment : Your prefix syntax isn t right . The documentation shows an example : @prefix pre : http : domain url . . You have @prefix http : www.snee.com ns demo . There shouldn t be an sign you need to specify the prefix you need to wrap the URI in angle brackets and it should end with . not . It s just a typo . And rules don t end with . Comment : changes made still errors : Comment : Your question keeps changing . That s not particularly helpful . Anyhow your new problem has to do with reading the model in and nothing to do with Jena API Rules Test : how many and what are the methods to write rules in Jena . You should ask a new question except that this one is pretty clear : you ve written too much code . Your whole readModelFromFile can be removed . Just do Model model RDFDataMgr.loadModel file : .. . . .. . Answer : There are a few different questions here . There are lots of examples on Stack Overflow and elsewhere of how to write Jena rules so I think the key question here is how to rewrite this specific SWRL rule . Without your showing any attempts we don t know what problems you were running into but I think that a SWRL rule like : .. . .. . TriangularDistribution t hasLowerLimit t a hasUpperLimit t c hasMode t b add ab a b add abc ab c divide m abc 3 rightarrow hasMean t m .. . .. . would simply become something like this : .. . .. . I didn t remember the math builtins in Jena so I looked at the list of builtin primitives https : jena.apache.org documentation inference RULEbuiltins . Comment : The problem for me is to understand where I should put this piece of code inside the .java file . Can you please provide the example P.s . : I am newbie on Java but also in Jena.. . So for this reason I am a little confused Comment : @Jurafsky There are lots of places you can put it . You could put it in a separate file that you could then load in or you could put it in a string in a Java file and read it in that way . In the documentation particularly in the Examples https : jena.apache.org documentation inference RULEexamples section there s some code that shows how to read rules from a string . Comment : I edited the question in order to better help me and who is interested in the subject . The question is now more open",
"Question : I m trying to figure out if Jena or any other SPARQL Update server will enforce ontological constraints . For example I want to enforce that only entities which have type x are allowed to have property y and the value of the property must have type z . I think this is what OWL can provide but I m not sure . Also specifically will Jena ensure that if I try to write a SPARQL Update query which does not follow these rules that update will fail to insert and an error will be returned .. . Answer : For example I want to enforce that only entities which have type x are allowed to have property y and the value of the property must have type z . I think this is what OWL can provide but I m not sure . .. . .. . What you re asking for is not what OWL provides . In OWL you can say that : .. . .. . propertyY rdfs : domain typeX .. . propertyY rdfs : domain typeZ .. . .. . but this does not mean at least in the way that you re expecting that only things of type X can have values for propertyY and that the values must be of type Z . What it means is that whenever you see an assertion that uses propertyY like .. . .. . a propertyY b .. . .. . an OWL reasoner can infer that .. . .. . a rdf : type typeX .. . b rdf : type typeZ .. . .. . The only time those inferences will be any kind of constraint violation is if you have some other way of inferring that a cannot be of type X or that b cannot be of type Z . Then an OWL reasoner would recognize the inconsistency . I m trying to figure out if Jena or any other SPARQL Update server will enforce ontological constraints . Also specifically will Jena ensure that if I try to write a SPARQL Update query which does not follow these rules that update will fail to insert and an error will be returned .. . .. . I don t know whether Jena supports something like this out of the box but you probably could probably either : .. . .. . 1 . Use an OntModel with a reasoner attached and run your SPARQL updates against that graph . Then you can query the graph and see whether any inconsistency is found . How this would be done would depend on how the reasoner signals inconsistencies . This might not all that hard but remember that Jena is really RDF-based and for full OWL reasoning you ll need another reasoner that integrates with Jena e.g . Pellet but there are others too I think . 2 . Alternatively you might use a store that has reasoning built-in and probably has this kind of functionality already . I think that Stardog has some of these features .",
"Question : please how creating Jena Rules . There is my SWRL Rules .. . .. . thanks to all Comment : This might be a bit too broad as it stands and you don t have any guarantee that there are counterparts in the Jena builtins for each SWRL builtin but you could use the OWL-API to walk the rules and translate each one into a corresponding Jena rule . I ve been using this approach in generating some Prolog style code recently . .. . Answer : I dont know and dont think there is an API for this task . But u can easily do it by your own . U can simply use tripple patterns with the syntax u can find at http : jena.apache.org documentation inference . The first example should translate into I never worked with SWRL : .. . .. . Where NS is the Uri of your ontology . For the full syntax and explanation i would check out the official site link above .",
"Question : I m asking your help to understand how to create my own property rules in fuseki . I ve read the documentation of Jena and Fuseki about reasoners and rules but I don t understand how to create step by step simple rules . And the examples that I ve found are focus on OWL reasoners . I don t clearly understand what write in the config.ttl file in order to fuseki takes into account my rules on my ontology . I use the Sparql point with python through a sparql-client and I don t master java code and applications . My purpose is to create the next rules : .. . .. . The principle in SWRL syntax is : .. . .. . Thanks in advance . .. . .. . EDIT with one solution .. . .. . And the inference rules.rules for an example : .. . Answer : The .ttl use through the cmd line : . fuseki-server --config path of your custom-config.ttl .. . .. . And the inference rules.rules for an example :",
"Question : I have designed a set of Jena rules where some of these rules keep working for a very long time without returning results . I tried to reduce my OWL file to check whether the rules are entering an infinite-loop or not . Fortunately it does not appear that there is an infinite-loop and a small number of classes e.g . 100 is processed very quickly . However when I add more classes even just one more class it takes a much longer to process . Is there any way to add a timer to each rule e.g . to terminate a rule if it is taking longer than a certain amount of time without returning results If it is possible how can I do it If not is there some workaround that would achieve similar results My Jena rule .. . .. . Some of my ontology Comment : It might be useful to include example data rules and code that reproduces the problem . You seem to be assuming that Jena is at fault which may be the case but without seeing your data rules and code it is impossible to say . There s always a chance that your data or rules induces a particular pathological situation for the rules engine and that you may be able to fix this by changing your rules or applying them in a different way . Comment : Dear @RobV I added my rule that casues the problem and small part of the owl file where this part do not satisfy the rule condition . .. . Answer : It would help if you explained the intent of the rule as written it looks a bit odd . You start by selecting a 3 way cross products of all types so you are immediately making life hard for the rule-engine i.e . So given 100 owl : Class instances in your data your rule has to consider 100 100 100 combinations i.e 1 million combinations . Which is why adding a small amount of extra data makes this so much worse . As for what the equal and unequal assertions are trying to do I am entirely unsure . Are you simply trying to assert rdf : type for indirect super-classes In which case this can be done more simply like so : .. . .. . Note that it doesn t matter if the triples generated already exist since RDF is a set of triples so duplicate data is simply ignored . Comment : Many thanks @RobV it works with me : . I really appreciate it",
"Question : null .. . Answer : I m interested in using Jena to build a fault diagnostic ontology-based expert-system . Is it possible to perform i o from within forward- or backward-chaining rules For example to prompt the user for further facts Or to access a database Comment : Sure you just write a built-in that does some I O . There are already built-ins that do output like printing . Did something not work about this approach Comment : Thanks I am just researching which tool to use and have struggled with I O in other tools so just wanted to check its feasibility in Jena .",
"Question : I have a Jena Model filled with statements and use a GenericRuleReasoner with custom rule strings as follow Example directly taken from Jena tutorial page https : jena.apache.org documentation inference index.html .. . .. . From my understanding of Jena reasoner new inference model inf would contain statements from model as well as newly inferred statements generated by the rules . Are instances of statements in both inf and model shared or different If different wouldn t this waste memory too much An issue that I m having is reusing inferred statements into the model . Looping through inf model to find newly inferred statements and adding them to model seems to be a naive approach . Is there any other wiser method Lastly I am wondering what would be the best approach to remove outdated statement from model . What I mean by an outdated statement is probably best explained by an example . Say there is a statement Speaker hasSoundLevel 50 in the model . Later when a new statement such as Speaker hasSoundLevel 80 is inserted it should invalidate i.e . delete Speaker hasSoundLevel 50 from the model . Could this be achieved by using a rule What if a statement needs to be outdated after certain amount of time since its insertion Any suggestions on how to achieve this would be appreciated . Thanks .. . Answer : The Inferred model that is generated contains both statements from the original ontology and the inferred statements from the reasoner . As far as I am aware these statements are not shared however I do not believe it wastes a lot of memory . To find out more you may want to drop an email to the people actually working on Jena through their mailing list . As for removing outdated statements you can t directly do so through rules . You can however create a custom builtin for Jena rules that would remove statements you feed it through your rule file or use an API call on the OntModel by specifying some underlying logical conditions in your program . Again as as far as I know Jena does not natively maintain a timestamp for when a statement was added to the model so it is impossible to invalidate a statement after a certain amount of time although you could add a listener and keep a log of changes and use the log time to figure out when to invalidate .",
"Question : I m trying to figure out if Jena or any other SPARQL Update server will enforce ontological constraints . For example I want to enforce that only entities which have type x are allowed to have property y and the value of the property must have type z . I think this is what OWL can provide but I m not sure . Also specifically will Jena ensure that if I try to write a SPARQL Update query which does not follow these rules that update will fail to insert and an error will be returned .. . Answer : What you need to understand about OWL is property restriction http : www.w3.org TR owl-ref Restriction : .. . .. . A property restriction is a special kind of class description . It describes an anonymous-class namely a class of all individuals that satisfy the restriction . OWL distinguishes two kinds of property restrictions : value constraints and cardinality constraints . .. . A value constraint puts constraints on the range of the property when applied to this particular class description . .. . A cardinality constraint puts constraints on the number of values a property can take in the context of this particular class description . Based on the description of your problem you need to use a value constraint . These value constraints exists : some someValuesFrom only allValuesFrom and exactly hasValue . For example : .. . .. . So depending on the restrictions on the individuals that you have defined these individuals can be classified by the reasoner under the right class which will be their type . The systems generally won t prevent you from entering false information but the concept will either be declared unsatifiable or inconsistent . In the case of entering an individual that is incompatible with the constants in the ontology the ontology becomes inconsistent everything goes wrong then you can retract the last fact I suppose . I am not sure about Jena but OWL-API lets you temporarily add a concept to the ontology manager and then you can check the consistency of the ontology . Normally when this check goes wrong you can remove the last unsaved change to the ontology manger via the change listener and if everything is correct you can save the changes in the ontology manager .",
"Question : I have written a custom builtin to use in my Project but I do not really know how I can use it . I have written two classes . In one of them there is the builtin I have made using BaseBuiltin and in the other one I have registered the new builtin using BuiltinRegistry . I have already tried to use default builtins writing rules that use them in a text file readable from Eclipse using Java . In this case I do not have any problems . How can I use the builtin I have built Should I import or include something in some files .. . Answer : First you define a Builtin usually by extending BaseBuiltin and then you use BuiltinRegistry.theRegistry.register Builtin to make it available to Jena rule-based inference . Once you ve done that you need to actually use a rule that will reference your Builtin in order to trigger it . The output of this code will be : .. . .. . The string of the forward-chaining rule .. . The result-of calling the print Builtin .. . The result-of calling the example Builtin .. . .. . .. . which is exactly what we see : Comment : I will try it out Thank you so much for your help Comment : Hello again I have tried the code . I have just one question . Where can I use the Head Action method I mean my program print : 1 The string of the forward-chaining rule 2 The result-of calling the print Builtin How can I print the last result Cheers Comment : HeadAction http : jena.apache.org documentation javadoc jena com hp hpl jena reasoner rulesys Builtin.html headAction 28com.hp.hpl.jena.graph.Node 5B 5D 20int 20com.hp.hpl.jena.reasoner.rulesys.RuleContext 29 is called if your Builtin is in the consequence result-of a forward-chaining rule . It is fired whenever the rule itself is triggered ie : all of the antecedents are satisfied . The result is the firing of the rule and the subsequent output Head Action : .. . . Comment : If this answer was satisfactory in helping you solve your problem you may wish to consider marking it as accepted http : meta.stackexchange.com questions 5234 how-does-accepting-an-answer-work . This reduces the number of unanswered questions .",
"Question : I am currently messing around with Jena trying to create rules to add to my generic reasoner . I created the following simple rule : .. . .. . This works fine and fires correctly giving me everything I expect . After I did this I wanted to assign a timestamp to x so that I d know when the conclusion was come to I wanted to used the Now http : jena.apache.org documentation javadoc jena com hp hpl jena reasoner rulesys builtins Now.html builtin as follows . This unfortunately does not work it does nor throw an error it just does not seem to bind any time value to x and also it seems to prevent the rule from being fired correctly as in the first case . The ontology I am using is below . Any ideas .. . Answer : According to the javadoc http : jena.apache.org documentation javadoc jena com hp hpl jena reasoner rulesys builtins Now.html Now will Bind the first arg to the current date time in the current locale and timezone . I haven t tried using Now but I d expect that the current date time in the current locale and timezone is a some sort of RDF literal perhaps a date or datetime Literals cannot be the subjects of triples in RDF . For the rule .. . .. . to match in the graph the variable x will be bound to the date literal say 2013-05-24 but as I mentioned I don t know exactly what Now will produce but there cannot be any matches for x rdf : type y because these would have the form 2013-05-24 rdf : type y and there cannot be triples of that form . This means that the rule cannot fire . If you want to add a timestamp to something you probably want an n-ary relation http : www.w3.org TR swbp-n-aryRelations so that you re actually representing or representing in addition to x rdf : type z a relation inferredSubclassRule super sub time which can be represented in RDF by a blank node like : Comment : Thanks makes sense . n-ary relations seem to be what I am looking for .",
"Question : I have an ontology with a lot of individuals and use the Jena reasoner to get information about them . My goal is to create new individuals based on the given information inside of that rules and assign properties to them . The individuals don t have to be named but they need a type and have to be part of a few properties . At the moment I can create anonymous individuals with the help of a mailing list post http : mail-archives.apache.org mod mbox jena-users 201308.mbox 3CCA+Q4Jnn7hE8EQDZFbbSP73bzFQ0ACSJdBVY rQUV [email protected] 3E 27 but I can only give them one type or one property . Here s a little example of my problem my rule looks like this the ontology and inferred result can be found at the bottom : .. . .. . test2 : X rdf : type NS : Test1 - .. . Y rdf : type NS : Test2 - makeSkolem Y X .. . .. . It means when a Test1 individual is found then a new blank node is created and then the type Test2 is given to that node . It works fine but i want to give this new individuals a classification and a pointer property to X the Test1 individuals . Something like the following doesn t work since backward rules only allow one head clause . Every clause for its one works perfectly fine though . test2 : X rdf : type NS : Test1 - .. . Y rdf : type NS : Test2 Y NS : hasClassification test - makeSkolem Y X .. . .. . This is my ontology : .. . .. . This is the result with the first rule blank nodes with IDs A0 and A1 are the new individuals : Comment : I used the backward-chaining-rule because previous to makeSkolum I worked with makeInstance which is only usable in backward hybrid rules . After trying to use makeInstance for a whole day I didnt think about using a simple forward rule with makeSkolum . It works perfectly fine though so ty very much also for your second explanation . I still have a lot to learn about Jena and am thankful u helped me a second time . Hopefully I wont need help in the near future again . Do u want to answer the question so i can mark it as solved and give you your deserved credit Comment : I m glad this helped I ve added the essence of it as an answer . .. . Answer : First note that your rule doesn t do exactly what you ve said it does . test2 : X rdf : type NS : Test1 rightarrow .. . Y rdf : type NS : Test2 leftarrow makeSkolem Y X .. . .. . It means when a Test1 individual is found then a new blank node is created and then the type Test2 is given to that node . .. . .. . The rule matches when an instanceof NS : Test1 is found and adds a new backward chaining rule that can be used when determining whether something has type NS : Test2 : if it s the skolem of X then it has that type . It doesn t give anything the type NS : Test2 unless you ask for it . Writing the whole model of course does ask for such triples . If you find that type of behavior acceptable you could simply use a forward chaining rule that adds multiple backwards chaining rules e.g . : .. . .. . test2 : .. . X rdf : type NS : Test1 rightarrow .. . Y rdf : type NS : Test2 leftarrow makeSkolem Y X .. . Y NS : hasClassification test leftarrow makeSkolem Y X .. . .. . .. . I think that that s a bit more complicated than it needs to be . Skolem objects are simply objects that are uniquely determined by some other values so you can use makeSkolem in the preconditions of a rule as well as the head of a rule . This means that you can do this : .. . .. . test2 : X rdf : type NS : Test1 makeSkolem Y X rightarrow .. . Y rdf : type NS : Test2 Y rdf : type NS : hasClassification test .. . .. . It s worth noting that makeSkolem takes an arbitrary number of arguments . It might be worthwhile to add some sort of indicator so that you don t accidentally get the same skolem object in multiple places . E.g . if you had something like .. . .. . child rdf : type : Child makeSkolem mother child rightarrow .. . mother rdf : type : Mother child : hasMother mother .. . .. . child rdf : type : Child makeSkolem father child rightarrow .. . father rdf : type : Father child : hasFather father .. . .. . then you d actually be creating just one skolem object for each Child and calling it the Child s Mother and Father which probably isn t what you want . Instead you could do something like : .. . .. . child rdf : type : Child makeSkolem mother child mother rightarrow .. . mother rdf : type : Mother child : hasMother mother .. . .. . child rdf : type : Child makeSkolem father child father rightarrow .. . father rdf : type : Father child : hasFather father .. . .. . since child mother and child father are always different you get two skolem objects instead of just one . You might use something like this in your rule to get e.g . .. . .. . test2 : X rdf : type NS : Test1 makeSkolem Y X test2 rightarrow .. . Y rdf : type NS : Test2 Y NS : hasClassification test",
"Question : Assume that I have the following statements : .. . .. . I want to use a rule to do something like : .. . .. . that means that you can infer A q Yes but B can t since B p A and A v 2 although B p C and C v 1 . I ve used the above rule in Jena but I got A B C eg : q Yes which is wrong . Any help will be greatly appreciated . Update originally posted as an answer .. . .. . the meaning of a p all b is that I like to get a set which all mem in this set fulfill the a p mem . And all member must fulfill mem v 1 to infer a q Yes . For example .. . .. . A p B and A p C so I get a set which contains B C .since B and C v 1 so A q Yes . B p A and B p C so I get a set A C but A v 2 so can t infer that B q Yes . Problem Solved .. . .. . Thanks to Joshua Taylor . Firstly these two rules can t use at the same time.The rule2 should be used after rule1 . And the rule2 should be rule2 : s p o noValue s connectedToNonOne - s q Yes . Comment : It s not clear what your rule is supposed to mean . What is a p all b supposed to mean The if b v 1 then a q Yes is understandable . .. . Answer : but I got A B C eg : q Yes which is wrong . .. . .. . The rule you have actually written in Jena says .. . .. . For any two individuals X and Y if X p Y and Y v 1 then X q Yes . From the rule you ve written this is correct by : .. . .. . A p C C v 1 rightarrow A q Yes .. . B p C C v 1 rightarrow B q Yes .. . C p B B v 1 rightarrow C q Yes .. . .. . What you re actually trying to say is : .. . .. . For any individual X if for every individual Y X p Y implies Y v 1 then X q Yes . In first-order-logic your original rule could be written as : .. . .. . x y p x y wedge v y 1 rightarrow q x yes .. . .. . What you re actually trying to capture would be : .. . .. . x y p x y rightarrow v y 1 rightarrow q x yes .. . .. . That s harder to capture in Jena rules because to check whether y p x y rightarrow v y 1 holds or not all Jena can do is check whether there are currently any counterexamples . If one were added later you might have incorrect inferences . Using the builtins available in the rule reasoner you could do something with noValue https : jena.apache.org documentation inference RULEbuiltins and notEqual https : jena.apache.org documentation inference RULEbuiltins along the lines of : Comment : Yes I understand the meaning of your rules.The rule1 works perfectly but the rule2 doesn t work.It returns an anonymous node q Yes statement . Comment : Thank you so much.Problem solved.Firstly these two rules can t use at the same time.The rule2 should be used after rule1 . And the rule2 should be rule2 : s p o noValue s connectedToNonOne - s q Yes . Comment : @JiamingLin If this answered your question you should consider accepting it http : meta.stackexchange.com questions 5234 how-does-accepting-an-answer-work .",
"Question : null .. . Answer : i am working about inferences on Jena . I would test that a property is a particular string . I have an ontology about servers an individuals like this : .. . .. . i would add a new information new property to the servers that have a property .. . .. . so for this i have written a Jena rule like this : .. . .. . But obviously the test S data : identifiant-reseau POLO don t work . Have you an idea for do this Thank you . Comment : Can you provide example data that shows what you expect the data to look like server-side ie : give the data regarding what the individual looks like after the update . Additionally note that you may need to make sure that your data types align property . POLO is a plain literal but SRVLINMAGZ06 xsd : string is a typed-literal . sometimes plain literals and strings can be used interchangeably so that may not matter in the case of the rule-engine . Comment : Duplicated on the mailing list at mail-archives.apache.org mod mbox jena-users 201407.mbox http : mail-archives.apache.org mod mbox jena-users 201407.mbox 3C1404900986.26653.YahooMailNeo 40web133105.mail.ir2.yahoo.com 3E and received a response from Dave Reynolds and duplicated at answers.semanticweb.com : answers.semanticweb.com questions 29125 http : answers.semanticweb.com questions 29125 jena-rules-test-a-literal-property-to-string .",
"Question : I want to use knowledge which is modelled between classes . E.g . I have modelled a car and a bus have 4 wheels a bike 2 wheels . Now I want to express that bike can tip if you don t keep them in balance - incompetent driver . If I add an instance CB450 subClassOf Bike a rule should enable reasoning : can CB450 Tip . Way : .. . .. . I did not find any way to express this rule in SWRL or Jena rules . Is there a possibility I know that it can be modelled differently but I need to use class relations for rules in instances . I use Protege 5.16 with pellet 2.3.1 . See the example ontology below .. . Answer : Based on the way you have explained the problem it looks like CB40 isn t a subclass of Bike but rather an individual of type Bike . So say you have a class Vehicle a data property hasWheels on Vehicle and a boolean property canTip on Vehicle you can write a SWRL rule as .. . .. . which translates as A vehicle with two wheels can tip over . The x is any individual of the specified type . So if you create a class Bike as a subclass of Vehicle and an individual CB40 of that class and set all the relevant data properties a reasoner will assign the canTip property to true for CB40 Comment : By the way the ontology is written in Protege so it should be ok . Comment : My bad I was in a hurry when I typed out that answer and misread the code snippet . I ll edit once I am off mobile . Comment : I agree that your suggestions works but every individual must have a data property hasWheels that is what I want to avoid . I tried to express that with relations between classes . I would like to create individuals which inherit such things from their class type without explicit model for every bike that it has 2 Wheels . Is that possible"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
semantic-web
|
UNK_RELATION
|
cuite@s@119
|
cuite -- cuite coded ui test enhanced framework is a thin layer developed on top of microsoft visual-studio team test @placeholder coded ui test engine which helps reduce code increases readability and maintainability while also providing features for the automation engineer .
|
{
"confidence": [
71.73332214355469,
68.3028793334961,
58.637882232666016,
47.73192596435547,
41.46849060058594,
38.17900466918945,
36.514225006103516,
36.471378326416016,
30.71257781982422,
30.320667266845703,
27.496746063232422,
26.91616439819336,
21.67141342163086,
19.523130416870117,
15.95437240600586,
15.435935020446777,
15.286970138549805,
12.972413063049316,
12.972413063049316,
12.972413063049316,
12.972413063049316,
12.972413063049316,
12.972413063049316,
12.972413063049316,
12.972413063049316,
12.972413063049316,
12.972413063049316,
12.972413063049316,
12.972413063049316,
12.972413063049316,
12.972413063049316,
12.972413063049316,
12.972413063049316,
11.631061553955078,
6.867207050323486,
6.867207050323486,
6.867207050323486
],
"content": [
"Using CUITe https : cuite.codeplex.com testing framework in VS2012 I created a coded UI test .",
"Currently they are written with the CUITe framework but I see the same issue when using Coded UI code .",
"I have confirmed that normal coded UI tests are running in VS2015 it is specifically coded UI tests created using CUITe that are failing to run .",
"Current URL for CUITe is : https : github.com icnocop cuite .. . .. . Issue was resolved here https : github.com icnocop cuite issues 30 .",
"Below is my functions called from the Coded UI tests :",
"In this solutions case we are running into an issue where when attempting to run a test the output pane states : .. . .. . There is no test with the specified Id guid listed .. . .. . And no CUITe tests are run .",
"I am trying to design a simple Coded UI tests that access the two following functions .",
"The issue was due to CUITe not having been compiled provided a build definition for VS2015 .",
"I have a test case which first calls GLJEEnterDescription then calls GLJEEnterNotes .",
"In the current GitHub repo of CUITe code plex URL from the original question no longer the active link provides a new build that addresses the issue .",
"When the test runs GLJEEnterDescription is manipulated and BOTH strings passed into the functions are entered into it .",
"This test works as expected when right clicking the test and hitting run test in VS2012 .",
"Automation IDs are not available as this is a winforms app and does not implement WPF controls .",
"Are you sure that you are switching focus to your second text box GLJEEnterNotes while the code is executing",
"Meaning does your code see the second text box",
"However if I have to depend on ControlName as in my code above it rarely finds the control .",
"The odd thing is when the control has an actual Name property which seems to refer to a value in .Text property then the Name property works fine .",
"Nothing is ever entered into GLJEEnterNotes .",
"I have checked and rechecked and the properties for the controls are correct .",
"The only difference between the two controls is GLJEEnterDescription is a standard single line text box and GLJEEnterNotes is a custom derived from standard multiline text box .",
"Any thoughts on why I would not be able to access and use the GLJEEnterNotes text box but not the GLJEEnterDescription text box",
"When you say a custom text box do you mean that it is the multi line text box built into the IDE for VS or is this a control that you or another company made",
"As in a user control .",
"Hey Brian thanks for responding .",
"It is a multiline text box but it was created by a company not sure why as there doesn t seem to be any extra functionality .",
"When I look at the designer file I see this : internal CustomControls.CompanyNameTextboxMultiLine txtMultiJENotes",
"You most likely need to specify more search criteria for those controls .",
"Ideally I would recommend trying to use control ID s or even AutomationID s for your controls .",
"These are the HIGHEST priority for the search algorithm Like in This http : stackoverflow.com questions 14617061 is-there-a-way-to-set-the-automationid-of-an-object-without-using-xaml Post .. . .. . else you might have to use FindMatchingControls https : msdn.microsoft.com en-us library microsoft.visualstudio.testtools.uitesting.uitestcontrol.findmatchingcontrols.aspx and cycle each control for the right things you want .",
"Thanks to everyone for the replies so far .",
"All of my Control IDs seem to be 0 .",
"Where is that value set",
"I created a simple winform application added a textbox control to it and did not see a property that would equate to a control ID",
"I have additionally added all of the Microsoft Testing dlls to the solution in a separate folder in order to ensure the solution is using the specific versions of the testing DLLs .",
"We are in the process of migrating to VS2015 so I m trying to go through our solutions to make sure they are behaving as expected .",
"Don t know if anyone will have any workarounds for this but I figured I d give it a shot .",
"This did not solve the problem ."
]
}
|
{
"confidence": [
102.57289123535156,
72.48070526123047
],
"content": [
"Question : Using CUITe https : cuite.codeplex.com testing framework in VS2012 I created a coded UI test . This test works as expected when right clicking the test and hitting run test in VS2012 . We are in the process of migrating to VS2015 so I m trying to go through our solutions to make sure they are behaving as expected . In this solutions case we are running into an issue where when attempting to run a test the output pane states : .. . .. . There is no test with the specified Id guid listed .. . .. . And no CUITe tests are run . I have confirmed that normal coded UI tests are running in VS2015 it is specifically coded UI tests created using CUITe that are failing to run . Don t know if anyone will have any workarounds for this but I figured I d give it a shot . I have additionally added all of the Microsoft Testing dlls to the solution in a separate folder in order to ensure the solution is using the specific versions of the testing DLLs . This did not solve the problem . .. . Answer : The issue was due to CUITe not having been compiled provided a build definition for VS2015 . In the current GitHub repo of CUITe code plex URL from the original question no longer the active link provides a new build that addresses the issue . Current URL for CUITe is : https : github.com icnocop cuite .. . .. . Issue was resolved here https : github.com icnocop cuite issues 30 .",
"Question : I am trying to design a simple Coded UI tests that access the two following functions . Currently they are written with the CUITe framework but I see the same issue when using Coded UI code . I have a test case which first calls GLJEEnterDescription then calls GLJEEnterNotes . When the test runs GLJEEnterDescription is manipulated and BOTH strings passed into the functions are entered into it . Nothing is ever entered into GLJEEnterNotes . I have checked and rechecked and the properties for the controls are correct . The only difference between the two controls is GLJEEnterDescription is a standard single line text box and GLJEEnterNotes is a custom derived from standard multiline text box . Any thoughts on why I would not be able to access and use the GLJEEnterNotes text box but not the GLJEEnterDescription text box Below is my functions called from the Coded UI tests : Comment : When you say a custom text box do you mean that it is the multi line text box built into the IDE for VS or is this a control that you or another company made As in a user control . Comment : Hey Brian thanks for responding . It is a multiline text box but it was created by a company not sure why as there doesn t seem to be any extra functionality . When I look at the designer file I see this : internal CustomControls.CompanyNameTextboxMultiLine txtMultiJENotes Comment : Are you sure that you are switching focus to your second text box GLJEEnterNotes while the code is executing Meaning does your code see the second text box .. . Answer : You most likely need to specify more search criteria for those controls . Ideally I would recommend trying to use control ID s or even AutomationID s for your controls . These are the HIGHEST priority for the search algorithm Like in This http : stackoverflow.com questions 14617061 is-there-a-way-to-set-the-automationid-of-an-object-without-using-xaml Post .. . .. . else you might have to use FindMatchingControls https : msdn.microsoft.com en-us library microsoft.visualstudio.testtools.uitesting.uitestcontrol.findmatchingcontrols.aspx and cycle each control for the right things you want . Comment : Thanks to everyone for the replies so far . The odd thing is when the control has an actual Name property which seems to refer to a value in .Text property then the Name property works fine . However if I have to depend on ControlName as in my code above it rarely finds the control . All of my Control IDs seem to be 0 . Where is that value set I created a simple winform application added a textbox control to it and did not see a property that would equate to a control ID Automation IDs are not available as this is a winforms app and does not implement WPF controls ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
s
|
UNK_RELATION
|
pyportmidi@cross-platform@61
|
pyportmidi -- pyportmidi is a python wrapper for portmidi a @placeholder c library for real-time midi control .
|
{
"confidence": [
82.32980346679688,
67.6199951171875,
67.12576293945312,
57.25748062133789,
55.0821418762207,
53.640560150146484,
50.76286697387695,
50.2231559753418,
46.69801330566406,
45.55659484863281,
44.898231506347656,
37.730064392089844,
35.29547882080078,
34.23012161254883,
32.48155975341797,
29.6745662689209,
29.60694122314453,
29.509414672851562,
29.509414672851562,
28.363304138183594,
27.81275177001953,
27.787155151367188,
26.920846939086914,
25.765899658203125,
24.870380401611328,
23.622997283935547,
23.622997283935547,
23.102924346923828,
23.102924346923828,
22.93871307373047,
22.431785583496094,
21.393882751464844,
21.393882751464844,
21.393882751464844,
20.05297088623047,
19.176387786865234,
19.159805297851562,
19.123788833618164,
19.007001876831055,
18.47228240966797,
18.43694305419922,
17.561431884765625,
17.223981857299805,
16.303911209106445,
15.874032020568848,
15.294063568115234,
15.294063568115234,
15.294063568115234,
15.294063568115234,
15.294063568115234,
15.294063568115234,
15.294063568115234,
15.294063568115234,
15.294063568115234,
15.294063568115234,
15.294063568115234,
15.294063568115234,
15.294063568115234,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172,
13.272808074951172
],
"content": [
"pyportmidi is just a python wrapper on portmidi .",
"If the general portmidi answer didn t work in pyPortMidi that would be a bug in pyPortMidi .",
"the question is actually about pyportmidi not portmidi .",
"The answer that applies to portmidi will almost certainly apply to pyportmidi as well .",
"@Charles : The answer would almost certainly apply to anyone using portmidi whether directly through pyPortMidi through portmidi-ruby or any other simple wrapper .",
"Next I built pyPortMidi .",
"pyPortMidi is a wrapper for a C library named PortMidi and it is available with the PortMidi source download http : sourceforge.net projects portmedia files portmidi 217 as version 0.7 and from John Harrison s site http : alumni.media.mit.edu harrison code.html as version 0.9 .",
"I m connecting a several identical USB-MIDI devices and talking to them using Python and pyportmidi .",
"I m trying to talk to a Novation Launchpad with pyportmidi .",
"I m able to import the library into Python but when I make the first call it immediately crashes Python : .. . .. . Has anyone gotten pyPortMidi running on X64",
"I m trying to use pyPortMidi for an application that I build for OSX win32 and win64 .",
"How do I map what I get from lsusb to the devices I have in pyPortMidi",
"The included test program works and is able to communicate with midi ports so I think the PortMidi build is fine .",
"I didn t know pyPortMidi until now : I have looked into the sources and there should be something like PmDeviceInfo which has an interface interf and a name name and should be mapped to a python function called GetDeviceInfo .",
"I Have a console program written in C which generates short random musical compositions using the PortMidi library .",
"First I built PortMidi using MSVC++ 2008 Express targeted to X64 .",
"Another thing to consider is that if you slave your portmidi application to the MIDI clock you can get a reliable stream of ticks from the MIDI host which you could use as the trigger to write MIDI data back out no sleeps necessary .",
"So there might be an issue with portmidi rate-limiting or on OSX .",
"@Charles Why is this question not deserving of a portmidi tag",
"I m using pygame.midi library to send MIDI Messages Control Change messages not notes .",
"PortMidi doesn t have any way to do do the whole thing in one shebang as far as I can tell so you have to manually buffer all the output MIDI messages into an array and then save them to a file .",
"It was the simplest solution for getting some midi data into python and suited my needs quite well .",
"I have found some explanations of reading and writing functions within the portmidi library : Pm read and Pm write but without examples I am struggling to understand and implement this .",
"I m doing some work with a MIDI controller called the Novation Launchpad that has a python-module available to import and use .",
"I noticed that in the following code if I dropped the sleep time lower than .002 no MIDI would be sent at all until I exited the program then all the events spewed onto the MIDI BUS .",
"It s annoying because they usually enumerate in a sensible order - the first device in the hub is the first device in portmidi but sometimes they don t - usually the first 2 devices are switched .",
"A good example of this can be found in the receive sysex function at http : audacity.googlecode.com svn audacity-src trunk lib-src portmidi pm test sysex.c .",
"Ultimately I would like to write these sequences as either a midi or audio file .",
"If not is it necesary to recursively read into a buffer and save individual midi notes",
"some basic MIDI documentation : http : www.midi.org techspecs midimessages.php .. . .. . control change is 0xbn where n is the channel number so 0xb0 is a control change message for channel 0 .",
"However something to keep in mind - MIDI is extremely slow 31250 baud 31250 bits per second since MIDI messages are usually 2 bytes 16 bits that means a maximum of 1953 messages per second .",
"That way if your whole MIDI stack supports rates that fast you could get 8000 messages per second .",
"This is a suboptimal solution and in all likelihood your MIDI stack probably supports much faster than 31250 baud .",
"-n .. . .. . PPQN Clock http : home.roadrunner.com jgglatt tech midifile ppqn.htm MIDI 1.0 http : en.wikipedia.org wiki MIDI 1.0",
"MIDI status bytes the first byte of the message must have the high 0x80 bit set .",
"I have noticed that when I run my code on Linux occasionally the MIDI ports of the devices are enumerated in a different order so I send messages to the wrong devices .",
"When I took a look at the SVN repo I ran across this in the wrapper code note the Why is bufferSize 0 here",
"The API documentation shows Pm OpenOutput having the following signature .. . .. . There doesn t appear to be any obvious way to find out the current buffer stack length and more importantly it would appear that the Python wrapper ignores the buffer setting entirely anyway .",
"Comparing both MIDI charts I figured out that the 0x74 should be the second byte and 124 is the value of on off which replaces velocity .",
"You may want to look at this question here http : stackoverflow.com questions 27737264 installing-pygame-on-64-bit-windows-7-and-64-bit-python-2-7 for a solution to this .",
"One other thing to keep in mind if you re really blasting MIDI - most likely control-change values if you re modifying something like a High Pass Filter a value of 1 sounds a lot like 2 so if you make your messages less granular increment or decrement by 2 or 4 you can cut down the number of messages without having a noticeable difference in the audio .",
"Perhaps you could hit ctrl-C while the program is apparently frozen .",
"The idea is to send from the output from this python program to the input of another program .",
"mmmm.. . python accepted like a valid instruction however rakarrack doesn t do anything .",
"I m taking those numbers from rakarrack the application that i want to control implementation chart : http : rakarrack.sourceforge.net midiic.html .. . .. . What am I doing wrong",
"I ve gotten it to work on OSX and win32 but I am stuck trying to get it working on win64 .",
"I ve tried both versions with the same failure mode .",
"For version 0.7 I had to modify the setup.py file slightly to account for the proper location of an include files moved from . . win32 to . . pm common and it builds without errors .",
"While version 0.7 uses cython to build pyportmidi.c version 0.9 uses pyrex to do the same thing to get it to work I had to use the version of pyrex installed using easy install .",
"It also built without errors .",
"Any suggestions as to how I could debug this issue",
"An updated pypm module is available as pygame.pypm https : bitbucket.org pygame pygame src 01b2cb16dc17 src pypm.pyx .",
"Using win-amd64-py2.7 binaries from http : www.lfd.uci.edu gohlke pythonlibs pygame the following works :",
"That works .",
"I ll have to take a look at what changed to satisfy my curiosity .",
"Thanks for the pointer",
"I hope more people find this answer .",
"Pygame was a small easy download and changing pyportmidi s test script from it s download not pygame s to this line gets it working right away .",
"I have noticed that if I just keep sending it instructions using midiOut.WriteShort it will process the first 100 or so then loose the rest .",
"I guess that there is a buffer somewhere that is getting full and once it s full instructions are lost .",
"I can work around the problem by adding a time.sleep .1 after each message but this obviously makes things very slow .",
"Is there a way to test if the buffer is full and only sleep if I need to",
"Or a way to wait for the buffer to empty before I send more data",
"comment. .",
"portmidi.c tells a slightly different tale : .. . .. . So 256 is the default .",
"Which would explain why you re running into problems around 100 or so .",
"I may be wrong here but I m pretty close if I m not right .. . .. . However there is hope : A simple fix is you can sleep down to 2ms on most operating systems without messing things up .",
"However since you re using write short that would only give you 500 messages per second .",
"So you might want to do something like have a queue that is polled every .002 seconds for outgoing messages pop 16 off the stack write them and then sleep .",
"Good luck",
"Fantastic answer thanks",
"As the devices do not have unique identifiers I am told that I should identify them by which USB port they are connected to .",
"Is there any way to retrieve this information",
"My app will run on Linux but Mac OS support is useful for development .",
"I have to physically move the devices without unplugging to fix them .",
"There is no sense in creating a new tag when it would apply only to a question not actually about the subject defined by the tag .",
"lsusb should do the trick .",
"All devices and their respective hubs are listed there .",
"Maybe you can find the missing link there .",
"Unfortunately I can t test it myself right now .",
"So how did it go",
"Is there anyway I can export the entire sequence at once",
"Or do I need to read the whole sequence into the buffer and then save it",
"My code keeps getting stuck on the line LP launchpad.Launchpad .",
"So here is how I ve attempted to de-bug : .. . .. . The programme never prints I ve worked so I know my issue is in the creation of the Launchpad instance .",
"Using a friends laptop we ve had no issues .",
"I ve had intermittent issues with it working and not working and really don t even know where to start looking",
"how do you know it that it is stuck in LP launchpad.Launchpad and not in LP.Open",
"If the launchpad module is stuck in an infinite-loop the subsequent stack-trace could give you a hint as to where the problem lies .",
"This is assuming that you re willing to debug third-party code .",
"Since I don t know launchpad this is only a guess : is Open supposed to access some hardware",
"Maybe it doesn t find it and is waiting for it to become accessible",
"I ve also tried without the LP.Open command and that s where it seems to get hung up .",
"Also the hardware it is using is attached and is recognisable by pygame.midi and also various DAWs .",
"I ve tried a more complex script using the commands and it has no problems at all I m a bit stumped to be honest. .",
"I ll post the script that runs above .",
"Oh I ve figured it out",
"Answer to follow :",
"So after finding a programme that would run with those commands it became clear quickly that I hadn t initiated pygame and pygame.midi .",
"Will run just fine ."
]
}
|
{
"confidence": [
102.83293151855469,
92.47625732421875,
63.71521759033203,
51.47920227050781,
34.59687423706055,
24.460838317871094
],
"content": [
"Question : I m connecting a several identical USB-MIDI devices and talking to them using Python and pyportmidi . I have noticed that when I run my code on Linux occasionally the MIDI ports of the devices are enumerated in a different order so I send messages to the wrong devices . As the devices do not have unique identifiers I am told that I should identify them by which USB port they are connected to . Is there any way to retrieve this information My app will run on Linux but Mac OS support is useful for development . It s annoying because they usually enumerate in a sensible order - the first device in the hub is the first device in portmidi but sometimes they don t - usually the first 2 devices are switched . I have to physically move the devices without unplugging to fix them . Comment : @Charles Why is this question not deserving of a portmidi tag pyportmidi is just a python wrapper on portmidi . The answer that applies to portmidi will almost certainly apply to pyportmidi as well . Comment : the question is actually about pyportmidi not portmidi . There is no sense in creating a new tag when it would apply only to a question not actually about the subject defined by the tag . Comment : @Charles : The answer would almost certainly apply to anyone using portmidi whether directly through pyPortMidi through portmidi-ruby or any other simple wrapper . If the general portmidi answer didn t work in pyPortMidi that would be a bug in pyPortMidi . .. . Answer : lsusb should do the trick . All devices and their respective hubs are listed there . Comment : How do I map what I get from lsusb to the devices I have in pyPortMidi Comment : I didn t know pyPortMidi until now : I have looked into the sources and there should be something like PmDeviceInfo which has an interface interf and a name name and should be mapped to a python function called GetDeviceInfo . Maybe you can find the missing link there . Unfortunately I can t test it myself right now . Comment : So how did it go",
"Question : I m trying to use pyPortMidi for an application that I build for OSX win32 and win64 . I ve gotten it to work on OSX and win32 but I am stuck trying to get it working on win64 . pyPortMidi is a wrapper for a C library named PortMidi and it is available with the PortMidi source download http : sourceforge.net projects portmedia files portmidi 217 as version 0.7 and from John Harrison s site http : alumni.media.mit.edu harrison code.html as version 0.9 . I ve tried both versions with the same failure mode . First I built PortMidi using MSVC++ 2008 Express targeted to X64 . The included test program works and is able to communicate with midi ports so I think the PortMidi build is fine . Next I built pyPortMidi . For version 0.7 I had to modify the setup.py file slightly to account for the proper location of an include files moved from . . win32 to . . pm common and it builds without errors . While version 0.7 uses cython to build pyportmidi.c version 0.9 uses pyrex to do the same thing to get it to work I had to use the version of pyrex installed using easy install . It also built without errors . I m able to import the library into Python but when I make the first call it immediately crashes Python : .. . .. . Has anyone gotten pyPortMidi running on X64 Any suggestions as to how I could debug this issue Comment : You may want to look at this question here http : stackoverflow.com questions 27737264 installing-pygame-on-64-bit-windows-7-and-64-bit-python-2-7 for a solution to this . .. . Answer : An updated pypm module is available as pygame.pypm https : bitbucket.org pygame pygame src 01b2cb16dc17 src pypm.pyx . Using win-amd64-py2.7 binaries from http : www.lfd.uci.edu gohlke pythonlibs pygame the following works : Comment : That works . I ll have to take a look at what changed to satisfy my curiosity . Thanks for the pointer Comment : I hope more people find this answer . Pygame was a small easy download and changing pyportmidi s test script from it s download not pygame s to this line gets it working right away . It was the simplest solution for getting some midi data into python and suited my needs quite well .",
"Question : I m trying to talk to a Novation Launchpad with pyportmidi . I have noticed that if I just keep sending it instructions using midiOut.WriteShort it will process the first 100 or so then loose the rest . I guess that there is a buffer somewhere that is getting full and once it s full instructions are lost . I can work around the problem by adding a time.sleep .1 after each message but this obviously makes things very slow . Is there a way to test if the buffer is full and only sleep if I need to Or a way to wait for the buffer to empty before I send more data .. . Answer : When I took a look at the SVN repo I ran across this in the wrapper code note the Why is bufferSize 0 here comment. . The API documentation shows Pm OpenOutput having the following signature .. . .. . There doesn t appear to be any obvious way to find out the current buffer stack length and more importantly it would appear that the Python wrapper ignores the buffer setting entirely anyway . portmidi.c tells a slightly different tale : .. . .. . So 256 is the default . Which would explain why you re running into problems around 100 or so . However something to keep in mind - MIDI is extremely slow 31250 baud 31250 bits per second since MIDI messages are usually 2 bytes 16 bits that means a maximum of 1953 messages per second . I may be wrong here but I m pretty close if I m not right .. . .. . However there is hope : A simple fix is you can sleep down to 2ms on most operating systems without messing things up . However since you re using write short that would only give you 500 messages per second . So you might want to do something like have a queue that is polled every .002 seconds for outgoing messages pop 16 off the stack write them and then sleep . That way if your whole MIDI stack supports rates that fast you could get 8000 messages per second . I noticed that in the following code if I dropped the sleep time lower than .002 no MIDI would be sent at all until I exited the program then all the events spewed onto the MIDI BUS . So there might be an issue with portmidi rate-limiting or on OSX . One other thing to keep in mind if you re really blasting MIDI - most likely control-change values if you re modifying something like a High Pass Filter a value of 1 sounds a lot like 2 so if you make your messages less granular increment or decrement by 2 or 4 you can cut down the number of messages without having a noticeable difference in the audio . This is a suboptimal solution and in all likelihood your MIDI stack probably supports much faster than 31250 baud . Another thing to consider is that if you slave your portmidi application to the MIDI clock you can get a reliable stream of ticks from the MIDI host which you could use as the trigger to write MIDI data back out no sleeps necessary . Good luck -n .. . .. . PPQN Clock http : home.roadrunner.com jgglatt tech midifile ppqn.htm MIDI 1.0 http : en.wikipedia.org wiki MIDI 1.0 Comment : Fantastic answer thanks",
"Question : I Have a console program written in C which generates short random musical compositions using the PortMidi library . Ultimately I would like to write these sequences as either a midi or audio file . I have found some explanations of reading and writing functions within the portmidi library : Pm read and Pm write but without examples I am struggling to understand and implement this . Is there anyway I can export the entire sequence at once If not is it necesary to recursively read into a buffer and save individual midi notes Or do I need to read the whole sequence into the buffer and then save it .. . Answer : PortMidi doesn t have any way to do do the whole thing in one shebang as far as I can tell so you have to manually buffer all the output MIDI messages into an array and then save them to a file . A good example of this can be found in the receive sysex function at http : audacity.googlecode.com svn audacity-src trunk lib-src portmidi pm test sysex.c .",
"Question : I m using pygame.midi library to send MIDI Messages Control Change messages not notes . The idea is to send from the output from this python program to the input of another program . As you can see i m sending 0x74 124 0 . I m taking those numbers from rakarrack the application that i want to control implementation chart : http : rakarrack.sourceforge.net midiic.html .. . .. . What am I doing wrong .. . Answer : MIDI status bytes the first byte of the message must have the high 0x80 bit set . the linked chart is a bit confusing but I m guessing 0x74 is a data byte and must be preceded by the proper status byte . some basic MIDI documentation : http : www.midi.org techspecs midimessages.php .. . .. . control change is 0xbn where n is the channel number so 0xb0 is a control change message for channel 0 . Comment : Where the 0x80 comes from I don t see in the chart . Comment : I just updated with a link-to status codes . 0x80 is note off on channel 0 probably not what you want I just used it as an example . Comment : Comparing both MIDI charts I figured out that the 0x74 should be the second byte and 124 is the value of on off which replaces velocity . The question is what is the first byte value Comment : since I have no knowledge of rakarrack my guess would be a note on event 0x9n where n is the channel . 0x90 for channel 0 for example . Comment : mmmm.. . python accepted like a valid instruction however rakarrack doesn t do anything . I don t think it should be a note on event because this is not a playing device like a syntetizer or sampler .",
"Question : I m doing some work with a MIDI controller called the Novation Launchpad that has a python-module available to import and use . My code keeps getting stuck on the line LP launchpad.Launchpad . So here is how I ve attempted to de-bug : .. . .. . The programme never prints I ve worked so I know my issue is in the creation of the Launchpad instance . Using a friends laptop we ve had no issues . I ve had intermittent issues with it working and not working and really don t even know where to start looking Comment : how do you know it that it is stuck in LP launchpad.Launchpad and not in LP.Open Comment : Perhaps you could hit ctrl-C while the program is apparently frozen . If the launchpad module is stuck in an infinite-loop the subsequent stack-trace could give you a hint as to where the problem lies . This is assuming that you re willing to debug third-party code . Comment : Since I don t know launchpad this is only a guess : is Open supposed to access some hardware Maybe it doesn t find it and is waiting for it to become accessible Comment : I ve also tried without the LP.Open command and that s where it seems to get hung up . Also the hardware it is using is attached and is recognisable by pygame.midi and also various DAWs . I ve tried a more complex script using the commands and it has no problems at all I m a bit stumped to be honest. . I ll post the script that runs above . Comment : Oh I ve figured it out Answer to follow : .. . Answer : So after finding a programme that would run with those commands it became clear quickly that I hadn t initiated pygame and pygame.midi . Will run just fine ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
cross-platform
|
UNK_RELATION
|
forerunnerdb@database@41
|
forerunnerdb -- forerunnerdb is a nosql @placeholder for browsers and node.js and allows you to crud your data client-side with the same query language as mongodb .
|
{
"confidence": [
60.07874298095703,
55.82544708251953,
50.92008972167969,
42.20381164550781,
25.798864364624023,
17.984655380249023,
15.637325286865234,
13.422388076782227,
13.422388076782227,
13.422388076782227,
13.422388076782227,
13.422388076782227,
13.422388076782227,
13.422388076782227,
13.422388076782227,
13.422388076782227,
13.422388076782227,
13.422388076782227,
13.422388076782227,
13.422388076782227,
13.422388076782227,
13.422388076782227,
13.422388076782227
],
"content": [
"I am using ForerunnerDB - a NoSQL JSON Document DB https : github.com Irrelon ForerunnerDB for creating a data store on the client web .",
"You are using ForerunnerDB incorrectly .",
"Instead you should use ForerunnerDB in AngularJS as described in the documentation : https : github.com Irrelon ForerunnerDB angularjs-and-ionic-support .. . .. . ForerunnerDB includes a helper method called ng that allows you to correctly link data from a collection to your view s scope .",
"This particular library offers a persistence storage https : github.com Irrelon ForerunnerDB data-persistence-save-and-load-between-pages option .",
"It includes an AngularJS plugin that makes using it with AngularJS very easy but instead you ve written a wrapper of your own that hooks onto the data property of a collection something that you shouldn t do because that property is managed internally by ForerunnerDB and can be destroyed and re-created meaning you will have an incorrect reference to an object that might no longer be used by a collection .",
"You should use an accessor method such as .find in ForerunnerDB s case to access data instead .",
"Thank you for pointing that out .",
"However there seems to be something wrong with it .",
"I have included my code below : .. . .. . App : .. . .. . .. . .. . Controller : .. . .. . Service : .. . .. . View : .. . .. . The problem is that the variable controller.group is null in the view but in the controller I am getting the expected value when I log it line 15 out to the console .",
"I thought maybe it was a problem of scope and that the changes made to the variable inside the callback were not being picked up in the view .",
"But that is the not the case because I commented out the line clientStore.getTable groups .save and ran it again and the view was updated perfectly as expected .",
"I cannot figure out why the save function is erasing the controller.groups variable in the view but is logged out perfectly in the controller .",
"Also when using third party javascript libraries properties with an underscore are generally considered private and should not be accessed directly .",
"Usually a property that starts with an underscore is a good indication that it is private not all libraries and programmers follow this convention but many do .",
"I am actually using the angular plugin .",
"I ll add the app-code as well to clear the confusion .",
"I created the service to have a smooth interface for the db that I could app-wise Did not feel comfortable using rootScope .",
"I missed the ng helper method .",
"It s working smoothly now .",
"I have also removed the fetchRecords function too .",
"Cheers",
"@SpiderWasp42 No problem buddy",
":"
]
}
|
{
"confidence": [
71.38053131103516
],
"content": [
"Question : I am using ForerunnerDB - a NoSQL JSON Document DB https : github.com Irrelon ForerunnerDB for creating a data store on the client web . This particular library offers a persistence storage https : github.com Irrelon ForerunnerDB data-persistence-save-and-load-between-pages option . However there seems to be something wrong with it . I have included my code below : .. . .. . App : .. . .. . .. . .. . Controller : .. . .. . Service : .. . .. . View : .. . .. . The problem is that the variable controller.group is null in the view but in the controller I am getting the expected value when I log it line 15 out to the console . I thought maybe it was a problem of scope and that the changes made to the variable inside the callback were not being picked up in the view . But that is the not the case because I commented out the line clientStore.getTable groups .save and ran it again and the view was updated perfectly as expected . I cannot figure out why the save function is erasing the controller.groups variable in the view but is logged out perfectly in the controller . .. . Answer : You are using ForerunnerDB incorrectly . It includes an AngularJS plugin that makes using it with AngularJS very easy but instead you ve written a wrapper of your own that hooks onto the data property of a collection something that you shouldn t do because that property is managed internally by ForerunnerDB and can be destroyed and re-created meaning you will have an incorrect reference to an object that might no longer be used by a collection . Instead you should use ForerunnerDB in AngularJS as described in the documentation : https : github.com Irrelon ForerunnerDB angularjs-and-ionic-support .. . .. . ForerunnerDB includes a helper method called ng that allows you to correctly link data from a collection to your view s scope . Also when using third party javascript libraries properties with an underscore are generally considered private and should not be accessed directly . You should use an accessor method such as .find in ForerunnerDB s case to access data instead . Usually a property that starts with an underscore is a good indication that it is private not all libraries and programmers follow this convention but many do . Comment : I am actually using the angular plugin . I ll add the app-code as well to clear the confusion . I created the service to have a smooth interface for the db that I could app-wise Did not feel comfortable using rootScope . I missed the ng helper method . Thank you for pointing that out . It s working smoothly now . I have also removed the fetchRecords function too . Cheers Comment : @SpiderWasp42 No problem buddy :"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
database
|
UNK_RELATION
|
argparse.jl@parsing@45
|
argparse.jl -- argparse.jl is a package for @placeholder command-line arguments to julia programs .
|
{
"confidence": [
57.39906311035156,
47.77545928955078,
42.10970687866211,
40.98523712158203,
39.52173614501953,
22.75495147705078,
20.503896713256836,
20.130369186401367,
19.81909942626953,
15.187028884887695,
15.187028884887695,
15.187028884887695,
15.187028884887695,
15.187028884887695,
15.187028884887695,
15.187028884887695,
15.187028884887695,
15.187028884887695
],
"content": [
"Is there a way to do this in ArgParse.jl",
"This feature is not currently present in ArgParse.jl although it would not be difficult to add .",
"I have prepared a pull request https : github.com carlobaldassi ArgParse.jl pull 27 .",
"This is essentially the same question as : Check if argparse optional argument is set or not http : stackoverflow.com q 30487767 855050 but in Julia using Julia s ArgParse module https : github.com carlobaldassi ArgParse.jl .",
"Find bellow a self-contained example sightly modified example1 https : github.com carlobaldassi ArgParse.jl blob master examples argparse example1.jl from ArgParse.jl with 2 arguments that prints true if an argument was not set just replace with for the opposite behaviour : .. . .. . And example command-line calls assuming above is stored in test.jl : .. . .. . .. . .. . However sometimes it might be more appropriate to define a default-value for the parameter rather than checking if it was set .",
"I know how to do this in a dirty way but it gets messy if I want to replicate the behavior of argparse in Python where I can pass multiple-files with @ as well as arguments in the command-line and then the value of a parameter is simply the last value passed to this parameter .",
": If there is no default way of doing this maybe I can do it by hand by calling parse args on a list of arguments read from a file .",
"Python s argparse has a simple way to read parameters from a file : .. . .. . https : docs.python.org 2 library argparse.html fromfile-prefix-chars .. . .. . Instead of passing your arguments one by one : .. . .. . You can say : .. . .. . and then the arguments are read from args.txt .",
"In short once you have parsed the arguments you can check if an argument was set as parsed args argname nothing will return true if it was not set .",
"Given an argument that takes a value I want to know if its value was given or not .",
"It can be done by adding the default keyword to the parameter : .. . .. . aswell as the required keyword for the positional parameters which would force the user to introduce it .",
"If an argument has a default-value can I know if it was passed",
"@becko You can compare it to the default value.. . but if the user introduces exactly the default-value I couldn t find a way of differenciating the two cases .",
"P.S .",
"What s the best way of doing this",
"In the interim the following code suffices for what you need :",
"Sorry I meant args ArgParse.parse args ARGS arg parse settings",
"@becko Yes that should work ."
]
}
|
{
"confidence": [
77.46410369873047,
70.11373138427734
],
"content": [
"Question : This is essentially the same question as : Check if argparse optional argument is set or not http : stackoverflow.com q 30487767 855050 but in Julia using Julia s ArgParse module https : github.com carlobaldassi ArgParse.jl . Given an argument that takes a value I want to know if its value was given or not . .. . Answer : In short once you have parsed the arguments you can check if an argument was set as parsed args argname nothing will return true if it was not set . Find bellow a self-contained example sightly modified example1 https : github.com carlobaldassi ArgParse.jl blob master examples argparse example1.jl from ArgParse.jl with 2 arguments that prints true if an argument was not set just replace with for the opposite behaviour : .. . .. . And example command-line calls assuming above is stored in test.jl : .. . .. . .. . .. . However sometimes it might be more appropriate to define a default-value for the parameter rather than checking if it was set . It can be done by adding the default keyword to the parameter : .. . .. . aswell as the required keyword for the positional parameters which would force the user to introduce it . Comment : If an argument has a default-value can I know if it was passed Comment : @becko You can compare it to the default value.. . but if the user introduces exactly the default-value I couldn t find a way of differenciating the two cases .",
"Question : Python s argparse has a simple way to read parameters from a file : .. . .. . https : docs.python.org 2 library argparse.html fromfile-prefix-chars .. . .. . Instead of passing your arguments one by one : .. . .. . You can say : .. . .. . and then the arguments are read from args.txt . Is there a way to do this in ArgParse.jl P.S . : If there is no default way of doing this maybe I can do it by hand by calling parse args on a list of arguments read from a file . I know how to do this in a dirty way but it gets messy if I want to replicate the behavior of argparse in Python where I can pass multiple-files with @ as well as arguments in the command-line and then the value of a parameter is simply the last value passed to this parameter . What s the best way of doing this .. . Answer : This feature is not currently present in ArgParse.jl although it would not be difficult to add . I have prepared a pull request https : github.com carlobaldassi ArgParse.jl pull 27 . In the interim the following code suffices for what you need : Comment : Sorry I meant args ArgParse.parse args ARGS arg parse settings Comment : @becko Yes that should work ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
parsing
|
UNK_RELATION
|
scaladoc@scala@103
|
scaladoc -- scaladoc is a documentation-generation system which reads specially formatted comments in @placeholder source code and generates compiled documentation .
|
{
"confidence": [
52.731117248535156,
46.74026107788086,
46.53388214111328,
45.4962043762207,
44.549869537353516,
44.549869537353516,
43.9681510925293,
43.25507354736328,
41.952152252197266,
41.813514709472656,
41.741214752197266,
41.58854675292969,
41.576499938964844,
41.576499938964844,
40.942176818847656,
40.92329025268555,
40.80644607543945,
40.80644607543945,
40.80644607543945,
40.5770263671875,
40.497859954833984,
40.482967376708984,
39.90997314453125,
39.90997314453125,
39.32215881347656,
39.32215881347656,
39.32105255126953,
39.25048828125,
39.13991928100586,
39.13991928100586,
38.80438995361328,
38.80438995361328,
38.515865325927734,
37.90191650390625,
37.817832946777344,
37.817832946777344,
37.817832946777344,
37.76874542236328,
37.65563201904297,
37.65563201904297,
37.64954376220703,
37.47932052612305,
36.98500061035156,
36.709266662597656,
36.709266662597656,
36.709266662597656,
36.550048828125,
36.26852798461914,
36.26852798461914,
36.26852798461914,
36.26852798461914,
36.26852798461914,
36.26852798461914,
36.235389709472656,
36.235389709472656,
36.001556396484375,
35.544830322265625,
35.224979400634766,
34.812042236328125,
34.777587890625,
34.60200119018555,
34.60200119018555,
34.60200119018555,
34.60200119018555,
34.60200119018555,
34.60200119018555,
34.60200119018555,
34.60200119018555,
34.60200119018555,
34.60200119018555,
34.60200119018555,
34.60200119018555,
34.60200119018555,
34.60200119018555,
34.60200119018555,
34.55434799194336,
34.55434799194336,
34.55434799194336,
33.948211669921875,
33.80304718017578,
33.49641799926758,
33.49641799926758,
33.49641799926758,
33.14551544189453,
33.14551544189453,
33.107276916503906,
32.952301025390625,
32.94404220581055,
32.171348571777344,
32.171348571777344,
32.171348571777344,
32.171348571777344,
32.171348571777344,
32.155303955078125,
32.155303955078125,
32.155303955078125,
32.155303955078125,
32.155303955078125,
32.155303955078125,
32.155303955078125
],
"content": [
"Darn scaladoc needs to up their documentation -",
"Scaladoc documentation http : docs.scala-lang.org style scaladoc.html doesn t have examples of this .",
"There are some problems with Scaladoc diagram generation itself not sbt .",
"Pure scaladoc",
"Updated from the future : vim-scaladoc https : github.com mdreves vim-scaladoc",
"vim-scaladoc https : github.com mdreves vim-scaladoc was released in late 2012 .",
"For a while I had the idea not implemented to mix the documentation generated by Javadoc and Scaladoc .",
"Is there something like that for scaladoc",
"Edit and rebuild the Scaladoc https : github.com scala scala tree master src scaladoc source to include MathJax or.. . .. . 2 .",
"What is the Scaladoc syntax to create a link-to this method",
"I have a short Bash script that does a find-and-replace on my Scaladoc comments in order to generate links to external documentation of a third-party library .",
"You should report to scaladoc .",
"This works even though not built-in with scaladoc .",
"Is there any way to enforce scaladoc validation .",
"Let s say I have a class such as : .. . .. . Then I generate a Scaladoc and in my Scaladoc document I want the word Enumeration to have a link-to the current scala.Enumeration class and to inherit all the documentation from the methods taken from scala.Enumeration .",
"I want that Scaladoc generates a type hierarchy diagram for the following code snippet : .. . .. . But when I execute scaladoc file .scala there is no type hierarchy shown - neither in A nor in B .",
"I ve read before asking this documentation https : wiki.scala-lang.org display SW Tags+and+Annotations about ScalaDoc .",
"https : stackoverflow.com questions 26131524 the-list-method-and-covariance .. . scaladoc for map on Map .. . is the documentation wrong or am I missing something",
"I am using scaladoc to generate documentation for my scala files is there away to generate from files in subdirectories",
"scaladoc Alphabetical Index .. . .. . There s no such search in scaladoc itself but there is an alphabetic index that contains class object trait members .",
"I would like to enter math formulae in Scaladoc documentation of mathematical Scala code .",
"Is there an equivalent library for Scaladoc",
"Is it possible to generate diagrams with Scaladoc and SBT",
"Is it possible to generate diagrams with Scaladoc and SBT",
"I m trying to create a Scaladoc for my project .",
"Generated html for the scaladoc http : i.stack.imgur.com LJYee.jpg",
"I am wondering where to put resources such as diagrams in order that they can be automatically imported by an invocation of scaladoc and how to refer to these resources in the documentation of the code .",
"What is the standard convention or tag to add code examples in ScalaDoc",
"I need programmatic access to the ScalaDoc objects so that I can generate alternate documentation .",
"If I want to do the Scaladoc documentation of let s say a private class...how can I do it",
"Does MathML integrate well with Scaladoc",
"There is no equivalent in Scaladoc therefore no clean solution .",
"How can I distinguish them when referring to them in scaladoc comments",
"I tried using : .. . .. . But scaladoc complains that this is ambiguous but tells me that .. . .. . is an option .. . .. . However I can t work out how to tell scaladoc to use this method .",
"Unfortunately there is a bug in the scaladoc generator which makes proper indenting not possible .",
"There appears to be an option for scaladoc called -doc-root-content which was added in 2.9.2 .",
"String does not because it goes to java.lang.String which is javadoc and not supported by scaladoc .",
"What should I add to configuration to make scaladoc as follows .. . .. . in project2 be successfully compiled by sbt project2 doc",
"Yes scaladoc -help doesn t help a whole lot .",
"last shows that no option is added to scaladoc arguments .",
"Note : this is related to https : stackoverflow.com questions 18747265 sbt-scaladoc-configuration-for-the-standard-library 18747266 but that question differs by linking to the scaladoc for the standard-library for which there is a well known File scalaInstance.value.libraryJar which is not the case in this instance .",
"Everything works great with it except the ScalaDoc .",
"Is there any way I can tell sbt to exclude the src main java folder from the scaladoc generation",
"And I need it to work with Intellij IDEA Quick Documentation Ctrl-Q for viewing scaladoc of a method .",
"I m still surprised at how difficult it is to get this working and the lack of documentation for scaladoc itself .",
"given .. . .. . Can I make scaladoc include extension method bar in the documentation of Foo",
"What can I do to view the Scaladoc in Eclipse",
"WARNING It may be a hack as I know very little about scaladoc .",
"I prefer @rightfold solution unless there is some special scaladoc thing for that .",
"Is it possible to insert a link-to my home page into every Scaladoc page",
"PS : i would have added the tag scaladoc but apparently I m unworthy.. .",
"So if the scaladoc is online I use my friend Google .",
"Executing scaladoc -help shows further information for the diagrams option :",
"I want to have links like .. . .. . Javadoc @link Object toString .. . Scaladoc Object toString .. . .. . How can I do this with scaladoc",
"http : stackoverflow.com questions 15996651 is-there-a-way-to-include-math-formulae-in-scaladoc .. . How to run bash script after generating scaladoc using doc task",
"scaladoc -help yields nothing germane and neither does the source https : github.com scala scala blob 2.11.x src scaladoc scala tools nsc doc Settings.scala .",
"Play Framework generates scaladoc for its Scala classes and javadoc for its Java classes .",
"And here is some hint scaladoc gives me :",
"With a command-line browser like elinks and just one directory which matches scaladoc you can use :",
"For example with this code : .. . .. . when I try to generate the scaladoc an exception is thrown : error : .. . .. . In this example the scaladoc is generated successfully but in another big project that I have this error is also thrown and nothing is generated .",
"Scaladoc in particular is picky about using fully qualified paths inside .",
"As part of the Scaladoc I would like to include the formula of each function .",
"I added an answer to Is there a way to include math formulae in Scaladoc",
"In general how do I put in any of the options that are listed in scaladoc -help .",
"One theory I ve heard is that scaladoc is too sensitive to dot warning messages .",
"Scaladoc HAD an option long ago --access but it s no longer supported",
"Using Scaladoc is there a way to include hyperlink to some external HTTP URL",
"I d like to setup ScalaDoc to link-to the standard-library from SBT .",
"I m trying to link classes from the JDK into the scaladoc-generated doc .",
"I ve used the -doc-external-doc option of scaladoc 2.10.1 but without success .",
"Seems like this option only works for scaladoc-generated doc .",
"Did I miss an option in scaladoc or should I fill a feature request",
"And as my understanding goes it s not sbt s fault but the way scaladoc works .",
"Why do some method descriptions in Scaladoc start with use-case",
"Yeah I know I keep seeing you in the ScalaDoc related commits .",
"possible duplicate of How to disable ScalaDoc generation in dist task in Play 2.2.x",
"http : stackoverflow.com questions 21461798 how-to-disable-scaladoc-generation-in-dist-task-in-play-2-2-x",
"Adding the following settings to the build definition of a Play 2.2.x app does not disable Scaladoc generation .",
"I can generate class-hierarchy diagram by manually use scaladoc -diagrams .. . .. . .. . I can also generate basic ScalaDoc with Maven by mvn scala : doc .. . .. . But How can I put -diagrams in when I run ScalaDoc from Maven",
"We re using Scala 2.8 it seems the scaladoc tool that ships with 2.8.1 does not generate usable documentation for our Java classes -- it gets the structure right but does not include the documentation .",
"But how do a get a single ScalaDoc of all Scala sub-projects",
"What does work is self made scaladoc above methods and classes but thats it .",
"In fact even inside Scaladoc itself one cannot link-to objects .",
"How to make a link-to some imported name which is in another package in scaladoc whithout having to use fully qualified-name",
"It s not in the scaladoc specific -help section in 2.9.2 is in the section for general compile options which is a bug .",
"After doing so one should be able to execute scaladoc -diagrams file .scala successfully and see as a result the tag Type Hierarchy above the member search bar in the generated documentation .",
"I tried adding your code to my SBT build file but ScalaDoc still cannot seem to find JDK classes .",
"I have a top level trait that contains a number of classes and traits like : .. . .. . When I generate the documentation for it using scaladoc I can link-to the inner classes using CLASS NAME but scaladoc fails to create links for trees both in signatures and extends .",
"I would like to generate my Scaladoc but I m having some problems with it .",
"As an example : .. . .. . The scaladoc portion of that process takes about 12 of those 20 seconds .",
"I m trying to configure the Scaladoc in SBT specifically the title output directory and classpath .",
"The warning you see means that scaladoc doesn t know how to link-to Option .",
"Apparently the hint is displayed only if I use scaladoc directly .",
"I would like to create ScalaDoc entries to every val and def of my class .",
"https : stackoverflow.com questions 3811556 scaladoc-for-map-on-map .. . What s going on here with scala.collection.immutable.Stack.+ : prepend",
"Is there a way that I can reference the name of a val in a Object class using scaladoc similar to .. . .. . in javadoc .",
"While the Scaladoc HTML rendering gets a beautification I m afraid the tool itself is still in a rather unsatisfying state .",
"I ve seen this post How do I inherit Scaladoc from Scala s standard-library",
"Possible duplicate of How do I inherit Scaladoc from Scala s standard-library",
"http : stackoverflow.com questions 23765955 how-do-i-inherit-scaladoc-from-scalas-standard-library"
]
}
|
{
"confidence": [
60.28736114501953,
58.514915466308594,
55.915016174316406,
53.63362503051758,
53.540348052978516,
52.28799819946289,
52.28205108642578,
52.258087158203125,
51.80306625366211,
50.84406280517578,
50.779624938964844,
50.59220886230469,
50.11925506591797,
50.0163688659668,
49.826873779296875,
49.554771423339844,
48.95682907104492,
48.5528678894043,
48.22584533691406,
47.08226013183594
],
"content": [
"Question : How can I stop scaladoc from running when executing dist on a Play project currently using Play 2.3.0 As an example : .. . .. . The scaladoc portion of that process takes about 12 of those 20 seconds . I don t want to run scaladoc at all anyone doing work on this non-library project will be looking at the actual source code . Comment : possible duplicate of How to disable ScalaDoc generation in dist task in Play 2.2.x http : stackoverflow.com questions 21461798 how-to-disable-scaladoc-generation-in-dist-task-in-play-2-2-x .. . Answer : On a project built with Play 2.1 I added the following setting to my sbt build file .. . .. . This removed the documentation creation completely .",
"Question : I want that Scaladoc generates a type hierarchy diagram for the following code snippet : .. . .. . But when I execute scaladoc file .scala there is no type hierarchy shown - neither in A nor in B . How can I generate such diagrams .. . Answer : First one needs Scaladoc2 for this which is part of Scala 2.10 . If 2.10 is installed one also needs to pass the -diagrams option to Scaladoc in order to generate the diagrams . But if you do so it can be that the following error message occurs : .. . .. . The error occurs because Scaladoc does not generate the diagrams by itself but tries to call Graphviz http : www.graphviz.org to do this job . When we add the -diagrams-debug flag we well get among other things the exact error message : .. . .. . To solve the problem one needs to install the program dot which is part of Graphviz . After doing so one should be able to execute scaladoc -diagrams file .scala successfully and see as a result the tag Type Hierarchy above the member search bar in the generated documentation . Executing scaladoc -help shows further information for the diagrams option :",
"Question : I m using sbt doc to generate documentation for a Scala project . Using the default settings the documentation automatically shows inherited members as in the following screenshot . Showing all inherited http : i.stack.imgur.com dQH8Q.png .. . .. . Ideally I would like to generate documentation which hides all the inherited members by default as below . Hiding all inherited http : i.stack.imgur.com oJdOS.png .. . .. . How can I approach generating the documentation such that it only shows explicitly defined members .. . Answer : scaladoc -help yields nothing germane and neither does the source https : github.com scala scala blob 2.11.x src scaladoc scala tools nsc doc Settings.scala . You re out of luck I m afraid . Comment : Yes scaladoc -help doesn t help a whole lot . However I have seen other documentation which achieves the effect I am after . There must be a way to do it .",
"Question : I would like to create ScalaDoc entries to every val and def of my class . The problem is that the vals lie inside a pattern definition and don t know how to use the syntax . Example : .. . .. . How do I document part1 and part2 I ve read before asking this documentation https : wiki.scala-lang.org display SW Tags+and+Annotations about ScalaDoc . Comment : You can do private val parts .. . .. . val part1 parts . 1 .. . val part2 parts . 2 . Comment : Good one I was going to say : You can document the function that produces the tuple extract that code into a function if needed but this works only for internal developer documentation where vals are private . I prefer @rightfold solution unless there is some special scaladoc thing for that . .. . Answer : It should be .. . .. . but for a flawed heuristic .. . .. . Under -Xlint you will see .. . .. . Maybe the heuristic could be improved to discard only if no doc is discovered on the enclosing entity . Comment : It would be nice if this could be improved as proposed . Comment : Created a new issue for the Scala team based on your answer : issues.scala-lang.org browse SI-8751 https : issues.scala-lang.org browse SI-8751 Comment : unmoored doc comments weren t signed off on by Adriaan .",
"Question : I would like to enter math formulae in Scaladoc documentation of mathematical Scala code . In Java I found a library called LatexTaglet that can do exactly this for Javadoc by writing formulae in Latex : http : latextaglet.sourceforge.net .. . .. . And it seems to integrate well with Maven reporting plugins section of a POM . Is there an equivalent library for Scaladoc If not how could I integrate this library with SBT I also considered using MathML http : www.w3.org Math but looks too verbose . Is there an editor you would recommend Does MathML integrate well with Scaladoc Thank you for your help .. . Answer : The short answer is : no . LaTeXTaglet is made possible by the JavaDoc Taglet http : docs.oracle.com javase 7 docs technotes guides javadoc taglet overview.html API . There is no equivalent in Scaladoc therefore no clean solution . However I can think of a hack that might be easy enough to do : .. . .. . There s a library called MathJax http : www.mathjax.org which looks for LaTeX-style math formulae in an HTML page and dynamically renders it in-place . I ve used it before it s pretty nice all you have to do is include the script . So you could do two things : .. . .. . 1 . Edit and rebuild the Scaladoc https : github.com scala scala tree master src scaladoc source to include MathJax or.. . .. . 2 . Write a little post-processor crawl all of Scaladoc s HTML output after it runs and inject MathJax into each file . That way you could just write LaTeX formulae directly in your Scala comments and they should be rendered in the browser . Of course if you wanted a non-hacky solution I d suggest you create a taglet-like API for Scaladoc Comment : Thanks a lot for your answer Maybe an idea for an SIP Comment : is it possible to do the crowling with sbt doc and if yes how to",
"Question : In Eclipse I have set the Javadoc Location property of my Scala project to file : D : EclipseWorkspace MyProject target scala-2.9.1 api where D : EclipseWorkspace MyProject is the location of my scala project . Now if I am in a Scala file that implements a class trait when I type Shift+F2 Eclipse opens the Scaladoc page of that class trait . However this does not work if it is an object since Eclipse tries to open ObjectName .html whereas the Scaladoc-generated file name is ObjectName .html . Is there any workaround Comment : AFAIK no . In fact even inside Scaladoc itself one cannot link-to objects . If you look at the pages I wrote like Regex or the stuff inside scala.sys.process you ll see the convoluted way I refer to them instead of simply linking to them . Mind you I m not claiming Scaladoc s limitation has anything to do with Eclipse s limitation . Comment : @Daniel C . Sobral . Thanks . If it doesn t work in Scaladoc itself one can not expect it to work with eclipse javadoc mechanism . I was just hoping that if we know the mangled names of the generated class files for the objects then we can somehow trick Eclipse to open the corresponding html . This will be just a temporary workaround since the mangled names might change in future versions of scala scaladoc The ideal way would be scaladoc supports object links and then Scala-IDE overrides Shift-F2 Comment : Having tried a few different setups of Eclipse and scala versions I ve never been able to get anything more than code-completion to operate and have often wondered how if possible to see JavaDoc information in realtime Comment : The scaladoc intergration is mentioned in this issue : assembla.com spaces scala-ide tickets 1000860 https : www.assembla.com spaces scala-ide tickets 1000860 It seems it s still a while before it s added . .. . Answer : Typesafe has announced http : blog.typesafe.com genjavadoc-generate-true-javadoc-for-scala-pr a plugin for the Scala compiler which generates JavaDoc for your Scala API . The plugin and its documentation is available on github https : github.com typesafehub genjavadoc . Maybe this helps as a workaround .",
"Question : I d love some advice on how best to autogenerate documentation for a mixed Java Scala project . We re using Scala 2.8 it seems the scaladoc tool that ships with 2.8.1 does not generate usable documentation for our Java classes -- it gets the structure right but does not include the documentation . And javadoc obviously only covers the Java part . We looked at Doxygen but it doesn t work with Scala out of the box so that s a bit of a research project . How can we do this short of going 100 Java or 100 Scala Thanks Comment : I ve same problem in a project . At the moment my solution looks like that I ve written all the important classes in Scala that are the classes that need documentation . Also I used a .scala filter for Scaladoc so I let off the Java classes in the docu . For a while I had the idea not implemented to mix the documentation generated by Javadoc and Scaladoc . But even when adjusting the CSS s then you mix two different looking documentation styles . Comment : Does your project have Scala and Java really mixed in the same packages or splitted into different packages In the latter case generating two documentations and cross-referencing them might work . Comment : @Pa loEbermann : In fact it s so that most packages are written in one language only . But I also have the mixed case . This arises mostly from a former Java package . Then gradually I migrate it to Scala whereas adjusting functionality . Then sometimes remain separate Java classes in a package full of Scala code . But as mentioned above I simply leave these files away in the documentation . Comment : We have both in the same package . We started out writing public interfaces in Java for guaranteed compatibility with Java but over time it s been harder to keep all the public code pure Java . .. . Answer : Play Framework generates scaladoc for its Scala classes and javadoc for its Java classes . See generateAPIDocsTask : https : github.com playframework Play20 blob master framework project Build.scala Comment : This doesn t really answer the question The OP is using play 1.2.x and that link is for play 2.0 which has a completely different build-system .",
"Question : null .. . Answer : I am using scaladoc to generate documentation for my scala files is there away to generate from files in subdirectories Comment : Is using sbt an option sbt doc will run scala-doc for all your sources together Comment : Is it possible without sbt Pure scaladoc",
"Question : null .. . Answer : This should be a easy question but I just can t find a clear answer . I m trying to create a Scaladoc for my project . Let s say I have a class such as : .. . .. . Then I generate a Scaladoc and in my Scaladoc document I want the word Enumeration to have a link-to the current scala.Enumeration class and to inherit all the documentation from the methods taken from scala.Enumeration . Is it possible to do that If so how can I do it I ve seen this post How do I inherit Scaladoc from Scala s standard-library http : stackoverflow.com questions 23765955 how-do-i-inherit-scaladoc-from-scalas-standard-library but the method they used to solve the problem is no longer possible . They talk about a solution in Maven that doesn t work anymore was deprecated and eliminated long ago and some other solutions that force me to use sbt instead of Maven .. . .. . I m trying to generate the documentation using Maven not sbt so I m not sure if that could turn to be a problem too.. . Comment : Possible duplicate of How do I inherit Scaladoc from Scala s standard-library http : stackoverflow.com questions 23765955 how-do-i-inherit-scaladoc-from-scalas-standard-library Comment : I don t think so I checked it before writing this message . That question refers to sbt variables to solve the problem something I can t do with Maven . There is a solution that could work for Maven ...but its use was deprecated and eliminated so I can t use it either . Comment : Perhaps you could clarify how your question is different rather than how the question that has no accepted answers is lacking a good answer . It seems to me like a good answer to either question would also be a good answer to the other or trivially translate to one .",
"Question : I have a short Bash script that does a find-and-replace on my Scaladoc comments in order to generate links to external documentation of a third-party library . I would like this script to run every time I generate Scaladocs using the doc task . How can I achieve this .. . Answer : It s actually pretty easy . First I inspected doc to see what it was inspect doc on the sbt prompt noticed it was a task and proceeded with declaring a dependency on itself on build.sbt : .. . .. . That thing I used to execute bash is the same library as scala.sys.process so you can look up Scaladoc for that http : www.scala-lang.org api current index.html scala.sys.process.package . This was tested on SBT 0.12.2 and I think there might be a small difference on SBT 0.11.x or 0.10.x .",
"Question : There are a lot of places in the Scala API http : www.scala-lang.org api current particularly in collections where method signatures are wrong . For example the scaladoc signature for Map http : www.scala-lang.org api current scala.collection.Map . flatMap says .. . .. . But the actual signature is .. . .. . This one especially makes no sense because the scaladoc signature includes Map B but Map has two type parameters not one . What s going on here Is this a mistake Comment : There are a lot of sort-of-duplicates on Stack Overflow that ask variants of this question about specific methods in the API . I m making this broad question with a community wiki answer in hopes that we can answer all of them in one place . .. . Answer : The incorrect signatures you re see in the generated documentation are called use cases . They re supposed to clarify the documentation by showing idealized API similar to the real one but omitting tedious details like the pervasive implicit CanBuildFrom http : www.scala-lang.org api current scala.collection.generic.CanBuildFrom parameter which bothers some people https : stackoverflow.com questions 1722726 is-the-scala-2-8-collections-library-a-case-of-the-longest-suicide-note-in-hist . For methods with use cases you can get to the real signature by clicking the method name to show the details for that method and then clicking Full Signature to expand another section that shows the signature . References .. . .. . Scala issue SI-3448 https : issues.scala-lang.org browse SI-3448 created May 2010 deals specifically with the wrong number of type parameters being shown for Map . This issue as closed Won t Fix in July 2012 . Paul Phillips talk Scala Collections : Why Not https : www.youtube.com watch v uiJycy6dFSQ t 514 from January 2014 scorns the use cases as lies in slide 1 http : www.slideshare.net extempore a-scala-corrections-library 13 slide 2 http : www.slideshare.net extempore a-scala-corrections-library 14 slide 3 http : www.slideshare.net extempore a-scala-corrections-library 15 . In GenTraversableLike.scala https : github.com scala scala blob v2.11.2 src library scala collection GenTraversableLike.scala L1 you can see an example of a directive which causes use-case documentation to be generated : .. . .. . @usecase def flatMap B f : A TraversableOnce B : Coll B .. . .. . .. . Similar questions .. . .. . Why does the scaladoc say HashMap.toArray returns Array A instead of Array A B https : stackoverflow.com questions 17277985 why-does-the-scaladoc-say-hashmap-toarray-returns-arraya-instead-of-arraya-b .. . The List : : method and covariance .. . why do they hide the real signature https : stackoverflow.com questions 26131524 the-list-method-and-covariance .. . scaladoc for map on Map .. . is the documentation wrong or am I missing something https : stackoverflow.com questions 3811556 scaladoc-for-map-on-map .. . What s going on here with scala.collection.immutable.Stack.+ : prepend .. . https : stackoverflow.com questions 7802279 whats-going-on-here-with-scala-collection-immutable-stack-prepend .. . Why do some method descriptions in Scaladoc start with use-case https : stackoverflow.com questions 4106817 scaladoc-use-case .. . How to explain Map.map result https : stackoverflow.com questions 26089746 how-to-explain-map-map-result",
"Question : null .. . Answer : So I have an apparently simple question but I can t find the answer for it . If I want to do the Scaladoc documentation of let s say a private class...how can I do it Scaladoc HAD an option long ago --access but it s no longer supported",
"Question : I m curious how it s possible to document the root package displayed as the first page in a scala-doc http : docs.scala-lang.org compilation . Can one create a package object referring to the root-package somehow or is are there any configuration options The descriptions on the matter are somewhat vague . Comment : Are there really on one who has insight in this Darn scaladoc needs to up their documentation - .. . Answer : There appears to be an option for scaladoc called -doc-root-content which was added in 2.9.2 . You can see this in the ant build.xml for scala 2.9.2 https : github.com scala scala blob v2.9.2 build.xml L1524 and also in the compiler source code https : github.com scala scala blob v2.9.2 src compiler scala tools nsc doc Settings.scala L84 . It s not present in 2.9.1 it was added by this commit https : github.com scala scala commit 90b0f1b98a5e747bed19b4389bf46ba16fdf734d . Comment : Nicely spotted It s pretty well hidden to be honest. . Comment : It s not in the scaladoc specific -help section in 2.9.2 is in the section for general compile options which is a bug . Looks like it s been fixed in master and 2.10.0 release candidates .",
"Question : I am currently writing the documentation of an API written in Scala . I would like to include several diagrams to make the code more understandable . I am wondering where to put resources such as diagrams in order that they can be automatically imported by an invocation of scaladoc and how to refer to these resources in the documentation of the code . For example let s assume that I use sbt . My code is located in the src main scala directory . Here is an example of a scala package object for package foo : .. . .. . Where should diagram-foo.svg be located in my project in order to be visible to scaladoc Subsequently what is the correct value of path to in the img tag .. . Answer : WARNING It may be a hack as I know very little about scaladoc . Since img src . . path to diagram-foo.svg is just a regular HTML you just need to copy necessary assets to the doc target path so the img resolves . You can use the following copyDocAssetsTask custom task that with doc in Compile and src main doc-resources directory gives you what you want . The point is to copy images to the directory where the documentation is generated i.e . target in Compile doc .value . build.sbt : .. . .. . Obviously the directory where you place the images is arbitrary and when you decide otherwise just update the custom task accordingly . Comment : This works even though not built-in with scaladoc . Thank you Comment : Great We re both learning sbt Please accept the answer when time permits . Thanks",
"Question : I m documenting a Scala class with overloaded methods https : en.wikipedia.org wiki Function overloading . How can I distinguish them when referring to them in scaladoc comments For example if I have .. . .. . and run sbt doc I get .. . .. . Doc.scala : 1 : warning : The link target Doc.foo is ambiguous . Several possibly overloaded members fit the target : .. . .. . method foo A B : A x : A : B in object Doc chosen .. . method foo A : Nothing in object Doc .. . .. . Using foo A B : A etc . to the link doesn t work . Comment : Would using Doc.foo work I know that in C when there s an ambiguous reference in documentation you have to either use when you one the method without parameters or spell out the argument types e.g . foo string . Maybe it s similar here.. . Comment : @Trustme-I maDoctor That doesn t work complains with : warning : Could not find any member to link for Doc.foo . .. . Answer : The following seems do the trick in Scala 2.10 . And here is some hint scaladoc gives me : Comment : I find it abominable that ScalDoc can t resolve names via imports . I refuse to use fully qualified names in documentation comments . Comment : Apparently the hint is displayed only if I use scaladoc directly . I used sbt which didn t show it . Comment : @Randall Schulz This should be fixed according to this issue : issues.scala-lang.org browse SI-3695 https : issues.scala-lang.org browse SI-3695 Comment : Alas this has not consistently worked for me with complex type signatures . But with simpler ones it does . I have found no solution for more complex signatures . Comment : This answer was not helpful to me . I m trying to disambiguate apply methods that have the same type args but different argument signatures . And I need it to work with Intellij IDEA Quick Documentation Ctrl-Q for viewing scaladoc of a method .",
"Question : I m documenting a Scala class with overloaded methods https : en.wikipedia.org wiki Function overloading . How can I distinguish them when referring to them in scaladoc comments For example if I have .. . .. . and run sbt doc I get .. . .. . Doc.scala : 1 : warning : The link target Doc.foo is ambiguous . Several possibly overloaded members fit the target : .. . .. . method foo A B : A x : A : B in object Doc chosen .. . method foo A : Nothing in object Doc .. . .. . Using foo A B : A etc . to the link doesn t work . Comment : Would using Doc.foo work I know that in C when there s an ambiguous reference in documentation you have to either use when you one the method without parameters or spell out the argument types e.g . foo string . Maybe it s similar here.. . Comment : @Trustme-I maDoctor That doesn t work complains with : warning : Could not find any member to link for Doc.foo . .. . Answer : I m still surprised at how difficult it is to get this working and the lack of documentation for scaladoc itself . I decided to search the scala code base itself in hope of some useful examples . The best ones that I found were in https : github.com scala scala blob 2.12.x test scaladoc resources links.scala . Hopefully this is useful for someone else who comes across this .",
"Question : Is it possible to generate diagrams with Scaladoc and SBT I tried to add this line in my build.sbt : scalacOptions in Compile doc : Seq -diagrams -diagrams-debug .. . .. . But I receive : Diagram generation running time breakdown : .. . .. . How can I get more logs about the Broken images Thanks . EDIT : .. . .. . The command last shows me : Comment : Does last show more Comment : I edited my main post Comment : This answer http : stackoverflow.com a 13435475 3165552 describes that Graphviz http : www.graphviz.org must be installed in order to make this work properly although the provided information doesn t contain any hint on this behalf maybe this is already the cause of the problem Comment : Graphviz is installed on my computer and I can run dot from the command-line Comment : I guess you can not easily get more logs . Digging into scala.tools.nsc.doc.html.page.diagram.DotDiagramGenerator https : github.com scala scala blob v2.10.4 src compiler scala tools nsc doc html page diagram DotDiagramGenerator.scala and DiagramStats from the same package : from line 388 of DotDiagramGenerator and the generated diagrams one can gain the following insight : dot seems to sometimes forget to include the little c s o s and t s to the left of a template name in the diagrams resulting in an increased broken image count . .. . Answer : Is it possible to generate diagrams with Scaladoc and SBT Since this is one of more highly voted questions tagged sbt I ll try to answer it . I tried using Scala 2.11.8 and 2.12.0-M4 but neither worked for me . There are some problems with Scaladoc diagram generation itself not sbt . See for example SI-7950 : Running ScalaDoc with -diagram fails on OS X 10.9 Mavericks https : issues.scala-lang.org browse SI-7950 . I also tried running scaladoc directly and I still get the similar error messages . One theory I ve heard is that scaladoc is too sensitive to dot warning messages . So there s been a hack of wrapping dot with the following : .. . .. . Using the above script did not work for me . So likely it s not possible at this time .",
"Question : null .. . Answer : What is the correct way to create link-to a method in the same class Scaladoc documentation http : docs.scala-lang.org style scaladoc.html doesn t have examples of this . Consider a class such as : .. . .. . In IntelliJ IDEA s quick documentation pop-up all these show up as red : .. . .. . current .. . current .. . AccountController.current .. . AccountController current .. . controllers.AccountController.current .. . .. . enter image description here http : i.stack.imgur.com Eaz97.png .. . .. . This does show up as blue : .. . .. . So I suppose this is correct but is there there no simpler yet correct way Comment : While the Scaladoc HTML rendering gets a beautification I m afraid the tool itself is still in a rather unsatisfying state . This issue https : issues.scala-lang.org browse SI-3695 suggests that still only fully qualified names are supported.. .",
"Question : I hit a MissingRequirementError when I try to invoke scaladoc from within an sbt task . Using any version of sbt 0.13.x start with this build.sbt : .. . .. . Then run sbt scaladoc and behold during makeUniverse : .. . .. . What is wrong here I ve already tried fork : true and different combinations of sbt scala versions to no avail . Comment : What are you doing it Is this a kind of exercise There s sbt doc already . Comment : I need programmatic access to the ScalaDoc objects so that I can generate alternate documentation . Comment : The solution here http : stackoverflow.com questions 22668012 test-in-eclipse-works-but-sbt-throws-missingrequirementerror-object-scala-runti seems to work but there should be a correct way to locate the scala-library dependency . .. . Answer : It seems you need to provide scala-library and indeed any other dependencies directly to the DocFactory .",
"Question : Ruby has a program called ri where you can type in ri Array and get its manpage . Is there something like that for scaladoc .. . Answer : vim-scaladoc https : github.com mdreves vim-scaladoc was released in late 2012 ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
scala
|
UNK_RELATION
|
exi@xml@79
|
exi -- exi efficient xml interchange is a w3c recommendation for more compact @placeholder data .
|
{
"confidence": [
60.767677307128906,
59.31534194946289,
51.69255828857422,
50.62507247924805,
48.1572265625,
48.05744552612305,
48.05744552612305,
46.64948272705078,
46.547142028808594,
45.91702651977539,
45.828983306884766,
45.33537292480469,
44.872344970703125,
44.69198226928711,
44.53741455078125,
44.52667999267578,
43.325645446777344,
43.15502166748047,
42.763946533203125,
42.549339294433594,
41.846519470214844,
41.66045379638672,
41.311607360839844,
41.311607360839844,
40.801719665527344,
40.46320343017578,
40.380516052246094,
40.274986267089844,
40.274986267089844,
40.274986267089844,
40.274986267089844,
40.274986267089844,
40.20811462402344,
40.08294677734375,
39.28038024902344,
38.82264709472656,
38.51082229614258,
38.51082229614258,
38.213321685791016,
37.681880950927734,
37.5838623046875,
37.21863555908203,
37.05848693847656,
37.02647018432617,
37.02647018432617,
37.02647018432617,
37.02647018432617,
37.02647018432617,
37.02647018432617,
36.90354919433594,
36.90354919433594,
36.90354919433594,
36.90354919433594,
36.90354919433594,
36.90354919433594,
36.90354919433594,
36.90354919433594,
36.90354919433594,
36.90354919433594,
36.309356689453125,
35.618446350097656,
35.451210021972656,
35.451210021972656,
35.451210021972656,
35.451210021972656,
35.120182037353516,
34.858123779296875,
34.126609802246094,
33.64635467529297,
33.64635467529297,
33.5740966796875,
33.5740966796875,
33.574012756347656,
33.574012756347656,
33.506343841552734,
32.36224365234375,
32.36224365234375,
32.36224365234375,
32.36224365234375,
32.36224365234375,
32.36224365234375,
32.19401931762695,
30.91693878173828,
30.9099063873291,
30.9099063873291,
30.9099063873291,
29.582868576049805,
29.17869758605957,
29.039541244506836,
28.130531311035156,
27.68163299560547,
26.47006607055664,
26.469865798950195,
26.029563903808594,
25.017728805541992,
24.39950942993164,
24.313846588134766,
24.053335189819336,
23.587141036987305,
22.587305068969727
],
"content": [
"W3 s EXI efficient XML interchange is going to be standardized .",
"I found EXI efficient xml interchange better as compared to others .",
"For those who don t know EXI : http : www.w3.org XML EXI",
"Now i am looking for someone to clear my confusing regarding EXI - efficient xml interchange .",
"The most efficient way to perform EXI is StAX .",
"One more thing regarding EXI how can EXI claim to be fast at parsing a decoded XML file",
"One more thing regarding EXI how can EXI claim to be fast at parsing a decoded XML file",
"Let s see EXI as a better GZIP for XML .",
"I am using EXIficient http : exificient.sourceforge.net to convert XML data to EXI and back to XML .",
"The W3C completed a pretty thorough analysis of XML format implementations and found the EXI implementation Efficient XML consistently achieved the best compactness and was one of the fastest .",
"There are not many EXI parsers available .",
"Actually EXI is just an alternative way of representing XML data where the plain text XML is the old version .",
"The official EXI site http : www.w3.org XML EXI doesn t list any other .Net implementation .",
"The reason EXI can be smaller and faster to parse than XML is because EXI can be streamed directly to from memory via the standard XML APIs without ever producing the data in an intermediate XML format .",
"I am using EXIficient https : sourceforge.net projects exificient to convert XML data to EXI .",
"EXI is not compression per-se -- it is a more efficient XML format that can be streamed directly to from your application .",
"EXI is not a widely adopted standard XML is a poor encapsulator for numeric data and it s a pain to implement it and there are no decent tools for it .",
"There is this paragraph related to my question : .. . .. . 4.2 Existing XML Processing APIs .. . .. . As EXI is an encoding of the XML Infoset an EXI implementation can support any of the commonly-used XML APIs for XML processing so EXI has no immediate impact on existing XML APIs .",
"I m dealing with EXI right now .",
"Encode an XML document into EXI by calling encode InputSource is method .",
"In the future more efficiency might be achievable if the higher layers could directly use these data as typed values appearing in the EXI document .",
".. . from : http : www.w3.org TR exi-impacts .. . .. . I understand it as following : Using EXI with existing APIs",
"EXI is likely your best bet .",
"This is a fundamental difference between compression and EXI .",
"I m looking for a Java sample program for encoding decoding EXI Efficient XML Interchange http : en.wikipedia.org wiki Efficient XML Interchange streams using either EXIficient http : exificient.sourceforge.net or OpenEXI http : openexi.sourceforge.net .",
"So instead of serializing your data as XML via a standard API compressing the XML sending the compressed XML decompressing the XML on the other end then parsing it through one of the XML APIs .. . you can serialize your data directly as EXI via a standard XML API send the EXI then parse the EXI directly through one of the XML APIs on the other side .",
"The doubt that I have is that I am generating a XML string with XMLSerializer from Java I want to encode it to EXI and send it to a server thus is it possible doing the encode XML-EXI without using files",
"Use EXIDecoder in org.openexi.fujitsu.proc to decode EXI into events .",
"But it is true that new API might arise because of EXI .",
"I d personally rather not use EXI at all .",
"Yeah I also don t understand the point of EXI .",
"There s no good universal tool for processing EXI .",
"In the tests I ve seen comparing EXI with Protocol Buffers EXI was at least 2-4 times smaller .",
"All the EXI testing and performance measurements the W3C has conducted use the standard SAX APIs built into the JDK .",
"They also found it consistently achieved better compactness than GZIP compression and even packed binary formats like ASN.1 PER see W3C EXI Evaluation http : www.w3.org TR exi-evaluation .",
"Compression is unified with the grammar system in EXI format .",
"EXI is very difficult to hand code there are no decent processors for it and worst of all all the processors I have found that actually work well with it just transform it from EXI - XML - which is totally useless .",
"I cannot find out how to create an EXI decoder using C .NET which accepts a MemoryStream containing EXI valid code and simply outputs another MemoryStream containing XML code .",
"The W3C EXI tests mentioned above used Efficient XML http : www.agiledelta.com which is much faster than EXIficient sometimes 10 times faster parsing and 20 times faster serializing .",
"http : stackoverflow.com questions 1082285 best-compression-algorithm-for-xml .. . .. . EXI is great if what you want is archived data that will be regularly accessed .",
"Because EXI and XML are compatible at the event level it is fairly straightforward to write out XML text given an event sequence .",
"I have heard alot about Efficient XML EXI and was wondering if there was a .NET implementation so that it can be called from within code.. .",
"The decoder API generally give you a sequence of events such as SAX events when you let decoders process EXI streams however decoders are not internally converting EXI back into XML text to feed into another parser .",
"However using an existing XML API also requires that all names and text appearing in the EXI document be converted into strings .",
"EXI parsing was on average 14.5 times faster than XML in these tests without any special APIs .",
"As I see it EXI removes the two major downsides of XML - size and processing speed - leaving only the good parts .",
"I would like to replace this with EXI while retaining human-readable XML in other areas .",
"@ .. . .. . Now this is just with a schema and the EXI spec specifically says that you can still encode XML that does NOT conform with a schema .",
"I ended up refactoring xmlapi xml resolver the open exi library and xerces to not use any of the banned javax.xml packages",
"Calling processHeader returns a Scanner and the Scanner lets you navigate through EXI .",
"You don t need any new APIs to get the performance gains of EXI .",
"If and when that happens you will get even better performance from EXI .",
"EXI does not deprecate string representation only makes it a bit different .",
"The problem with EXI is that it needs to be abstracted from your application code .",
"In order to replace SOAP communication with EXI I either need to : .. . .. . 1 .",
"Here s the spec : .. . .. . https : www.w3.org TR exi .. . .. . Have fun reading that",
"For my field of work EXI is just a bad design decision .",
"Another doubt is can I just send the EXI as string",
"Are there any benchmarks for processing EXI streams using EXIificient for Java and EXIificient for Javascript",
"It d be easy to create a bit of code that converts an XML document transferred through EXI back to a plaintext XML document considering the exact same data is contained therein .",
"This because EXI is just different encoding of standard XML Infoset so for application developer things may look exactly like normal XML processing .",
"OR just let me know if there is anything better then EXI i should look for .",
"ALSO is there any good C++ open-source implementation for EXI format",
"OR just let me know if there is anything better then EXI i should look for .",
"Nagasena has both .Net written in C and Java implementation of the EXI specification .",
"Replace my existing Axis SAAJ SOAP client supplier implementations with my own SOAP-ish protocol on top of EXI .. . .. . The comparison between JSON and EXI is fair but the use-cases for the two are different .",
"I don t know much about exi but I ve seen that error before and it usually has to do with the encoding of the xml not conforming to UTF-8 .",
"Sample Code : .. . .. . Firstly it converted xml file to EXI then back to XML when it generate XML from previously generated EXI s file it loses some information about Namespace .",
"EXI can bring some of the benefits of JSON into this world but it needs to be incorporated into existing XML APIs before widespread adoption can take place .",
"I will parse XML code later with custom methods I m using EXI only to achieve best compression performances and low memory-footprint .",
"For instance if a higher layer needs typed data going through its string form can produce a performance penalty so an extended API that supports typed data directly could improve performance when used with EXI .",
"I m writing a node.js application in which I intend to store structured-data in many 1000+ exi files that I want to parse and process to produce a flattened data structure duplicates removed ordered items etc .",
"I am in need of something for use with C++ which will parse EXI formatted messages .",
"Since we are doing simple EXI stuff I think EXIP is stable enough for now .",
"By the way EXI will become the prefered way to content-encore any XML over HTTP IMHO because of SOAP bloat - As soon as EXI settle on the browsers it could also benefit any enduser : faster transfert faster analysis best experience ever for same machine",
"What do you guys think what is going to happen to these APIs with introduction of EXI",
"For the latest tests see http : www.w3.org TR exi-evaluation processing-results .",
"Only that in order to get EXI you have to get a streamwriter that writes to it or a streamreader that reads it .",
"I am +0 for EXI but what is frustrating are all highly-hyped claims of performance without actual external objective verification .",
"Wait until EXI has been incorporated into existing SOAP stacks Axis SAAJ or .. . 2 .",
"How would you think the following would be encoded in EXI if both values are specified",
"John After all my work related to binary xml EXI being major part of it i want to publish my work in some famous journals .",
"The company that created a predecessor of the Efficient XML Interchange format AgileDelta offers an Efficient XML library http : www.agiledelta.com product efx.html which includes .Net version .",
"EXI decoder does all the convoluted process integrated decompression and reverse-tokenization within itself of which the output are the events such as SAX .",
"Nagasena http : openexi.sourceforge.net has both .Net written in C and Java implementations of the EXI specification .",
"Open source Java implementations I could find are : .. . .. . OpenEXI http : openexi.sourceforge.net .. . EXI-ficient http : exificient.sourceforge.net",
"Once you get into the guts of EXI you realize there is a bunch of needless delimiters in the binary stream which are absolutely and completely unnecessary with a schema .",
"I tried to encode nd decode HTML file with Efficient XML .",
"But who said DOM is efficient and well designed for modern languages - .. . .. . If you are handling big XML files I got some of them that are few hundreds of MB you definitively knows why you need EXI : saving tons of space saving huge amount of memory and processing time .",
"just to confirm my understanding you are saying that there is another decoding parser by the EXI API s that just parse the decoded version just like SAX events",
"The code below is an attempt to simplify the setup required to perform EXI compression and decompression using EXIficient http : exificient.sourceforge.net .. . .. . The below test fails with ERROR : Invalid byte 1 of 1-byte UTF-8 sequence .",
"It is a standard to store XML data optimized for processing and storage is bundled with XML schema making the data strongly typed and strongly structured .",
"There are some unit tests https : exificient.svn.sourceforge.net svnroot exificient trunk src test com siemens ct exi api stream StAXCoderTestCase.java in EXIfiecient code base that you can use as example .",
"There is no standard for meta-data for JSON while there is XML-Schema for XML .",
"As mentioned by Marc Protocol Buffers and Thrift are binary-data formats but they are not XML formats designed to transport XML data .",
"This is just a more efficient way to EXCHANGE the XML allowing all of the flexibility of the current format without the over-the-wire bloat .",
"This XML data needs to be compressed into the smallest possible format .",
"With XML there are several standards bodies that define schemas for data exchange for specific industries .",
"Binary XML can be efficient and there s some implementations of it .",
"Having that said if the API supports SAX then you can use JAXP TransformerHandler to convert SAX events into XML with or without XML declaration at the front ."
]
}
|
{
"confidence": [
83.00418090820312,
77.91626739501953,
76.49754333496094,
75.30130767822266,
73.6272964477539,
72.5885009765625,
68.24341583251953,
65.47645568847656,
64.34198760986328,
58.751983642578125,
58.51853942871094,
56.83606719970703,
55.76663589477539,
55.627723693847656,
55.021636962890625,
53.488277435302734,
52.8664436340332,
51.48835754394531,
51.15480041503906,
47.855560302734375
],
"content": [
"Question : W3 s EXI efficient XML interchange is going to be standardized . It claims to be the last binary standard . It is a standard to store XML data optimized for processing and storage is bundled with XML schema making the data strongly typed and strongly structured . Well there are a lot of claimed advantages . I was impressed most by the processing and memory-efficiency measurements . I am asking myself what is going to happen to all the established XML APIs There is this paragraph related to my question : .. . .. . 4.2 Existing XML Processing APIs .. . .. . As EXI is an encoding of the XML Infoset an EXI implementation can support any of the commonly-used XML APIs for XML processing so EXI has no immediate impact on existing XML APIs . However using an existing XML API also requires that all names and text appearing in the EXI document be converted into strings . In the future more efficiency might be achievable if the higher layers could directly use these data as typed values appearing in the EXI document . For instance if a higher layer needs typed data going through its string form can produce a performance penalty so an extended API that supports typed data directly could improve performance when used with EXI . .. . from : http : www.w3.org TR exi-impacts .. . .. . I understand it as following : Using EXI with existing APIs No performance gain Unless you rewrite them all .. . .. . Let s take the Java ecosystem as an example : .. . .. . We have plenty of XML APIs in latest JDK 6 With each major JDK release more and more of them were added . As far as I can judge most if not all of them are using either in-memory DOM trees or serialized textual representation to transform process validate .. . XML data . What do you guys think what is going to happen to these APIs with introduction of EXI Thank you all for your opinions . For those who don t know EXI : http : www.w3.org XML EXI Comment : This isn t really the place for opinion questions sorry . .. . Answer : You don t need any new APIs to get the performance gains of EXI . All the EXI testing and performance measurements the W3C has conducted use the standard SAX APIs built into the JDK . For the latest tests see http : www.w3.org TR exi-evaluation processing-results . EXI parsing was on average 14.5 times faster than XML in these tests without any special APIs . One day if people think its worthwhile we may see some typed XML APIs emerge . If and when that happens you will get even better performance from EXI . However this is not required to get excellent performance like that reported by the W3C .",
"Question : My requirement is to compress xml file into a binary format transmit it and decompress it lightening fast before i start parsing it . There are quite a few binary xml protocols and tools available . I found EXI efficient xml interchange better as compared to others . Tried its open-source version Exificient and found it good . I heard about google protocol-buffers and facebook s thrift can any one tell me if these two can do the job i am looking for OR just let me know if there is anything better then EXI i should look for . Also There is a good XML parser VTD-XML haven t tried myself just googled about it and read some articles that accomplishes better parsing performances as compared to DOM SAX and Stax . I want best of both worlds best compression + best parsing performance any suggestions One more thing regarding EXI how can EXI claim to be fast at parsing a decoded XML file Because it is being parsed by DOM SAX or STax I would have believed this to be true if there was another binary parser for reading the decoded version . Correct me if i am wrong . ALSO is there any good C++ open-source implementation for EXI format A version in java is available by EXIficient but i am not able to spot a C++ open-source implementation There is one by agile delta but that s commercial . .. . Answer : Nadeem .. . .. . These are very good questions . You might be new to the domain but the same questions are frequently asked by XML veterans . I ll try to address each of them . I heard about google protocol-buffers and facebook s thrift can any one tell me if these two can do the job i am looking for As mentioned by Marc Protocol Buffers and Thrift are binary-data formats but they are not XML formats designed to transport XML data . E.g . they have no support for XML concepts like namespaces attributes etc . so mapping between XML and these binary formats would require a fair bit of work on your part . OR just let me know if there is anything better then EXI i should look for . EXI is likely your best bet . The W3C completed a pretty thorough analysis of XML format implementations and found the EXI implementation Efficient XML consistently achieved the best compactness and was one of the fastest . They also found it consistently achieved better compactness than GZIP compression and even packed binary formats like ASN.1 PER see W3C EXI Evaluation http : www.w3.org TR exi-evaluation . None of the other XML formats were able to do that . In the tests I ve seen comparing EXI with Protocol Buffers EXI was at least 2-4 times smaller . I want best of both worlds best compression + best parsing performance any suggestions If it is an option you might want to consider the commercial products . The W3C EXI tests mentioned above used Efficient XML http : www.agiledelta.com which is much faster than EXIficient sometimes 10 times faster parsing and 20 times faster serializing . Your mileage may vary so you should test it yourself if it is an option . One more thing regarding EXI how can EXI claim to be fast at parsing a decoded XML file The reason EXI can be smaller and faster to parse than XML is because EXI can be streamed directly to from memory via the standard XML APIs without ever producing the data in an intermediate XML format . So instead of serializing your data as XML via a standard API compressing the XML sending the compressed XML decompressing the XML on the other end then parsing it through one of the XML APIs .. . you can serialize your data directly as EXI via a standard XML API send the EXI then parse the EXI directly through one of the XML APIs on the other side . This is a fundamental difference between compression and EXI . EXI is not compression per-se -- it is a more efficient XML format that can be streamed directly to from your application . Hope this helps Comment : BTW : The Efficient XML FAQ http : www.agiledelta.com efx-faq.pdf might also be helpful to you . Comment : John Thanks a lot for your detailed response . Really appreciate it . Comment : John After all my work related to binary xml EXI being major part of it i want to publish my work in some famous journals . Since i haven t invented anything new can you please point me to most specific research journals related to XML where i can send my article for publication . Your response would be highly appreciated .",
"Question : W3 s EXI efficient XML interchange is going to be standardized . It claims to be the last binary standard . It is a standard to store XML data optimized for processing and storage is bundled with XML schema making the data strongly typed and strongly structured . Well there are a lot of claimed advantages . I was impressed most by the processing and memory-efficiency measurements . I am asking myself what is going to happen to all the established XML APIs There is this paragraph related to my question : .. . .. . 4.2 Existing XML Processing APIs .. . .. . As EXI is an encoding of the XML Infoset an EXI implementation can support any of the commonly-used XML APIs for XML processing so EXI has no immediate impact on existing XML APIs . However using an existing XML API also requires that all names and text appearing in the EXI document be converted into strings . In the future more efficiency might be achievable if the higher layers could directly use these data as typed values appearing in the EXI document . For instance if a higher layer needs typed data going through its string form can produce a performance penalty so an extended API that supports typed data directly could improve performance when used with EXI . .. . from : http : www.w3.org TR exi-impacts .. . .. . I understand it as following : Using EXI with existing APIs No performance gain Unless you rewrite them all .. . .. . Let s take the Java ecosystem as an example : .. . .. . We have plenty of XML APIs in latest JDK 6 With each major JDK release more and more of them were added . As far as I can judge most if not all of them are using either in-memory DOM trees or serialized textual representation to transform process validate .. . XML data . What do you guys think what is going to happen to these APIs with introduction of EXI Thank you all for your opinions . For those who don t know EXI : http : www.w3.org XML EXI Comment : This isn t really the place for opinion questions sorry . .. . Answer : Let s see EXI as a better GZIP for XML . FYI it has no impact on the APIs as you can still used all of them DOM SAX StAX JAXB .. . . Only that in order to get EXI you have to get a streamwriter that writes to it or a streamreader that reads it . The most efficient way to perform EXI is StAX . But it is true that new API might arise because of EXI . But who said DOM is efficient and well designed for modern languages - .. . .. . If you are handling big XML files I got some of them that are few hundreds of MB you definitively knows why you need EXI : saving tons of space saving huge amount of memory and processing time . This is nothing different than HTTP Content-Encoding purpose : you are not required to use it simply that if both parties understand it it is a much efficient way to perform the exchange . By the way EXI will become the prefered way to content-encore any XML over HTTP IMHO because of SOAP bloat - As soon as EXI settle on the browsers it could also benefit any enduser : faster transfert faster analysis best experience ever for same machine EXI does not deprecate string representation only makes it a bit different . Oh and by the way when doing UTF think default UTF8 for instance you are already using a compression encoding for the 32bits unicode code point .. . this means that on the wire data is not the same as real data already -",
"Question : W3 s EXI efficient XML interchange is going to be standardized . It claims to be the last binary standard . It is a standard to store XML data optimized for processing and storage is bundled with XML schema making the data strongly typed and strongly structured . Well there are a lot of claimed advantages . I was impressed most by the processing and memory-efficiency measurements . I am asking myself what is going to happen to all the established XML APIs There is this paragraph related to my question : .. . .. . 4.2 Existing XML Processing APIs .. . .. . As EXI is an encoding of the XML Infoset an EXI implementation can support any of the commonly-used XML APIs for XML processing so EXI has no immediate impact on existing XML APIs . However using an existing XML API also requires that all names and text appearing in the EXI document be converted into strings . In the future more efficiency might be achievable if the higher layers could directly use these data as typed values appearing in the EXI document . For instance if a higher layer needs typed data going through its string form can produce a performance penalty so an extended API that supports typed data directly could improve performance when used with EXI . .. . from : http : www.w3.org TR exi-impacts .. . .. . I understand it as following : Using EXI with existing APIs No performance gain Unless you rewrite them all .. . .. . Let s take the Java ecosystem as an example : .. . .. . We have plenty of XML APIs in latest JDK 6 With each major JDK release more and more of them were added . As far as I can judge most if not all of them are using either in-memory DOM trees or serialized textual representation to transform process validate .. . XML data . What do you guys think what is going to happen to these APIs with introduction of EXI Thank you all for your opinions . For those who don t know EXI : http : www.w3.org XML EXI Comment : This isn t really the place for opinion questions sorry . .. . Answer : I d personally rather not use EXI at all . It seems like it s taking all the clunky bad things about XML and cramming them into a binary format which basically removes the saving grace of XML plain text format . It seems like the general trend of the industry is moving towards more lightweight data-transfer models HTTP REST for example and moving away from heavy-weight models like SOAP . Personally I m not super excited about the idea of binary XML . Anything that claims to be the last binary standard is probably wrong . Comment : Yeah I also don t understand the point of EXI . The reason why XML is used even though it is bloated is because it is human-readable . If you take that away then XML has nothing over any other standards . Comment : Not going to downvote but also not going to agree . This is just a more efficient way to EXCHANGE the XML allowing all of the flexibility of the current format without the over-the-wire bloat . Comment : Actually EXI is just an alternative way of representing XML data where the plain text XML is the old version . It d be easy to create a bit of code that converts an XML document transferred through EXI back to a plaintext XML document considering the exact same data is contained therein . As I see it EXI removes the two major downsides of XML - size and processing speed - leaving only the good parts . Comment : I am +0 for EXI but what is frustrating are all highly-hyped claims of performance without actual external objective verification . Few tests that I have seen have tended use sub-optimal libs or APIs for textual XML or just lack enough detail to know what the heck they try to test .",
"Question : W3 s EXI efficient XML interchange is going to be standardized . It claims to be the last binary standard . It is a standard to store XML data optimized for processing and storage is bundled with XML schema making the data strongly typed and strongly structured . Well there are a lot of claimed advantages . I was impressed most by the processing and memory-efficiency measurements . I am asking myself what is going to happen to all the established XML APIs There is this paragraph related to my question : .. . .. . 4.2 Existing XML Processing APIs .. . .. . As EXI is an encoding of the XML Infoset an EXI implementation can support any of the commonly-used XML APIs for XML processing so EXI has no immediate impact on existing XML APIs . However using an existing XML API also requires that all names and text appearing in the EXI document be converted into strings . In the future more efficiency might be achievable if the higher layers could directly use these data as typed values appearing in the EXI document . For instance if a higher layer needs typed data going through its string form can produce a performance penalty so an extended API that supports typed data directly could improve performance when used with EXI . .. . from : http : www.w3.org TR exi-impacts .. . .. . I understand it as following : Using EXI with existing APIs No performance gain Unless you rewrite them all .. . .. . Let s take the Java ecosystem as an example : .. . .. . We have plenty of XML APIs in latest JDK 6 With each major JDK release more and more of them were added . As far as I can judge most if not all of them are using either in-memory DOM trees or serialized textual representation to transform process validate .. . XML data . What do you guys think what is going to happen to these APIs with introduction of EXI Thank you all for your opinions . For those who don t know EXI : http : www.w3.org XML EXI Comment : This isn t really the place for opinion questions sorry . .. . Answer : The problem with EXI is that it needs to be abstracted from your application code . I work on a middleware product where the human-readable nature of XML is key in certain aspects logging fault finding etc . but can be sacrificed in other areas communication between internal applications to limit I O load . We currently use SOAP to for communication between or own client middleware and supplier web-applications . I would like to replace this with EXI while retaining human-readable XML in other areas . In order to replace SOAP communication with EXI I either need to : .. . .. . 1 . Wait until EXI has been incorporated into existing SOAP stacks Axis SAAJ or .. . 2 . Replace my existing Axis SAAJ SOAP client supplier implementations with my own SOAP-ish protocol on top of EXI .. . .. . The comparison between JSON and EXI is fair but the use-cases for the two are different . There is no standard for meta-data for JSON while there is XML-Schema for XML . With XML there are several standards bodies that define schemas for data exchange for specific industries . There are also a range of protocols standards that are built on top of XML such as SOAP XML-Signature XML-Encryption WS-Security SAML etc . This does not exist for JSON . Hence XML is a better option for B2B message exchange and other cases where you need to integrate with external systems using industry standards . EXI can bring some of the benefits of JSON into this world but it needs to be incorporated into existing XML APIs before widespread adoption can take place .",
"Question : I am exporting large databases into xml format . This XML data needs to be compressed into the smallest possible format . I have heard alot about Efficient XML EXI and was wondering if there was a .NET implementation so that it can be called from within code.. . Does anyone have an example of this as online resources seem to be a bit sparse.. . Comment : It seems you control both the code that compresses the XML and the code that decompresses it later . Wouldn t it be better if you compressed it by storing it in some non-XML format and then decompressed it by converting to XML Comment : I d go for something like JSON to save on those bytes . I doubt encoding the information will help much Comment : @PatrickMagee JSON will save only in tags quotes and end tags apart from not being part of XML standard . This is far from any binary format my answer have more info . .. . Answer : Such implementation does exist . The company that created a predecessor of the Efficient XML Interchange format AgileDelta offers an Efficient XML library http : www.agiledelta.com product efx.html which includes .Net version . Although they don t seem to publish the price . The official EXI site http : www.w3.org XML EXI doesn t list any other .Net implementation . Comment : Nagasena has both .Net written in C and Java implementation of the EXI specification .",
"Question : My requirement is to compress xml file into a binary format transmit it and decompress it lightening fast before i start parsing it . There are quite a few binary xml protocols and tools available . I found EXI efficient xml interchange better as compared to others . Tried its open-source version Exificient and found it good . I heard about google protocol-buffers and facebook s thrift can any one tell me if these two can do the job i am looking for OR just let me know if there is anything better then EXI i should look for . Also There is a good XML parser VTD-XML haven t tried myself just googled about it and read some articles that accomplishes better parsing performances as compared to DOM SAX and Stax . I want best of both worlds best compression + best parsing performance any suggestions One more thing regarding EXI how can EXI claim to be fast at parsing a decoded XML file Because it is being parsed by DOM SAX or STax I would have believed this to be true if there was another binary parser for reading the decoded version . Correct me if i am wrong . ALSO is there any good C++ open-source implementation for EXI format A version in java is available by EXIficient but i am not able to spot a C++ open-source implementation There is one by agile delta but that s commercial . .. . Answer : You mention protocol-buffers protobuf this is a binary format but has no direct relationship to XML . In partiular no member-names element names attribute names namespaces are encoded - it is just the data with numeric markers for identifiers . As such you cannot reconstruct arbitrary XML from a protobuf stream unless you already know how to map field 3 etc . However If you have an object-model that works with both XML and protobuf the transform is trivial deserialize with either - serialize with either . How well this works depends on the implementation for example it is trivial with protobuf-net and is actually how I do the codegen load the binary write as XML run the XML through an xslt layer to emit code . If you actually just want to transfer object data and XML is just a proposed implementation detail then I thoroughly recommend protobuf platform independent a wide range of implementations version-tolerant very small output and very fast processing at both read and write . Comment : Great that answers my questions about proto buffs and i believe thrift would be no different . Thanks alot for your answer . Comment : Now i am looking for someone to clear my confusing regarding EXI - efficient xml interchange .",
"Question : My requirement is to compress xml file into a binary format transmit it and decompress it lightening fast before i start parsing it . There are quite a few binary xml protocols and tools available . I found EXI efficient xml interchange better as compared to others . Tried its open-source version Exificient and found it good . I heard about google protocol-buffers and facebook s thrift can any one tell me if these two can do the job i am looking for OR just let me know if there is anything better then EXI i should look for . Also There is a good XML parser VTD-XML haven t tried myself just googled about it and read some articles that accomplishes better parsing performances as compared to DOM SAX and Stax . I want best of both worlds best compression + best parsing performance any suggestions One more thing regarding EXI how can EXI claim to be fast at parsing a decoded XML file Because it is being parsed by DOM SAX or STax I would have believed this to be true if there was another binary parser for reading the decoded version . Correct me if i am wrong . ALSO is there any good C++ open-source implementation for EXI format A version in java is available by EXIficient but i am not able to spot a C++ open-source implementation There is one by agile delta but that s commercial . .. . Answer : Compression is unified with the grammar system in EXI format . The decoder API generally give you a sequence of events such as SAX events when you let decoders process EXI streams however decoders are not internally converting EXI back into XML text to feed into another parser . Instead the decoder does all the convoluted decompression scanning process to yield an API event sequence such as SAX . Because EXI and XML are compatible at the event level it is fairly straightforward to write out XML text given an event sequence . Comment : just to confirm my understanding you are saying that there is another decoding parser by the EXI API s that just parse the decoded version just like SAX events Comment : There is no another decoding parser involved . EXI decoder does all the convoluted process integrated decompression and reverse-tokenization within itself of which the output are the events such as SAX . Comment : great - thanks for clarification",
"Question : W3 s EXI efficient XML interchange is going to be standardized . It claims to be the last binary standard . It is a standard to store XML data optimized for processing and storage is bundled with XML schema making the data strongly typed and strongly structured . Well there are a lot of claimed advantages . I was impressed most by the processing and memory-efficiency measurements . I am asking myself what is going to happen to all the established XML APIs There is this paragraph related to my question : .. . .. . 4.2 Existing XML Processing APIs .. . .. . As EXI is an encoding of the XML Infoset an EXI implementation can support any of the commonly-used XML APIs for XML processing so EXI has no immediate impact on existing XML APIs . However using an existing XML API also requires that all names and text appearing in the EXI document be converted into strings . In the future more efficiency might be achievable if the higher layers could directly use these data as typed values appearing in the EXI document . For instance if a higher layer needs typed data going through its string form can produce a performance penalty so an extended API that supports typed data directly could improve performance when used with EXI . .. . from : http : www.w3.org TR exi-impacts .. . .. . I understand it as following : Using EXI with existing APIs No performance gain Unless you rewrite them all .. . .. . Let s take the Java ecosystem as an example : .. . .. . We have plenty of XML APIs in latest JDK 6 With each major JDK release more and more of them were added . As far as I can judge most if not all of them are using either in-memory DOM trees or serialized textual representation to transform process validate .. . XML data . What do you guys think what is going to happen to these APIs with introduction of EXI Thank you all for your opinions . For those who don t know EXI : http : www.w3.org XML EXI Comment : This isn t really the place for opinion questions sorry . .. . Answer : I m dealing with EXI right now . There s no good universal tool for processing EXI . Once you get into the guts of EXI you realize there is a bunch of needless delimiters in the binary stream which are absolutely and completely unnecessary with a schema . Some of it is humorous . How would you think the following would be encoded in EXI if both values are specified Would you think it might be maximum 4 bits 1 bit to indicate if bool1 is defined and that the value of bool1 followed by another bit to indicate if bool2 is defined then the value of bool2 Good golly no Well let me tell you boys and girls This is how it s actually encoded .. . .. . A minimum of 4 bits MINIMUM in order not to define either . Now I m being a little unfair because I m including delimiters - delimiters which are entirely unnecessary . I understand how this works now . Here s the spec : .. . .. . https : www.w3.org TR exi .. . .. . Have fun reading that It was a GREAT DEAL OF FUN FOR ME @@ @ .. . .. . Now this is just with a schema and the EXI spec specifically says that you can still encode XML that does NOT conform with a schema . Which is hilarious because this is supposed to be for small little web devices . What do you do with unexpected data that you have no provisions for handling in an embedded device Why you just die of course . There s no recovery for something you don t expect . It s not like these things have a screen I m lucky if I can log into it through a serial-port . I have used 4 different XSD generators parsers XML generators . 3 of them choke on the Schema I have to use . Data marshaling for C and C++ remember this is for EMBEDDED system with very little memory and CPU power are awful . XSD describes basically a structure or class architecture and there isn t a single tool I can find that will just create the classes . The XSD example I gave above should create a structure with a 4 bools 2 bools are the values and 2 bools indicate if they even are defined . But does THAT exist Well heck no . I like XML for describing documents . Really I do - but here is what I hate about XML - for a widely adopted standard the available tools for it are absolutely terrible . Just reading a schema is a difficult thing to do when it s spread across multiple namespaces and documents . Rant rant huff huf .. . .. . The only reason we are using this is some standards committee insisted upon it . What it s done is created a monopoly for a small group of companies that already implemented this that s the only purpose . EXI is not a widely adopted standard XML is a poor encapsulator for numeric data and it s a pain to implement it and there are no decent tools for it . EXIP is at version 5.0 - anything that works that is open-source is in Java - at least I have that . For my field of work EXI is just a bad design decision . I ve worked on tons of communications protocols on various embedded systems . I worked on DOCSIS which all modern cable modems use - they use a simple and extensible Type Length Value protocol with provisions for dealing with unrecognized types - which is why the Length is always included . It s simple it takes literally days to implement the entire stack . EXI is very difficult to hand code there are no decent processors for it and worst of all all the processors I have found that actually work well with it just transform it from EXI - XML - which is totally useless . I have resorted to writing my own XSD parser which means I have to understand at least the entire XML specification for those parts of this design that use it - and that s extensive . What would have taken me 2 weeks to do with any reasonable spec took me 10 . Nobody in my world is going to use this unless it s shoved down their throat and they shouldn t it s a square peg for a round hole .",
"Question : null .. . Answer : Are there any benchmarks for processing EXI streams using EXIificient for Java and EXIificient for Javascript I m writing a node.js application in which I intend to store structured-data in many 1000+ exi files that I want to parse and process to produce a flattened data structure duplicates removed ordered items etc . Would the recommendation be to use node-java to parse and process the files in java and output the flattened data structure or to use pure javascript for loading parsing and processing the files Note : If I don t get an answer within a few days I ll look at doing my own benchmark based on my use-case and post the results here .",
"Question : I m looking for a Java sample program for encoding decoding EXI Efficient XML Interchange http : en.wikipedia.org wiki Efficient XML Interchange streams using either EXIficient http : exificient.sourceforge.net or OpenEXI http : openexi.sourceforge.net . Could someone help I can t seem to find a sample app . edit : Alternatively if someone could point me towards documentation that would allow me to use EXIficient or OpenEXI that would be helpful . I found the javadoc but I have no idea which classes to use . Or as @StaxMan points out is there a particular mention discussion of the appropriate top-level classes to use with one of the standard XML APIs Comment : Why the -1 I m trying to learn how to use these libraries and I can t find documentation other than Javadoc . It s a legitimate question . .. . Answer : There are some unit tests https : exificient.svn.sourceforge.net svnroot exificient trunk src test com siemens ct exi api stream StAXCoderTestCase.java in EXIfiecient code base that you can use as example . Comment : cool thanks that s the kind of stuff I was looking for . Comment : So EXIficient implements at least Stax javax.xml.stream interface right",
"Question : I m looking for a Java sample program for encoding decoding EXI Efficient XML Interchange http : en.wikipedia.org wiki Efficient XML Interchange streams using either EXIficient http : exificient.sourceforge.net or OpenEXI http : openexi.sourceforge.net . Could someone help I can t seem to find a sample app . edit : Alternatively if someone could point me towards documentation that would allow me to use EXIficient or OpenEXI that would be helpful . I found the javadoc but I have no idea which classes to use . Or as @StaxMan points out is there a particular mention discussion of the appropriate top-level classes to use with one of the standard XML APIs Comment : Why the -1 I m trying to learn how to use these libraries and I can t find documentation other than Javadoc . It s a legitimate question . .. . Answer : The way to use OpenEXI is summerized below where steps 2 and 3 are optional . 1 . Use EXISchemaFactory in org.openexi.fujitsu.scomp package to convert XML Schemas into EXISchema . 2 . Serialize EXISchema to a file . 3 . Load EXISchema from a file . 4 . Instantiate GrammarCache in org.openexi.fujitsu.proc.grammars package by specifying the EXISchema to the constructor . 5 . Instantiate Transmogrifier in org.openexi.fujitsu.sax package and set the GrammarCache using setEXISchema grammarCache method . 6 . Encode an XML document into EXI by calling encode InputSource is method . 7 . Use EXIDecoder in org.openexi.fujitsu.proc to decode EXI into events . After instantiating EXIDecoder set GrammarCache and InputStream to it . Calling processHeader returns a Scanner and the Scanner lets you navigate through EXI . Simply call nextEvent on Scanner to get the next event until it eventually returns null . If you do not use schemas you can use null when you instantiate GrammarCache above . Please let me know if you have any troubles . taki Comment : Does OpenEXI implement some of standard XML processing APIs Or is it only via a proprietary interface Comment : SAX API is coming very shortly . On the encoding side it already supports SAX . Transmogrifier s getSAXTransmogrifier method returns SAX handler . On the decoding side a foundation that would make SAX-based decoder layer performant has just been in-place this week and the final work of SAX-based deocoding API is just one step away due in one or two weeks depending on the availability of labor .",
"Question : I m looking for a Java sample program for encoding decoding EXI Efficient XML Interchange http : en.wikipedia.org wiki Efficient XML Interchange streams using either EXIficient http : exificient.sourceforge.net or OpenEXI http : openexi.sourceforge.net . Could someone help I can t seem to find a sample app . edit : Alternatively if someone could point me towards documentation that would allow me to use EXIficient or OpenEXI that would be helpful . I found the javadoc but I have no idea which classes to use . Or as @StaxMan points out is there a particular mention discussion of the appropriate top-level classes to use with one of the standard XML APIs Comment : Why the -1 I m trying to learn how to use these libraries and I can t find documentation other than Javadoc . It s a legitimate question . .. . Answer : Using Exificient http : exificient.sourceforge.net I ve managed to encode decode a sample XML as EXI using the snippet from their Help page http : exificient.sourceforge.net id help and their demo https : sourceforge.net p exificient code HEAD tree tags exificient-0.9.4 src sample java EXIficientDemo.java format raw I ve managed to get the following working using just the Maven dependency .. . .. . with the code .. . .. . use the Maven XSD http : maven.apache.org xsd maven-4.0.0.xsd and the Spring 4.1.6 POM from Maven central http : repo.maven.apache.org maven2 org springframework spring-core 4.1.6.RELEASE spring-core-4.1.6.RELEASE.pom as sample-data . Nb : that the output XML ought to be equivalent to the input but not necessarily equal since comments and whitespace are lost and the namespace aliases might be using the wrong term here are arbitrarily assigned .",
"Question : null .. . Answer : I cannot find out how to create an EXI decoder using C .NET which accepts a MemoryStream containing EXI valid code and simply outputs another MemoryStream containing XML code . I will parse XML code later with custom methods I m using EXI only to achieve best compression performances and low memory-footprint . Until now I have found some Java implementations as examples but none for C .NET counterpart hints of any kind are really appreciated .",
"Question : I am exporting large databases into xml format . This XML data needs to be compressed into the smallest possible format . I have heard alot about Efficient XML EXI and was wondering if there was a .NET implementation so that it can be called from within code.. . Does anyone have an example of this as online resources seem to be a bit sparse.. . Comment : It seems you control both the code that compresses the XML and the code that decompresses it later . Wouldn t it be better if you compressed it by storing it in some non-XML format and then decompressed it by converting to XML Comment : I d go for something like JSON to save on those bytes . I doubt encoding the information will help much Comment : @PatrickMagee JSON will save only in tags quotes and end tags apart from not being part of XML standard . This is far from any binary format my answer have more info . .. . Answer : Nagasena http : openexi.sourceforge.net has both .Net written in C and Java implementations of the EXI specification .",
"Question : I m looking for a Java sample program for encoding decoding EXI Efficient XML Interchange http : en.wikipedia.org wiki Efficient XML Interchange streams using either EXIficient http : exificient.sourceforge.net or OpenEXI http : openexi.sourceforge.net . Could someone help I can t seem to find a sample app . edit : Alternatively if someone could point me towards documentation that would allow me to use EXIficient or OpenEXI that would be helpful . I found the javadoc but I have no idea which classes to use . Or as @StaxMan points out is there a particular mention discussion of the appropriate top-level classes to use with one of the standard XML APIs Comment : Why the -1 I m trying to learn how to use these libraries and I can t find documentation other than Javadoc . It s a legitimate question . .. . Answer : I am not familiar with the two libraries mentioned but I assume that as any sane XML libraries they implement one of well-known Java XML processing APIs such as SAX Stax or DOM possibly with some extensions . This because EXI is just different encoding of standard XML Infoset so for application developer things may look exactly like normal XML processing . So you may just need to figure out API s they implement and find tutorials for using that API Comment : ....which is exactly the question I m trying to answer . Comment : Right it s just that you didn t explicitly ask which APIs they might implement which could be easier to answer although project web pages seemed surprisingly mum about this important piece of information . So I thought I ll mention it just in case . Comment : OK fair enough -- I ll edit my question .",
"Question : First of all I am using a client-server architecture android for the client and node.js for the server they are connected through Socket.io library so they are using websockets . The doubt that I have is that I am generating a XML string with XMLSerializer from Java I want to encode it to EXI and send it to a server thus is it possible doing the encode XML-EXI without using files directly from string to string because all examples I see assume that my XML is in a file and I want the output into another file . Another doubt is can I just send the EXI as string because I have already established the communication between the client and the server but they just send strings I don not if I can sent whole files in that case would be any diference on the amount of data sent Comment : Can t you use any InputStream or OutputStream descendant ByteArrayOutputStream comes to mind to keep everything in memory . Comment : I will try and post here the results Comment : care to share what you had to do to get openexi running in android I m getting : java.lang.RuntimeException : javax.xml.datatype.DatatypeConfigurationException : Provider org.apache.xerces.jaxp.datatype.DatatypeFactoryImpl not found . Comment : I ended up refactoring xmlapi xml resolver the open exi library and xerces to not use any of the banned javax.xml packages .. . Answer : Finally I have solved it for people with the same problem the solution is : .. . .. . For the input and for the output : .. . .. . note 1 : I am using OpenExi library .. . .. . note 2 : The output stream has to be set before calling the encode method .",
"Question : I am exporting large databases into xml format . This XML data needs to be compressed into the smallest possible format . I have heard alot about Efficient XML EXI and was wondering if there was a .NET implementation so that it can be called from within code.. . Does anyone have an example of this as online resources seem to be a bit sparse.. . Comment : It seems you control both the code that compresses the XML and the code that decompresses it later . Wouldn t it be better if you compressed it by storing it in some non-XML format and then decompressed it by converting to XML Comment : I d go for something like JSON to save on those bytes . I doubt encoding the information will help much Comment : @PatrickMagee JSON will save only in tags quotes and end tags apart from not being part of XML standard . This is far from any binary format my answer have more info . .. . Answer : Turns out Microsoft created their own binary XML format encoding called MC-NBFX catchy eh . This is part of the .NET framework and WCF as of .NET 3.0 . For more info see : .. . .. . MC-NBFX : .NET Binary Format : XML Data Structure http : msdn.microsoft.com en-us library cc219210.aspx .. . WCF Binary XML and dictionaries http : blogs.msdn.com b carlosfigueira archive 2011 01 26 wcf-binary-xml-and-dictionaries.aspx .. . XmlDictionaryWriter Class .. . XmlDictionaryReader Class http : msdn.microsoft.com en-us library system.xml.xmldictionaryreader 28v vs.110 29.aspx .. . .. . Another option is to run a Java implementation through IKVM http : www.ikvm.net to produce a .Net assembly . Open source Java implementations I could find are : .. . .. . OpenEXI http : openexi.sourceforge.net .. . EXI-ficient http : exificient.sourceforge.net Comment : I will give a +1 for the informative answer . But it likes says that adhering to MC-NBFX is the only XML binary available what is not . You know but the answer is a bit unclear about that . Comment : That blog entry WSF Binary XML and dictionaries has got some really useful information I didn t know of . Thanks for sharing that",
"Question : I m looking for a Java sample program for encoding decoding EXI Efficient XML Interchange http : en.wikipedia.org wiki Efficient XML Interchange streams using either EXIficient http : exificient.sourceforge.net or OpenEXI http : openexi.sourceforge.net . Could someone help I can t seem to find a sample app . edit : Alternatively if someone could point me towards documentation that would allow me to use EXIficient or OpenEXI that would be helpful . I found the javadoc but I have no idea which classes to use . Or as @StaxMan points out is there a particular mention discussion of the appropriate top-level classes to use with one of the standard XML APIs Comment : Why the -1 I m trying to learn how to use these libraries and I can t find documentation other than Javadoc . It s a legitimate question . .. . Answer : OpenEXI now provides tutorial 1 on how to program with it . 1 http : openexi.sourceforge.net tutorial .. . .. . Also this OpenEXI discussion forum post 2 shows code to convert from binary XML to a JaXB Java object by using the EXIReader SAX XMLReader implementation : .. . .. . 2 http : sourceforge.net p openexi discussion 800031 thread 3103260f limit 50 2191",
"Question : I am using EXIficient http : exificient.sourceforge.net to convert XML data to EXI and back to XML . Here i use their EXIficientDemo class https : code.google.com p ws4d-uexi source browse trunk uexi-exificient src EXIficientDemo.java r 3 . Sample Code : .. . .. . Firstly it converted xml file to EXI then back to XML when it generate XML from previously generated EXI s file it loses some information about Namespace . Actual XML File : .. . .. . Generated XML File By EXIficient .. . .. . In the generated XML file it is missing xmlns : tts http : www.w3.org ns ttml styling .. . .. . How to fixed this problem If you can please help me . .. . Answer : EXIficient may be suppressing unused namespaces . Your example doesn t show any use of the ttm namespace . As you can see it didn t retain the namespace prefix for the ttml namespace either changed to ns3 . The generated XML is perfectly valid if the ttml metadata namespace is unused . Update .. . .. . With the updated question where namespace ttml styling is used by the origin attribute of the span element the namespace is retained in the rebuilt XML but it has been moved to the span element . This is still a very valid XML document . Namespace declarations xmlns can appear anywhere in a XML document and applies to the element on which it appears and all subelements unless overridden which is very unusual . The same namespace can be declared many times on different elements . For simplicity and or optimization it is common to declare all namespaces up front on the root element using different prefixes but it is not required to do so . Comment : Edit the question . Please a look now . Here use ttml styling but still it does not included"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
xml
|
UNK_RELATION
|
elessar@slider@65
|
elessar -- elessar is a javascript library for creating a range @placeholder interface element that supports multiple adjustable ranges .
|
{
"confidence": [
63.55450439453125,
59.30378341674805,
58.12818908691406,
53.35805130004883,
52.805931091308594,
52.015899658203125,
49.59421920776367,
48.19721984863281,
44.004364013671875,
38.84217071533203,
37.36101531982422,
37.36101531982422,
34.11195755004883,
29.618576049804688,
24.21335220336914,
24.028228759765625,
22.113407135009766,
21.869781494140625,
21.2598876953125,
20.64777374267578,
19.293903350830078,
19.257905960083008,
19.257905960083008,
18.706974029541016,
18.706974029541016,
17.603891372680664,
17.56435775756836,
17.308263778686523,
15.554193496704102,
15.554193496704102,
15.554193496704102,
15.554193496704102,
15.554193496704102,
13.49855899810791,
13.49855899810791,
13.49855899810791,
13.49855899810791,
13.49855899810791,
13.49855899810791,
13.49855899810791,
13.49855899810791,
13.49855899810791,
13.49855899810791,
13.49855899810791,
13.49855899810791,
13.49855899810791,
13.49855899810791,
13.49855899810791,
13.49855899810791,
13.49855899810791,
13.49855899810791,
13.49855899810791,
13.49855899810791,
13.49855899810791,
13.49855899810791,
13.49855899810791,
13.49855899810791,
13.49855899810791,
12.134840965270996,
12.134840965270996,
12.134840965270996,
12.134840965270996,
12.134840965270996,
12.134840965270996,
12.134840965270996,
12.134840965270996,
12.134840965270996,
12.134840965270996,
12.134840965270996,
12.134840965270996,
12.134840965270996,
12.134840965270996,
12.134840965270996,
12.134840965270996,
12.134840965270996,
12.134840965270996,
12.134840965270996,
12.134840965270996,
12.134840965270996,
12.134840965270996,
12.134840965270996,
12.134840965270996,
12.134840965270996,
12.134840965270996,
12.134840965270996,
12.134840965270996,
12.134840965270996
],
"content": [
"I would like to use the Elessar http : quarterto.github.io Elessar library and configure it to select multiple hour ranges of a single day .",
"I m using Elessar Library https : github.com quarterto Elessar to create blocks .",
"Just been trying to get multiple ranges working using elessar https : github.com quarterto Elessar .. . .. . Its a great library although not well documented .",
"This was a bug https : github.com quarterto Elessar commit 51a9b6e9f5801c31ed7cd3b1e37a46984a5b6ecb in Elessar .",
"I m using the Elessar library to create a multi-range selector : https : github.com quarterto Elessar .. . .. . Works great so far except for one thing.. .",
"I m using Elessar Library on my project https : github.com quarterto Elessar tree master lib .",
"So I m adding an Elessar slider found at https : github.com quarterto Elessar to a website I m working on .",
"I need to changes background labels in Elessar http : blog.153.io Elessar does anyone know the parameter to changes the default values",
"You can see by yourself in the source-code at github.com quarterto Elessar blob develop dist elessar.js L506 https : github.com quarterto Elessar blob develop dist elessar.js L506",
"This isn t at all documented but RangeBar has a method .addRange range data https : github.com quarterto Elessar blob 1.8.0 lib rangebar.js L100 .",
"That seems to be what you re looking for according to the docs https : github.com quarterto Elessar val .",
".changed isn t a part of Elessar it s a method you should implement on your data model .",
"I think this issue off the project s GitHub may touch on it : https : github.com quarterto Elessar issues 67 .. . .. . Is there something in the docs that I m missing",
"You can create the range manually using something like .. . .. . and provided your model has a method changed which can tell you if the value is different to what it was before Backbone s changedAttributes http : backbonejs.org Model-changedAttributes for example : .. . .. . Yep this is horrible but it s actually how I do it in my application that uses Elessar .",
"@vch the change event only includes the DOM element not the Range object .",
"You can see my use-case here : ux.stackexchange.com questions 62928 http : ux.stackexchange.com questions 62928 interface-for-selecting-defining-multiple-mutually-exclusive-ranges",
"It makes much more sense to send the range along with change events currently only the value and DOM element are passed .",
"However It does not show me correct ranges .",
"Here are the options provided in the documentation : .. . .. . Ideally I think you should be able to pass the ranges with an ID min max id so that you can detect which range was actually changed when you update the slider .",
"The data parameter is stored with the range .",
"For instance if you load a set of ranges from a database ID min max then modify the range using a slider how do you know which of elements returned with the .val method corresponds to the database row you d like to update",
"enter image description here http : i.stack.imgur.com vSeEm.png .. . .. . This kind of looks right but obviously the a few seconds ranges are incorrect .",
"I can t seem to find any functionality to pass an ID to pre-populated ranges .",
"Here is my current configuration : .. . .. . Any ideas how to fix the range labels",
"This is problematic if you need to update an existing range that you re loading from a database .",
"I have sifted through similar questions in stack exchange and so far the question .. . .. . jQuery sliders : only last slider working on page with multiple sliders http : stackoverflow.com questions 21062184 jquery-sliders-only-last-slider-working-on-page-with-multiple-sliders .. . .. . is the closest to my issue .",
"There s a property hasChanged : true but it seems to be true for every range even the ones that weren t changed .",
"Thanks for the awesome support and for building this wonderful library .",
"It s actually showing in the format YYYY-MM-DD HH : mm and I only need HH : mm .",
"Could you show what you have right now",
"if I set the parameter bgLabels : 4 appears the background labels 4 in this case but with format YYYY-MM-DD HH : SS",
"Since version 1.7 there s a new bgMarks option : .. . .. . For your use-case you d want assuming you re using Moment.js :",
"I just would like to add that it seems the API description on the project s GitHub page is incorrect the actual property name is bgMark not the plural bgMarks .",
"However I wanted to use more than one instance of it .",
"The problem is that if I attempt to add a duplicate of the slider div or more than two only the last one will function the others act like empty containers .",
"I ve tried to fix my problem by .. . .. . 1 Copying and pasting the function statement for each div with their own unique variable .. . .. . 2 Inserting the script .. . .. . to the existing script to clone the same div more than once a resolution suggestively found in the link above and .. . .. . 3 Including the script .. . .. . in the existing script to append the slider properties to a new div .",
"But none of these have had luck .",
"The existing html is .. . .. . The rest of the slider function is found within elessar.js linked at the top .",
"I m grateful for any help with this",
"can you provide a fiddle to play with",
"All of the code is in this fiddle including the jquery bootstrap dependencies and moment.js is included at the bottom :",
"jsfiddle.net atstearns23 nehhxsb9 11 http : jsfiddle.net atstearns23 nehhxsb9 11 however it doesn t seem to run in fiddle but runs fine on the computer .",
"I m sure if you copied them to text-files they would run .",
"in this http : jsfiddle.net Cerlin nehhxsb9 13 fiddle its working properly .",
"check it please",
"I can t thank you enough",
"I didn t think you could redefine role tags .",
"Is there a way to upvote your answer profile status",
"add different role attribute .",
"Fiddle http : jsfiddle.net Cerlin nehhxsb9 13",
"To clarify : the role attribute in the demo isn t important I m just using it as a selector .",
"When you copy the div you end up with two elements with the same role and jQuery selects both .",
"You could use classes instead .",
"enter image description here http : i.stack.imgur.com WLfkF.png .. . .. . I m trying to select blocks which are blue and subtract yellow ones for example my code should insert value to database which is 3 hour bw 10am-12am 2 hour and 13 : 00-14 : 00 1 hour total 3 hours .",
"Could you please help me for my code",
"When I click the button I want to insert values to db .",
"In other words how can I parse the values which are blue",
"Thanks in advance .",
"like so : .. . .. .",
"found any solutions",
"Note that the label function is being passed already formatted values .",
"I think the answer is a little late but... .",
"This seems like it would be a necessary component .",
"Thanks Andrew",
"have you tried .val",
"@vch thanks for you reply .",
".val just returns an array of the values it doesn t indicate which value was changed .",
"Let me know if that question makes sense I need coffee",
":",
"it looks like .on change takes a callback that includes that .",
"This would be a useful addition though .",
"I ll be adding this in a future release .",
"Woah",
"I m receiving a Uncaught TypeError : undefined is not a function error on the changed method after data model in your example .",
"Any ideas what I m doing wrong",
"My example is just pseudocode .",
"I ve updated the answer sorry for the confusion",
"Got it",
"Thanks .",
"I got everything going but it doesn t seem to work on touch devices .",
"No error thrown in the console either .",
"Can someone help me fix it .",
"Here is an example : .. . .. . http : codepen.io praneybehl pen MYXVEx .. . .. . Thanks in advance",
"It s fixed in version 1.8.4 .",
"I wonder if I can use intersection values on the bar .",
"For Instance .. . .. . enter image description here http : i.stack.imgur.com TEN5Q.png .. . .. . Here my VALUES : .. . .. . and I used addRange method which is array abnormalised form of 07 : 30 15 : 30 .",
"Could you please help me"
]
}
|
{
"confidence": [
75.73478698730469,
75.7140121459961,
74.08096313476562,
64.85431671142578,
58.57141876220703,
56.66547775268555,
47.49945068359375,
47.49945068359375
],
"content": [
"Question : I m using the Elessar library to create a multi-range selector : https : github.com quarterto Elessar .. . .. . Works great so far except for one thing.. . I can t seem to find any functionality to pass an ID to pre-populated ranges . This is problematic if you need to update an existing range that you re loading from a database . Here are the options provided in the documentation : .. . .. . Ideally I think you should be able to pass the ranges with an ID min max id so that you can detect which range was actually changed when you update the slider . I think this issue off the project s GitHub may touch on it : https : github.com quarterto Elessar issues 67 .. . .. . Is there something in the docs that I m missing This seems like it would be a necessary component . Thanks Andrew Comment : have you tried .val That seems to be what you re looking for according to the docs https : github.com quarterto Elessar val . Comment : @vch thanks for you reply . .val just returns an array of the values it doesn t indicate which value was changed . For instance if you load a set of ranges from a database ID min max then modify the range using a slider how do you know which of elements returned with the .val method corresponds to the database row you d like to update Let me know if that question makes sense I need coffee : Comment : it looks like .on change takes a callback that includes that . Comment : @vch the change event only includes the DOM element not the Range object . This would be a useful addition though . .. . Answer : This isn t at all documented but RangeBar has a method .addRange range data https : github.com quarterto Elessar blob 1.8.0 lib rangebar.js L100 . The data parameter is stored with the range . You can create the range manually using something like .. . .. . and provided your model has a method changed which can tell you if the value is different to what it was before Backbone s changedAttributes http : backbonejs.org Model-changedAttributes for example : .. . .. . Yep this is horrible but it s actually how I do it in my application that uses Elessar . It makes much more sense to send the range along with change events currently only the value and DOM element are passed . I ll be adding this in a future release . Comment : Woah Thanks for the awesome support and for building this wonderful library . You can see my use-case here : ux.stackexchange.com questions 62928 http : ux.stackexchange.com questions 62928 interface-for-selecting-defining-multiple-mutually-exclusive-ranges Comment : I m receiving a Uncaught TypeError : undefined is not a function error on the changed method after data model in your example . There s a property hasChanged : true but it seems to be true for every range even the ones that weren t changed . Any ideas what I m doing wrong Comment : My example is just pseudocode . .changed isn t a part of Elessar it s a method you should implement on your data model . Comment : I ve updated the answer sorry for the confusion Comment : Got it Thanks .",
"Question : I would like to use the Elessar http : quarterto.github.io Elessar library and configure it to select multiple hour ranges of a single day . like so : .. . .. . enter image description here http : i.stack.imgur.com vSeEm.png .. . .. . This kind of looks right but obviously the a few seconds ranges are incorrect . Here is my current configuration : .. . .. . Any ideas how to fix the range labels Comment : found any solutions Comment : Note that the label function is being passed already formatted values . .. . Answer : I think the answer is a little late but... .",
"Question : Just been trying to get multiple ranges working using elessar https : github.com quarterto Elessar .. . .. . Its a great library although not well documented . I got everything going but it doesn t seem to work on touch devices . No error thrown in the console either . Can someone help me fix it . Here is an example : .. . .. . http : codepen.io praneybehl pen MYXVEx .. . .. . Thanks in advance .. . Answer : This was a bug https : github.com quarterto Elessar commit 51a9b6e9f5801c31ed7cd3b1e37a46984a5b6ecb in Elessar . It s fixed in version 1.8.4 .",
"Question : null .. . Answer : I m using Elessar Library on my project https : github.com quarterto Elessar tree master lib . I wonder if I can use intersection values on the bar . For Instance .. . .. . enter image description here http : i.stack.imgur.com TEN5Q.png .. . .. . Here my VALUES : .. . .. . and I used addRange method which is array abnormalised form of 07 : 30 15 : 30 . However It does not show me correct ranges . Could you please help me Thanks in advance .",
"Question : I need to changes background labels in Elessar http : blog.153.io Elessar does anyone know the parameter to changes the default values It s actually showing in the format YYYY-MM-DD HH : mm and I only need HH : mm . Comment : Could you show what you have right now Comment : if I set the parameter bgLabels : 4 appears the background labels 4 in this case but with format YYYY-MM-DD HH : SS .. . Answer : Since version 1.7 there s a new bgMarks option : .. . .. . For your use-case you d want assuming you re using Moment.js : Comment : I just would like to add that it seems the API description on the project s GitHub page is incorrect the actual property name is bgMark not the plural bgMarks . You can see by yourself in the source-code at github.com quarterto Elessar blob develop dist elessar.js L506 https : github.com quarterto Elessar blob develop dist elessar.js L506",
"Question : null .. . Answer : I m using Elessar Library https : github.com quarterto Elessar to create blocks . enter image description here http : i.stack.imgur.com WLfkF.png .. . .. . I m trying to select blocks which are blue and subtract yellow ones for example my code should insert value to database which is 3 hour bw 10am-12am 2 hour and 13 : 00-14 : 00 1 hour total 3 hours . Could you please help me for my code When I click the button I want to insert values to db . In other words how can I parse the values which are blue Thanks in advance .",
"Question : So I m adding an Elessar slider found at https : github.com quarterto Elessar to a website I m working on . However I wanted to use more than one instance of it . The problem is that if I attempt to add a duplicate of the slider div or more than two only the last one will function the others act like empty containers . I have sifted through similar questions in stack exchange and so far the question .. . .. . jQuery sliders : only last slider working on page with multiple sliders http : stackoverflow.com questions 21062184 jquery-sliders-only-last-slider-working-on-page-with-multiple-sliders .. . .. . is the closest to my issue . I ve tried to fix my problem by .. . .. . 1 Copying and pasting the function statement for each div with their own unique variable .. . .. . 2 Inserting the script .. . .. . to the existing script to clone the same div more than once a resolution suggestively found in the link above and .. . .. . 3 Including the script .. . .. . in the existing script to append the slider properties to a new div . But none of these have had luck . The existing html is .. . .. . The rest of the slider function is found within elessar.js linked at the top . I m grateful for any help with this Comment : can you provide a fiddle to play with Comment : All of the code is in this fiddle including the jquery bootstrap dependencies and moment.js is included at the bottom : Comment : jsfiddle.net atstearns23 nehhxsb9 11 http : jsfiddle.net atstearns23 nehhxsb9 11 however it doesn t seem to run in fiddle but runs fine on the computer . I m sure if you copied them to text-files they would run . Comment : in this http : jsfiddle.net Cerlin nehhxsb9 13 fiddle its working properly . check it please Comment : I can t thank you enough I didn t think you could redefine role tags . Is there a way to upvote your answer profile status .. . Answer : add different role attribute . Fiddle http : jsfiddle.net Cerlin nehhxsb9 13",
"Question : So I m adding an Elessar slider found at https : github.com quarterto Elessar to a website I m working on . However I wanted to use more than one instance of it . The problem is that if I attempt to add a duplicate of the slider div or more than two only the last one will function the others act like empty containers . I have sifted through similar questions in stack exchange and so far the question .. . .. . jQuery sliders : only last slider working on page with multiple sliders http : stackoverflow.com questions 21062184 jquery-sliders-only-last-slider-working-on-page-with-multiple-sliders .. . .. . is the closest to my issue . I ve tried to fix my problem by .. . .. . 1 Copying and pasting the function statement for each div with their own unique variable .. . .. . 2 Inserting the script .. . .. . to the existing script to clone the same div more than once a resolution suggestively found in the link above and .. . .. . 3 Including the script .. . .. . in the existing script to append the slider properties to a new div . But none of these have had luck . The existing html is .. . .. . The rest of the slider function is found within elessar.js linked at the top . I m grateful for any help with this Comment : can you provide a fiddle to play with Comment : All of the code is in this fiddle including the jquery bootstrap dependencies and moment.js is included at the bottom : Comment : jsfiddle.net atstearns23 nehhxsb9 11 http : jsfiddle.net atstearns23 nehhxsb9 11 however it doesn t seem to run in fiddle but runs fine on the computer . I m sure if you copied them to text-files they would run . Comment : in this http : jsfiddle.net Cerlin nehhxsb9 13 fiddle its working properly . check it please Comment : I can t thank you enough I didn t think you could redefine role tags . Is there a way to upvote your answer profile status .. . Answer : To clarify : the role attribute in the demo isn t important I m just using it as a selector . When you copy the div you end up with two elements with the same role and jQuery selects both . You could use classes instead ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
slider
|
UNK_RELATION
|
pydoc@module@35
|
pydoc -- pydoc is a documentation @placeholder for the programming language python .
|
{
"confidence": [
53.81554412841797,
53.81554412841797,
49.27817916870117,
49.27817916870117,
47.47198486328125,
44.96017074584961,
44.516807556152344,
44.516807556152344,
44.516807556152344,
44.3452262878418,
44.26881408691406,
43.45787811279297,
43.394405364990234,
43.14641189575195,
43.14641189575195,
42.65334701538086,
42.65334701538086,
42.65334701538086,
42.65334701538086,
42.65334701538086,
42.65334701538086,
42.65334701538086,
41.53094482421875,
40.925567626953125,
40.925567626953125,
40.925567626953125,
40.91386795043945,
40.754085540771484,
40.754085540771484,
40.69786834716797,
40.69786834716797,
40.69786834716797,
40.69786834716797,
40.297019958496094,
39.89679718017578,
39.89679718017578,
39.89679718017578,
39.80316162109375,
38.77439498901367,
38.605140686035156,
38.605140686035156,
38.605140686035156,
38.605140686035156,
38.605140686035156,
38.484962463378906,
38.31201934814453,
37.81035614013672,
37.48274230957031,
37.48274230957031,
37.48274230957031,
37.41758346557617,
37.24565124511719,
37.24565124511719,
37.24565124511719,
37.24565124511719,
37.15387725830078,
37.15387725830078,
37.15387725830078,
37.15387725830078,
37.15387725830078,
37.14326477050781,
37.14326477050781,
36.94384765625,
36.361637115478516,
35.6002197265625,
35.6002197265625,
35.6002197265625,
35.6002197265625,
35.6002197265625,
35.6002197265625,
35.55377197265625,
35.55377197265625,
35.55377197265625,
35.55377197265625,
35.461997985839844,
35.461997985839844,
35.461997985839844,
35.461997985839844,
35.461997985839844,
35.461997985839844,
35.461997985839844,
35.461997985839844,
35.461997985839844,
35.461997985839844,
35.461997985839844,
35.461997985839844,
35.461997985839844,
35.461997985839844,
35.461997985839844,
35.461997985839844,
34.55949401855469,
34.55949401855469,
34.477813720703125,
34.431373596191406,
34.431373596191406,
34.29447937011719,
34.09735870361328,
32.920082092285156,
32.920082092285156,
32.920082092285156
],
"content": [
"Pydoc is the documentation-generation system for Python .",
"Pydoc is a help documentation module for Python .",
"Try python -c import pydoc print pydoc.render doc pydoc less",
"I tried using the pydoc as well as the python -m pydoc but it gives the error .",
"I tried to convert it to a documentation by pydoc using the command python -m pydoc -w LC cmdline .",
"pydoc module name",
"Pydoc ironically does not have a lot of external documentation .",
"I am using pydoc to create documentation .",
"But it is a kind of old-school using Pydoc for documentation generating .",
"Try pydoc test .",
"If you don t know the installation path you can run pydoc using the command python -m pydoc .. . .",
"As an example for Raw input try : python -m pydoc raw input",
"My problem is that I need to generate documentation with pydoc .",
"Use python -m pydoc os instead of pydoc directly no need to add to path variable .",
"You can also start pydoc server with this command python -m pydoc -p 8080 .",
"There s no pydoc command in Windows .",
"Have you checked it at pydoc",
"File contents : .. . .. . pydoc output :",
"Chapter 12 mentions pydoc .",
"pydoc is the command to use .",
"pydoc imports the module to be documented .",
"i.e what is the docstring for pydoc",
"pydoc does not work in Windows .",
"Type pydoc.py instead of pydoc .. . .. . 3 .",
"I rarely if ever use pydoc .",
"did you try pydoc -p",
"This question already has an answer here : .. . .. . Pydoc is not working Windows XP questions 3391998 pydoc-is-not-working-windows-xp 8 answers .. . .. . I m working through this Learn python the Hard Way book and the book is now saying to run pydoc open I do this and get the response that pydoc is not an internal or external command etc .",
"This applies to most scripting languages not just pydoc or even python .",
"Note that Pydoc is the module used in Python since 2.1 for the help function .",
"At university we have been told to generate documentation by using pydoc .",
"Is there any parameter to be passed to pydoc to create a documentation for each method of a class as well",
"I need to generate documentation from comments using pydoc .",
"Yes pydoc was designed to simply output the documentation in a terminal environment .",
"Pydoc wants a module name not a file name .",
"For example to start the pydoc GUI use : .. . .. . If you want to add the pydoc command create a pydoc.bat file with the following line in it :",
"Side note : pydoc modules is a syntax-error because you should import pydoc and pydoc.help modules .",
"You can use pydoc module to get this help information : .. . .. . You can do this programmatically with the pydoc module :",
"c : pydoc raw input .. . .. . code for pydoc.psi :",
"change unset -f pydoc to unset -f pydoc dev-null 2 1",
"Happy to say pydoc now works for me on windows .",
"So finally is there another pydoc method I m missing",
"@joojaa it does not work it doesn t find pydoc .",
"So here s the problem I m running into with pydoc .",
"what function you are not able to see in pydoc -p",
"pydoc is fantastic for generating documentation but the documentation has to be written in the first place .",
"For one thing if I have the argparse stuff defined in main I just don t see anything extra in the pydoc and if I define it in the main scope in a test program I get an error when I run pydoc test docs.py since not all required arguments are present when pydoc is being run : jazz pydoc . test docs.py usage : pydoc -h --file FILE --uid --username .. . pydoc : error : one of the arguments --uid --username is required problem in . test docs.py - type exceptions.SystemExit : 2",
"For example if you are trying to generate documentation for original in original.py : .. . .. . .. . yourcode dir pydoc -w original.py .. . no Python documentation found for original.py .. . .. . yourcode dir pydoc -w original .. . wrote original.html .. .",
"Is there a flag or an option for pydoc to display the non-public classes",
"Is there a way to use pydoc to generate roff sources for manpages",
"I can then call pydoc as intended.. . .. . .. . ie .",
"Essentially they both extract documentation from the requested object pydoc via definitions and docstrings perldoc via embedded pod documentation .",
"stackoverflow.com questions 13040646 http : stackoverflow.com questions 13040646 how-do-i-create-documentation-with-pydoc",
"I am not sure how Pydoc orders the functions in the generated documentation -- it is surely not the textual order in the module .",
"I know I do pydoc -p 5000 I will have my documentation on http : localhost : 5000 .",
"For example the command pydoc -w somelib would write a file somelib.html which contained the documentation for somelib .",
"How can I find a list of all of the ones supported by PyDoc",
"It will use the argument as a file name if it has a slash in it : pydoc . test.py",
"I want to specify a order in which Pydoc will document my functions .",
"How CPython extensions should be written in order for pydoc to mention the arguments name instead of .. .",
"How can I have pydoc to run my server externally",
"Following on Windows 7 - pydoc from cmd http : stackoverflow.com questions 4149274 windows-7-pydoc-from-cmd I have the following problem .",
"Example : .. . .. . Here is my module pydoc test.py : .. . .. . Here is the output of pydoc pydoc test : .. . .. . pydoc displays add my code-first and then test my code but I want the same order as in the file .",
"Now I would like to use pydoc to generate documentation but I realized that pydoc won t print anything unless I actually write the doc part inside the class which is not what I want .",
"the -m tells python that pydoc is a pre-built module in python and NOT a script .py file sitting in the current working folder .",
"Using Windows XP and Python 2.7 I tried to run pydoc through the terminal .",
"You should run pydoc modules from a system shell such as bash cmd.exe not Python shell .",
"Is there any way to have pydoc automagically render the synopsis and per-item help description for a Python program",
"Normally I type in python -m pydoc whatever it gives me the definition and then returns to C : Users User .",
"python -m pydoc module name .. . .. . .. . .. . And with a little haquery .. . : .. . .. . Create a pydoc.bat file as shown below .",
"I tried pydoc but I couldn t find how to handle it from Python code .",
"Reading the pydoc documentation I still have no clue how to do it since the information provided there is a little bit sparse .",
"Say you can document your functions using the Pydoc standard and then it can be used to generate documentation in your code .",
"IIRC That s not how it works .. . pydoc and a number of other auto-documentation tools e.g .",
".. . .. . pydoc -p 9090 will start a HTTP server on port 9090 and you will be able to browse all documentation at http : localhost : 9090",
"He wanted to know how to run pydoc command from the command-line .",
"Starting pydoc -p 8888 is partially helpful . . but does not address this usecase .",
"But in this case we need to use the pydoc command internally to fetch the description .",
"I m deciding whether to use Sphinx or Pydoc for documenting a large existent project .",
"have you tried running pydoc on mayas own interpretter",
"@RamonBlanquer Odd pydoc works fine for me with mayas own interpretter",
"Thanks it appears there s a method pydoc.getdoc that returns a string version of the pydoc .",
"So I assume the shebang does not work for the pydoc command .",
"It turns out that pydoc actually does work just like perldoc",
"I want the pydoc output to display in the same order as the methods are in the file .",
"Is there a way to comment the parameters of a function to make them recognized by the pydoc library",
"pydoc doesn t recognise structured elements in docstrings it just outputs the docstring as is .",
"However the : param is not recognized by pydoc and appear as the other comments in the generated html document .",
"Pydoc doesn t recognise structured elements in docstrings it just outputs the docstring as is .",
"pydoc will discriminate between these and segregate them in two different groups : .. . .. . 1 .",
"Use pydoc http : docs.python.org library pydoc.html .. . .. . This will generate imdb.html in the same directory .",
"i.e . we can t do pydoc dir prg.py .",
"We need to cd dir and then do pydoc prg.py .",
"I want to use Sphinx so it can automatically generate a pydoc for my python code but I m getting an error .",
"Then I got this error : .. . .. . Is there a way to generate a documentation for a module with arguments like mine by pydoc",
"I m looking for a way to create documentation crossreferences within pydoc comments working similar to an anchor in html .",
".. . .. . Edit .. . .. . I installed the 64 bit python-2.7 through the enthought python distribution on Mac OS mtn lion .. . .. . running pydoc in shell :",
"I was looking up seek in pydoc file and found the explanation on what the function does but I didn t understand how the documentation states the parameters .",
"name and package are assigned to their own sections but Pydoc will also generate those fields automatically whether you set them or not .",
"Is there an equivalent functionality in pydoc or am I limited to just a verbatim copy of the method s docstring",
"I ended up just switching to epydoc which is much more featureful than pydoc ."
]
}
|
{
"confidence": [
57.96106719970703,
55.46112060546875,
54.60186767578125,
54.21942138671875,
54.1015510559082,
53.5207405090332,
53.23902130126953,
53.0006103515625,
52.778099060058594,
52.70805358886719,
51.191192626953125,
50.981082916259766,
50.79473876953125,
50.624351501464844,
50.38603210449219,
50.33110809326172,
50.24449920654297,
50.09543228149414,
50.0828742980957,
50.025657653808594
],
"content": [
"Question : New to programming and python altogether . In the book I m learning from the author suggested I find out the purpose of Pydoc . I did a google-search on it and found a match from Gnome Terminal but it didn t make much sense to me . Anyone mind simplifying a bit Thanks . Comment : docs.python.org 2 library pydoc.html http : docs.python.org 2 library pydoc.html .. . Answer : Pydoc is the documentation-generation system for Python . Say you can document your functions using the Pydoc standard and then it can be used to generate documentation in your code .",
"Question : New to programming and python altogether . In the book I m learning from the author suggested I find out the purpose of Pydoc . I did a google-search on it and found a match from Gnome Terminal but it didn t make much sense to me . Anyone mind simplifying a bit Thanks . Comment : docs.python.org 2 library pydoc.html http : docs.python.org 2 library pydoc.html .. . Answer : Pydoc is a help documentation module for Python . Use this on your Windows terminal to understand what a function in python does : .. . .. . eg . If the documentation for a particular function is very long use q to get out of it . e.g . in case of",
"Question : Using Windows XP and Python 2.7 I tried to run pydoc through the terminal . unfortunately it doesn t work . Since I m not allowed to post a screenshot Newbie . Here is what it says white on black .. . .. . What I type : .. . .. . My result It s German an it roughly translates to The command pydoc is either spelled wrong or couldn t be found . : .. . .. . What am I doing wrong By the way I just started to teach myself programming using Zed Shaws Learn Python the Hard Way and this is the first issue I really can t figure out using Google . I start to believe that it is Windows an not me.. . being too broke to afford a Mac and to scared to learn Linux . Comment : You need to learn how to run scripts on Windows anyway and you ve got some good answers but are you aware of the GUI documentation gadget found by clicking on Start All Programs Python 2.7 Python manuals Comment : Screenshot : A bitmap screenshot is rarely necessary to display text . Just select the text in the command-prompt window and paste it into your SO question . Then select it in your browser and click on the 010101 etc editing icon to format it as code . Comment : I was aware of the Python manual but wanted to know how to start it through the command-prompt window hope I don tmix up the words terms . Regarding compying text from the command-prompt window : I didn t know that this was possible so thanks Google told me how to.. . . .. . Answer : pydoc is actually a Python script so on Windows you need to look for pydoc.py and it s not added to the Windows PATH by default so you need to give a full pathname . Try running c : Python27 Lib pydoc.py from your command-line . Edit : For a graphical interface to Python s documentation you might want to instead run c : Python27 Tools Scripts pydocgui.pyw from the command-line or from Windows Explorer . This starts pydoc s web server on your local PC so you can access the documentation through your web browser . Comment : Thanks so much Now I m really glad that this problem made me try out Stack Overflow . Comment : If you don t know the installation path you can run pydoc using the command python -m pydoc .. . . Comment : This did not really answer Twiek s question . He wanted to know how to run pydoc command from the command-line . all the answers above are work arounds . The answer can be found at Dave Webb s answer below but he did not say where to place the pydoc.bat file he spoke of . My comments help clear that up . Happy to say pydoc now works for me on windows . Comment : Dave Webb s answer is great but I like Cristian s workaround in the commend above .",
"Question : I need to generate documentation from comments using pydoc . Looks like tutorial links in pydoc.org is broken and I can t find how to do it . Can anyone explain .. . Answer : If you really want to use Pydoc you can simply do in a terminal : .. . .. . This will generate an old-school HTML documentation from doctrings . Note that Pydoc is the module used in Python since 2.1 for the help function . It will retrieve the docstrings which are NOT comments . You should describe your functions using docstrings . But it is a kind of old-school using Pydoc for documentation generating . The popular tool to do that in Python is Sphinx http : sphinx-doc.org . But you ll need to format your docstrings in a particular format as reStructuredText . Have a look there http : daouzli.com blog docstring.html to get some information concerning docstrings formatting . You can also use Pyment https : github.com dadadel pyment to generate docstring skeletons or convert existing ones to a particular format .",
"Question : Quick perldoc http : search.cpan.org dapm perl-5.14.4 pod perldoc.pod overview : .. . .. . When writing a Perl module you can document it with POD http : perldoc.perl.org perlpod.html style documentation . Then to get an overview of how the module works you can just type this into the command-line : .. . .. . perldoc module name .. . .. . .. . .. . How do I do this with Python I understand that Python has a standard form of documenting code using docstrings that is somewhat similar to Perl s POD style . The information about the Python module can then be extracted using the help function but this is far from elegant . First you need to start the Python interpreter then import the module you want to get help for and then finally you can use the help function to get information about the module . example : .. . .. . .. . .. . Is there a better way I would like a Python equivalent to the way this works for Perl : .. . .. . pydoc module name .. . .. . but when I try this I get the following output : Comment : pydoc is the command to use . If that is missing there is likely a problem with your Python installation . Comment : So your saying that it should work just like perldoc Comment : Essentially they both extract documentation from the requested object pydoc via definitions and docstrings perldoc via embedded pod documentation . .. . Answer : It turns out that pydoc actually does work just like perldoc With a catch .. . you just need to type it a little different python -m pydoc module name .. . .. . .. . .. . And with a little haquery .. . : .. . .. . Create a pydoc.bat file as shown below . pydoc.bat : .. . .. . Then store this file in C : Python27 or in the same location as your python.exe file .. . .. . Then swiftly wave your hands over the keyboard and exclaim SIM SALA BIM .. . .. . your pydoc command will now work pydoc module name",
"Question : I m trying to find out what modules I have installed for python .. . .. . from : this thread http : stackoverflow.com questions 739993 get-a-list-of-installed-python-modules .. . .. . I ve tried .. . .. . However this works .. . .. . along with any other module I know I have installed . This does return the modules but is there a way to fix my help documentation .. . .. . Edit .. . .. . I installed the 64 bit python-2.7 through the enthought python distribution on Mac OS mtn lion .. . .. . running pydoc in shell : Comment : Using help modules works fine here both in cpython and in the ipython front-end . How did you install python Comment : @Roland : it also works on Jython Pypy . Comment : You should run pydoc modules from a system shell such as bash cmd.exe not Python shell . Comment : Side note : pydoc modules is a syntax-error because you should import pydoc and pydoc.help modules . Though help is a wrapper around pydoc.help so even using pydoc that way shouldn t help too . Comment : Btw for me using help modules doesn t work I get a segmentation-fault ubuntu python 2.7.3 .. . Answer : You can try help in python . This will take you to help prompt that will look something like - help .. . .. . Here you can type modules to get list of all modules .",
"Question : I edit Python scripts with Emacs and I always put this at the beginning of my scripts : .. . .. . It is recommended at least not discourage in PEP 0236 http : www.python.org dev peps pep-0263 . However I just found that pydoc doesn t recognize ignore it correctly : .. . .. . Is there a way to fix that Or a good alternative to using - - coding : utf-8 - - I m using Python 2.6 Comment : This looks like a bug to me . Have you checked it at pydoc Comment : @BurhanKhalid : I m relatively new to Python . How do I check that .. . Answer : It appears that if you actually provide a documentation string the encoding line will be skipped . File contents : .. . .. . pydoc output :",
"Question : I have a python-module named LC cmdline.py with argparse as follows . I tried to convert it to a documentation by pydoc using the command python -m pydoc -w LC cmdline . Then I got this error : .. . .. . Is there a way to generate a documentation for a module with arguments like mine by pydoc Thank you . BTW my OS is win7 and my python is 2.7 .. . Answer : I d move parser.parse args inside the if like so : .. . .. . Result : Comment : Thank you it works O O Comment : What if the file where the parse args is is imported by another file It wouldn t be main . This is not a good solution . : Comment : @SPL Splinter that s actually the point of my answer . OP doesn t want parse args called if the file is imported by another file .",
"Question : Using Windows XP and Python 2.7 I tried to run pydoc through the terminal . unfortunately it doesn t work . Since I m not allowed to post a screenshot Newbie . Here is what it says white on black .. . .. . What I type : .. . .. . My result It s German an it roughly translates to The command pydoc is either spelled wrong or couldn t be found . : .. . .. . What am I doing wrong By the way I just started to teach myself programming using Zed Shaws Learn Python the Hard Way and this is the first issue I really can t figure out using Google . I start to believe that it is Windows an not me.. . being too broke to afford a Mac and to scared to learn Linux . Comment : You need to learn how to run scripts on Windows anyway and you ve got some good answers but are you aware of the GUI documentation gadget found by clicking on Start All Programs Python 2.7 Python manuals Comment : Screenshot : A bitmap screenshot is rarely necessary to display text . Just select the text in the command-prompt window and paste it into your SO question . Then select it in your browser and click on the 010101 etc editing icon to format it as code . Comment : I was aware of the Python manual but wanted to know how to start it through the command-prompt window hope I don tmix up the words terms . Regarding compying text from the command-prompt window : I didn t know that this was possible so thanks Google told me how to.. . . .. . Answer : There s no pydoc command in Windows . You ll need to specify the full path to pydoc.py . For example to start the pydoc GUI use : .. . .. . If you want to add the pydoc command create a pydoc.bat file with the following line in it : Comment : where should one place the pydoc.bat file Comment : oh never mind . I figured out that it had to be placed in the Scripts folder which for me is C : python27 Tools Scripts . Thanks :",
"Question : I am using pydoc to create documentation . But it is only displaying the docstring for a class and for methods such as init . Is there any parameter to be passed to pydoc to create a documentation for each method of a class as well Example : .. . .. . Now when I use pydoc on this code I do not see This is docstring for mymethod function . in the output generated . Comment : Example code please Comment : Instance methods class methods static-methods Leading-underscore method names Any decorators involved Comment : Yes . There are instance methods class methods leading underscore methods and decorators as well . .. . Answer : Your code looks perfectly fine I put it in a script.py file removed the some other class reference and ran python -m pydoc -w script . It generated the following HTML : .. . .. . .. . class myclass .. . This is class docstring . .. . Methods defined here : .. . init self .. . This is docsctring for init method . mymethod self some parameter .. . This is docstring for mymethod function .",
"Question : This question already has an answer here : .. . .. . Pydoc is not working Windows XP questions 3391998 pydoc-is-not-working-windows-xp 8 answers .. . .. . I m working through this Learn python the Hard Way book and the book is now saying to run pydoc open I do this and get the response that pydoc is not an internal or external command etc . I ve trying adding C : Python27 lib pydoc.py to PATH and restarting my computer but it still hasn t worked . .. . Answer : Python is probably not in your path . you must add it in your path either by using the GUI or something like this : .. . .. . This is a windows example but it should not be hard to convert to a nix version . The export command can be used in that case .",
"Question : Using Windows XP and Python 2.7 I tried to run pydoc through the terminal . unfortunately it doesn t work . Since I m not allowed to post a screenshot Newbie . Here is what it says white on black .. . .. . What I type : .. . .. . My result It s German an it roughly translates to The command pydoc is either spelled wrong or couldn t be found . : .. . .. . What am I doing wrong By the way I just started to teach myself programming using Zed Shaws Learn Python the Hard Way and this is the first issue I really can t figure out using Google . I start to believe that it is Windows an not me.. . being too broke to afford a Mac and to scared to learn Linux . Comment : You need to learn how to run scripts on Windows anyway and you ve got some good answers but are you aware of the GUI documentation gadget found by clicking on Start All Programs Python 2.7 Python manuals Comment : Screenshot : A bitmap screenshot is rarely necessary to display text . Just select the text in the command-prompt window and paste it into your SO question . Then select it in your browser and click on the 010101 etc editing icon to format it as code . Comment : I was aware of the Python manual but wanted to know how to start it through the command-prompt window hope I don tmix up the words terms . Regarding compying text from the command-prompt window : I didn t know that this was possible so thanks Google told me how to.. . . .. . Answer : 1 . Check if path you ve added to PATH is in there . Type in command-line PATH . If path you ve added isn t there then Restart Windows . If it is go next line . 2 . Type pydoc.py instead of pydoc .. . .. . 3 . If you don t want type pydoc module extension every time just add .PY extension to PATHEXT variable located at the same place as PATH variable does Computer Properties Advanced system settings Advanced Environment Variables.. . System Variables PATHEXT . Restart your Windows after adding of extension .",
"Question : Following on Windows 7 - pydoc from cmd http : stackoverflow.com questions 4149274 windows-7-pydoc-from-cmd I have the following problem . I prepared a simple docstring-documented hello.py hello world script : .. . .. . and saved it in C : Python34 lib . Then using Window s command-line I changed the directory to C : Python34 lib and ran .. . .. . My output is : .. . .. . It s great that it printed the documentation but first it ran the program . How do I get it to NOT run the program just print the documentation Comment : IIRC That s not how it works .. . pydoc and a number of other auto-documentation tools e.g . sphinx import the source and look for the doc attributes that python adds to classes functions etc . The only tool that I know of which doesn t import the source is epydoc . That said usually you can guard any statements that you don t want to execute in an if name main : block . .. . Answer : pydoc imports the module to be documented . So statements there are executed . If you can modify the code guard the print line with if name main so the line is executed only when it is executed directly but not when it is imported :",
"Question : I a beginner level python user and when I type the following in the terminal : .. . .. . pydoc Inleesgenbank.py .. . .. . I get the following error message : .. . .. . problem in . Inleesgenbank.py - : invalid syntax Inleesgenbank.py line 30 .. . .. . So at line 30 there must be a syntaxis error in this code : .. . .. . Line 30 is the line : print doc file sys.stderr .. . .. . I know this is not a very clean piece of code but I want to learn what is wrong with it . .. . Answer : I don t get a syntax-error running on Python 3 but I do get a syntax-error on Python 2 . You are using the Python 3 print syntax . For Python 2 you should use : .. . .. . Note also that you probably meant usage . doc Comment : You are right when I use pydoc3 instead of pydoc I don t get an errormessage . So I assume the shebang does not work for the pydoc command . Comment : The shebang line is only used when a script is run directly . So your line should have had pydoc3 in it and you should not call it using pydoc but directly using Inleesgenbank.py . This applies to most scripting languages not just pydoc or even python .",
"Question : I m trying to find out what modules I have installed for python .. . .. . from : this thread http : stackoverflow.com questions 739993 get-a-list-of-installed-python-modules .. . .. . I ve tried .. . .. . However this works .. . .. . along with any other module I know I have installed . This does return the modules but is there a way to fix my help documentation .. . .. . Edit .. . .. . I installed the 64 bit python-2.7 through the enthought python distribution on Mac OS mtn lion .. . .. . running pydoc in shell : Comment : Using help modules works fine here both in cpython and in the ipython front-end . How did you install python Comment : @Roland : it also works on Jython Pypy . Comment : You should run pydoc modules from a system shell such as bash cmd.exe not Python shell . Comment : Side note : pydoc modules is a syntax-error because you should import pydoc and pydoc.help modules . Though help is a wrapper around pydoc.help so even using pydoc that way shouldn t help too . Comment : Btw for me using help modules doesn t work I get a segmentation-fault ubuntu python 2.7.3 .. . Answer : help modules is deliberately disabled in newer versions of Enthought s Python because it reliably causes segfaults with a standard set of EPD packages . One way to list all packages you have installed in EPD is with enpkg -l . Note that this tool only lists packages you have installed with the EPD installer or enpkg itself it won t know about packages you have installed by hand or for example with pip . More info about the enpkg tool can be found by typing enpkg --help or in this Enthought Knowledge Base Article : https : support.enthought.com entries 22415022-using-enpkg-to-update-epd-packages",
"Question : Obviously I am missing something serious here . Here is my test program : .. . .. . I run it and it prints Hello world natch . But pydoc.py test.py gives this : .. . .. . Obviously I am missing something simple here but what --edit-- Per Vishnu s suggestion I added print t . doc to the last line of the file and now running the file gives this : .. . .. . But pydoc still does not find any documentation . Comment : Did you try TestMe . doc Comment : Have you tried the solutions posted here stackoverflow.com questions 13040646 http : stackoverflow.com questions 13040646 how-do-i-create-documentation-with-pydoc Comment : Yup that is what I looked at just before posting this . And why it seems to me that my test script above is right . .. . Answer : Pydoc wants a module name not a file name . Try pydoc test . It will use the argument as a file name if it has a slash in it : pydoc . test.py Comment : Bingo I knew it had to be something simple .",
"Question : I m trying to create a document out of my module . I used pydoc from the command-line in Windows 7 using Python 3.2.3 : .. . .. . This led to my shell being filled with text one line for each file in my module saying : .. . .. . It s as-if Pydoc s trying to get documentation for my files but I want to autocreate it . I couldn t find a good tutorial using Google . Does anyone have any tips on how to use Pydoc If I try to create documentation from one file using .. . .. . Also it has a link-to the file itself on my computer which I can click and it shows what s inside the file on my web-browser . Comment : pydoc -w moduleName works for me for a single module with one function in it . Can you try to create a simple example that would reproduce this A directory layout and the contents of the files and where you re running which command Comment : Apologies in advance if this is a stupid question but do you have docstrings etc . in your module Meaning do you have the content in your source file that running pydoc should produce .. . Answer : Another thing that people may find useful...make sure to leave off .py from your module name . For example if you are trying to generate documentation for original in original.py : .. . .. . .. . yourcode dir pydoc -w original.py .. . no Python documentation found for original.py .. . .. . yourcode dir pydoc -w original .. . wrote original.html .. . Comment : I wonder why the accepted answer not provide this tiny little detail WIthout dropping .py it won t work atleast in Py3 . Comment : This helped . I also found that when executing the pydoc we need to be in the same directory.. . i.e . we can t do pydoc dir prg.py . We need to cd dir and then do pydoc prg.py . Is that right",
"Question : pydoc does not work in Windows . at this post http : stackoverflow.com questions 3391998 pydoc-is-not-working-windows-xp the last answer by dave webb says to create a pydoc.bat file with this code in it : .. . .. . After I create pydoc.bat where should it be placed so the pydoc command works in the command-prompt PS adding C : python27 Lib pydoc.py to the Windows path in the system environment-variables does not work . Even after logging out and back in it does not work . Comment : If you double click on a .py file in Windows Explorer does it start running or is something else happening e.g . the file is opened in an editor Also as far as I can see this question has been already answered . Maybe you should comment over there if you re not happy with those answers . Comment : a command-prompt style window pops up for a fraction of a second and disappears when i double click a .py file . i have not seen this question answered over here stackoverflow.com questions 3391998 http : stackoverflow.com questions 3391998 pydoc-is-not-working-windows-xp but I will comment there . .. . Answer : Use python -m pydoc os instead of pydoc directly no need to add to path variable . the -m tells python that pydoc is a pre-built module in python and NOT a script .py file sitting in the current working folder . See https : docs.python.org 3 using cmdline.html for details Comment : You can also start pydoc server with this command python -m pydoc -p 8080 . Then go to localhost : 8080 http : localhost : 8080",
"Question : Is there a resource that provides quick easy access to methods and their pydoc s for standard-library classes E.g . I want to see what are the methods available on the Match class and the associated pydoc descriptions . Starting pydoc -p 8888 is partially helpful . . but does not address this usecase . Thanks . Comment : Are you just looking for the python.org documentation docs.python.org 2 library http : docs.python.org 2 library for Python2.X and docs.python.org 3 library http : docs.python.org 3 library for Python3.X Comment : I only see fnMatch there where are the details for the Match class generated by re.match It is not so clear how to use that reference for my purpose . thanks Comment : The MatchObject documentation http : docs.python.org 2 library re.html match-objects is pretty comprehensive . What are you missing The re.match function description http : docs.python.org 2 library re.html re.match hyperlinks you to that section . Comment : @Martijn . I did not know it were MatchObject thought it were Match . Now to actually get to the final result apparently need to click on 7.2 Regular Expressions and then browse the classes . It seems easy to you since accustomed to it but not as much for me having worked with rubydocs that were more intuitive . Now maybe I have a handle on the process to find pydoc stuff from the lang ref . Comment : I rarely if ever use pydoc . The Python documentation is organised per-module and excellently written while generated documentation often misses the narrative provided in the Python documentation site . .. . Answer : Try : .. . .. . from the interactive console . Edited to add your specific example . Comment : What is syntax for this I tried help re.Match no Python documentation found for re.Match Comment : Don t quote it pass in the actual object . Comment : help takes actual python objects so help Match assuming you did from re import Match Comment : You cannot it s an internal C implementation . It s one of the few warts in the std library . You can get an instance with re.match . Comment : re.match returns a sre.SRE Match object which can t be imported .",
"Question : Is there a resource that provides quick easy access to methods and their pydoc s for standard-library classes E.g . I want to see what are the methods available on the Match class and the associated pydoc descriptions . Starting pydoc -p 8888 is partially helpful . . but does not address this usecase . Thanks . Comment : Are you just looking for the python.org documentation docs.python.org 2 library http : docs.python.org 2 library for Python2.X and docs.python.org 3 library http : docs.python.org 3 library for Python3.X Comment : I only see fnMatch there where are the details for the Match class generated by re.match It is not so clear how to use that reference for my purpose . thanks Comment : The MatchObject documentation http : docs.python.org 2 library re.html match-objects is pretty comprehensive . What are you missing The re.match function description http : docs.python.org 2 library re.html re.match hyperlinks you to that section . Comment : @Martijn . I did not know it were MatchObject thought it were Match . Now to actually get to the final result apparently need to click on 7.2 Regular Expressions and then browse the classes . It seems easy to you since accustomed to it but not as much for me having worked with rubydocs that were more intuitive . Now maybe I have a handle on the process to find pydoc stuff from the lang ref . Comment : I rarely if ever use pydoc . The Python documentation is organised per-module and excellently written while generated documentation often misses the narrative provided in the Python documentation site . .. . Answer : Specifically for your case help on the re.MatchObject can be found at http : docs.python.org 2 library re.html match-objects for Python 2.x or http : docs.python.org 3 library re.html match-objects for Python 3.x . Additionally as Mark writes you can call help on the interactive console . If you don t know how to get to the interactive console you can just call python or python.exe from the command-line without any arguments . Since you are looking for help on a match object you can call Comment : Ok the language reference is further down on the page on docs.python.org 2 library http : docs.python.org 2 library . Then have to click on regular expressions . This is not as fast as the ruby online ref but usable . If you feel this were reasonable question pls upvote . thx"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
module
|
UNK_RELATION
|
pomm@object-model@23
|
pomm -- pomm is a php @placeholder manager framework for the postgresql relational-database .
|
{
"confidence": [
53.13774871826172,
50.05376434326172,
48.55704116821289,
46.67285919189453,
46.67285919189453,
42.89656448364258,
42.89656448364258,
42.89656448364258,
42.89656448364258,
42.89656448364258,
38.31087875366211,
37.809913635253906,
37.809913635253906,
37.809913635253906,
35.88853454589844,
34.696773529052734,
34.696773529052734,
31.209945678710938,
31.209945678710938,
31.209945678710938,
31.209945678710938,
27.424304962158203,
22.47514533996582,
22.341175079345703,
20.143301010131836,
19.862529754638672,
19.227710723876953,
19.15108299255371,
19.007116317749023,
18.507904052734375,
17.787424087524414,
17.787424087524414,
17.787424087524414,
16.9493465423584,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223,
13.639016151428223
],
"content": [
"Is this the right answer for my question pomm require .pomm cli bootstrap.php session pomm my db",
"Here http : api.odtu.lu v1 it says Fatal error : Class Pomm Connection Database not found in users ilhanna public html api v1 Pomm-1.1.4 Pomm Service.php on line 38 There is nothing on line 38 just a comment .",
"I want to obtain this object directly from PostgreSQL database via recursive sql query with Pomm http : www.pomm-project.org .",
"is that class defined as being inside a Pomm namespace",
"I want straight process PostreSQL - Pomm - Object .",
"I use Pomm 1.1.4 http : pomm.coolkeums.org and I cannot load the class .",
"I would suggest you use composer to install Pomm and get an autoloader .",
"It says that because we are in Map class Pomm knows what table to query .",
"So far I have this : .. . .. . My question if this is possible with Pomm and if yes how",
"It must return a configured Pomm instance whatever it comes from .",
"What you want to achieve is not really possible directly because in Pomm for performances reasons when a query is performed an iterator wraps the database cursor on results .",
"Download composer.phar from packagist https : packagist.org .. . .. . create a composer.json file like this : .. . .. . and execute the phar to install Pomm .",
"We are facing 2 issues could you help us get this solved .. . .. . 1 how to point dynamically to a schema in POMM .",
"You can see the follow structure : .. . .. . I want to obtain this result with Pomm Project http : www.pomm-project.org .",
"@ilhan just do db new Pomm Connection Database array .. . Once you have a database instance you can issue as many connection as you want .",
"Sorry I look into documentation of POMM2 pomm-project.org documentation sandbox2 http : www.pomm-project.org documentation sandbox2 and see that need create that file manually .",
"I was using POMM version 1 but your advice is from POMM2 now I m using POMM2 but can t understand how to get session Object .",
"http : pomm.coolkeums.org documentation manual-1.2 findwhere .. . .. . It is possible to use it directly because we are in a Map class hence Pomm knows what table and fields to use in the query .",
"Taking the problem by the other end it seems possible to create dedicated flexible entities that embed a nested set design pattern https : github.com pomm-project ModelManager issues 5 internally to recurse on children .",
"When user logs in the logic is to read the public schema find the private schema number and redirect the user to his private schema - how can i achieve this in POMM http : www.postgresql.org docs 9.1 static ddl-schemas.html .",
"2 When we have multiple schemas with same table structure employee general employee salary data we need one class for working with all schemas - now for each table POMM generates one class .",
"Another idea would be to index results on id giving children for every parent id and using that Pomm iterators are scrollable to fetch them : .. . .. . which outputs : .. . .. . Then the result set would be ordered by parent id so iterator- get parent id would return an array of children entities or null but this looks more like a hack than a real feature .",
"A better solution would be to look into PHP auto-loading http : php.net autoload perhaps a package manager such as Composer http : getcomposer.org if you project is a bit larger .",
"Model classes do link database-relations to PHP entities through a projection so the projection is meant to be overloaded .",
"The error is for the missing Database class .",
"The goal is not to traverse obtained data and build such object in PHP .",
"The idea here is to tweak the model manager so the schema can be guessed thanks to the search path environment variable .",
"Something like this : .. . .. . I want to obtain PHP object with tree structure .",
"If you intend to use only one database unless you are using an injection container I would advise you to directly instanciate a Database instance .",
"By default Pomm s model manager uses each schema like a namespace and does access relations using their fully qualified-name schema.relation .",
"from the link you provided .. . .. . Map classes represent a structure in the database and provide methods to retrieve and save data with this structure .",
"I have simple database-table which implements tree structure via parent id attribute .",
"But entities do not know about database hence they cannot fetch more data using their accessors .",
"after running this command php vendor bin pomm.php pomm : generate : schema-all postgres public I m getting Could not load configuration home ubuntu www pomm2 .pomm cli bootstrap.php",
"My code to load the class is .. . .. . I am missing something I think .",
"@MarcB I think so gist.github.com ilhanyumer 7881805 https : gist.github.com ilhanyumer 7881805",
"@greg by using the setDatabase method",
"Just add the following code in your index.php .. . .. . If you cannot use composer create your own autoload mechanism : .. . .. . at the very begining of your index.php file and it should run fine .",
"I have decided to use the autoloader that you have created manually .",
"It works .",
"gist.github.com ilhanyumer 7882935 https : gist.github.com ilhanyumer 7882935",
"Your Service.php file includes the class Service which has two other class dependencies .",
"You will need to have these classes also loaded prior to you creating a service instance .",
"If the files are located within the same directory as the service class you could just include them before .",
"How does it know what table I want to query",
"Did you read above in that documentation page where it explains what a map class is and gives example of the code for one",
"To be short one table or view one map class .",
"This means that it knows which table YOU want to query because you are calling findWhere from within the map class associated with that table .",
"from the Introspected tables section of the link you provided here is a sample Map Class : .. . .. . in the code below the object name property specifies the table name related to this map class .",
"So object Category will have property subcategories which will be list of Category objects and so on .",
"As for now I get what I want by only in first level .",
"So first level Category has subcategories which is list of Category entities .",
"However next level depth 2 has no subcatogories .",
"Every time a data is fetched from the iterator the converter system turns it into an entity .",
"A trivial idea would be to fetch a single result containing all the results as nested entities : .. . .. . But unfortunately it is not possible to use aggregate-functions in the recursive term of a CTE .",
"Example i have a public schema which stores all the users details and the private schema related to each user .",
"Inside each private schema there are multiple tables example employees general data employees salary data and so on .",
"Thank you for the help .",
"What have you tried so far",
"I tried to generate classes using of ScanSchemaTool .",
"But it is generating classes only for one schema .",
"I have schema1 table 1 table 2 .. . schema2 table 1 this table names are the same for all schemas table 2 I want generate classes one time for wotking with all schemas because only difference is schma name",
"You need a template schema where all the relations in common in all schemas are defined .",
"Generate the models structures and entities for this schema only : .. . .. . For each Model class in the constructor just set the relation without schema information like this : .. . .. . Now in your code just set the search path environment variable like this : .. . .. . Every time you will-change the search path the Template model files will point to tables in different schemas .",
"Yes CLI needs it .",
"after I first time execute cli command In folder appears an empty file with this name PommProject ModelManager SessionBuilder is it normal",
"And second question .",
"Thank you very much .",
"I want select easily multiple row with a specific hstore key .",
"Here fr key .",
"For that I create a extendable ModelI18n for that .",
"You can see here https : gist.github.com jbdelhommeau f145ec2ce3620867582a .",
"It is a good practice to override the default projection",
"Do you have a other idea",
"From what I understand you want to save translations using a HStore field .",
"This projection will make regular queries to be like .. . .. . You can use a JSONB field exactly the same way .",
"The createProjection method you provide is more generic it can be in a GenericModel class extended by other models ."
]
}
|
{
"confidence": [
69.66352081298828,
67.81428527832031,
63.787872314453125,
60.97520065307617,
51.52602767944336,
49.79641342163086
],
"content": [
"Question : I have simple database-table which implements tree structure via parent id attribute . Something like this : .. . .. . I want to obtain PHP object with tree structure . So object Category will have property subcategories which will be list of Category objects and so on . I want to obtain this object directly from PostgreSQL database via recursive sql query with Pomm http : www.pomm-project.org . The goal is not to traverse obtained data and build such object in PHP . I want straight process PostreSQL - Pomm - Object . As for now I get what I want by only in first level . So first level Category has subcategories which is list of Category entities . However next level depth 2 has no subcatogories . So far I have this : .. . .. . My question if this is possible with Pomm and if yes how .. . Answer : What you want to achieve is not really possible directly because in Pomm for performances reasons when a query is performed an iterator wraps the database cursor on results . Every time a data is fetched from the iterator the converter system turns it into an entity . But entities do not know about database hence they cannot fetch more data using their accessors . A trivial idea would be to fetch a single result containing all the results as nested entities : .. . .. . But unfortunately it is not possible to use aggregate-functions in the recursive term of a CTE . Another idea would be to index results on id giving children for every parent id and using that Pomm iterators are scrollable to fetch them : .. . .. . which outputs : .. . .. . Then the result set would be ordered by parent id so iterator- get parent id would return an array of children entities or null but this looks more like a hack than a real feature . Taking the problem by the other end it seems possible to create dedicated flexible entities that embed a nested set design pattern https : github.com pomm-project ModelManager issues 5 internally to recurse on children .",
"Question : I use Pomm 1.1.4 http : pomm.coolkeums.org and I cannot load the class . Here http : api.odtu.lu v1 it says Fatal error : Class Pomm Connection Database not found in users ilhanna public html api v1 Pomm-1.1.4 Pomm Service.php on line 38 There is nothing on line 38 just a comment . My code to load the class is .. . .. . I am missing something I think . Comment : is that class defined as being inside a Pomm namespace Comment : @MarcB I think so gist.github.com ilhanyumer 7881805 https : gist.github.com ilhanyumer 7881805 Comment : If you intend to use only one database unless you are using an injection container I would advise you to directly instanciate a Database instance . Comment : @greg by using the setDatabase method Comment : @ilhan just do db new Pomm Connection Database array .. . Once you have a database instance you can issue as many connection as you want . .. . Answer : Your Service.php file includes the class Service which has two other class dependencies . The error is for the missing Database class . You will need to have these classes also loaded prior to you creating a service instance . If the files are located within the same directory as the service class you could just include them before . A better solution would be to look into PHP auto-loading http : php.net autoload perhaps a package manager such as Composer http : getcomposer.org if you project is a bit larger .",
"Question : I use Pomm 1.1.4 http : pomm.coolkeums.org and I cannot load the class . Here http : api.odtu.lu v1 it says Fatal error : Class Pomm Connection Database not found in users ilhanna public html api v1 Pomm-1.1.4 Pomm Service.php on line 38 There is nothing on line 38 just a comment . My code to load the class is .. . .. . I am missing something I think . Comment : is that class defined as being inside a Pomm namespace Comment : @MarcB I think so gist.github.com ilhanyumer 7881805 https : gist.github.com ilhanyumer 7881805 Comment : If you intend to use only one database unless you are using an injection container I would advise you to directly instanciate a Database instance . Comment : @greg by using the setDatabase method Comment : @ilhan just do db new Pomm Connection Database array .. . Once you have a database instance you can issue as many connection as you want . .. . Answer : I would suggest you use composer to install Pomm and get an autoloader . Download composer.phar from packagist https : packagist.org .. . .. . create a composer.json file like this : .. . .. . and execute the phar to install Pomm . Just add the following code in your index.php .. . .. . If you cannot use composer create your own autoload mechanism : .. . .. . at the very begining of your index.php file and it should run fine . Comment : I have decided to use the autoloader that you have created manually . It works . gist.github.com ilhanyumer 7882935 https : gist.github.com ilhanyumer 7882935",
"Question : We are facing 2 issues could you help us get this solved .. . .. . 1 how to point dynamically to a schema in POMM . Example i have a public schema which stores all the users details and the private schema related to each user . When user logs in the logic is to read the public schema find the private schema number and redirect the user to his private schema - how can i achieve this in POMM http : www.postgresql.org docs 9.1 static ddl-schemas.html . Inside each private schema there are multiple tables example employees general data employees salary data and so on . 2 When we have multiple schemas with same table structure employee general employee salary data we need one class for working with all schemas - now for each table POMM generates one class . Thank you for the help . Comment : What have you tried so far Comment : I tried to generate classes using of ScanSchemaTool . But it is generating classes only for one schema . I have schema1 table 1 table 2 .. . schema2 table 1 this table names are the same for all schemas table 2 I want generate classes one time for wotking with all schemas because only difference is schma name .. . Answer : By default Pomm s model manager uses each schema like a namespace and does access relations using their fully qualified-name schema.relation . The idea here is to tweak the model manager so the schema can be guessed thanks to the search path environment variable . You need a template schema where all the relations in common in all schemas are defined . Generate the models structures and entities for this schema only : .. . .. . For each Model class in the constructor just set the relation without schema information like this : .. . .. . Now in your code just set the search path environment variable like this : .. . .. . Every time you will-change the search path the Template model files will point to tables in different schemas . Comment : after running this command php vendor bin pomm.php pomm : generate : schema-all postgres public I m getting Could not load configuration home ubuntu www pomm2 .pomm cli bootstrap.php Comment : Sorry I look into documentation of POMM2 pomm-project.org documentation sandbox2 http : www.pomm-project.org documentation sandbox2 and see that need create that file manually . Comment : Yes CLI needs it . It must return a configured Pomm instance whatever it comes from . Comment : after I first time execute cli command In folder appears an empty file with this name PommProject ModelManager SessionBuilder is it normal And second question . I was using POMM version 1 but your advice is from POMM2 now I m using POMM2 but can t understand how to get session Object . Thank you very much . Comment : Is this the right answer for my question pomm require .pomm cli bootstrap.php session pomm my db",
"Question : http : pomm.coolkeums.org documentation manual-1.2 findwhere .. . .. . It is possible to use it directly because we are in a Map class hence Pomm knows what table and fields to use in the query . It says that because we are in Map class Pomm knows what table to query . How does it know what table I want to query Comment : Did you read above in that documentation page where it explains what a map class is and gives example of the code for one .. . Answer : from the link you provided .. . .. . Map classes represent a structure in the database and provide methods to retrieve and save data with this structure . To be short one table or view one map class . This means that it knows which table YOU want to query because you are calling findWhere from within the map class associated with that table . from the Introspected tables section of the link you provided here is a sample Map Class : .. . .. . in the code below the object name property specifies the table name related to this map class .",
"Question : I want select easily multiple row with a specific hstore key . Here fr key . You can see the follow structure : .. . .. . I want to obtain this result with Pomm Project http : www.pomm-project.org . For that I create a extendable ModelI18n for that . You can see here https : gist.github.com jbdelhommeau f145ec2ce3620867582a . It is a good practice to override the default projection Do you have a other idea .. . Answer : From what I understand you want to save translations using a HStore field . Model classes do link database-relations to PHP entities through a projection so the projection is meant to be overloaded . This projection will make regular queries to be like .. . .. . You can use a JSONB field exactly the same way . The createProjection method you provide is more generic it can be in a GenericModel class extended by other models ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
object-model
|
UNK_RELATION
|
cdi@dependency-injection@59
|
cdi -- java platform enterprise edition java-ee-5 brought @placeholder di with convention over configuration to enterprise javabeans ejb-3 .0 .
|
{
"confidence": [
41.72125244140625,
39.07133102416992,
38.08250045776367,
37.423587799072266,
36.94229507446289,
36.94229507446289,
36.94229507446289,
36.269142150878906,
36.269142150878906,
36.269142150878906,
36.269142150878906,
36.269142150878906,
36.188507080078125,
35.7823486328125,
35.4441032409668,
34.56464767456055,
34.51703643798828,
34.45527267456055,
34.45527267456055,
34.45527267456055,
34.45527267456055,
34.45527267456055,
34.06311798095703,
33.94282150268555,
33.5483283996582,
33.481605529785156,
33.22492599487305,
33.07428741455078,
33.00244140625,
33.00244140625,
33.00244140625,
32.971946716308594,
32.89799880981445,
32.881874084472656,
32.58071517944336,
32.5332145690918,
32.44416046142578,
32.43213653564453,
32.32166290283203,
32.28101348876953,
32.144798278808594,
31.856904983520508,
31.856904983520508,
31.54513931274414,
31.383283615112305,
31.383283615112305,
31.170852661132812,
31.15068244934082,
30.99347686767578,
30.895727157592773,
30.889183044433594,
30.755273818969727,
30.558244705200195,
30.558244705200195,
30.558244705200195,
30.438323974609375,
30.37668800354004,
30.353553771972656,
30.352449417114258,
30.22844123840332,
30.221797943115234,
30.187650680541992,
29.909486770629883,
29.90035057067871,
29.88050079345703,
29.836442947387695,
29.60848617553711,
29.569412231445312,
29.569412231445312,
29.569412231445312,
29.569412231445312,
29.569412231445312,
29.569412231445312,
29.569412231445312,
29.569412231445312,
29.569412231445312,
29.569412231445312,
29.569412231445312,
29.569412231445312,
29.519853591918945,
29.441890716552734,
29.326013565063477,
29.27193832397461,
29.119037628173828,
29.119037628173828,
29.087284088134766,
29.087284088134766,
29.011404037475586,
28.9781551361084,
28.920654296875,
28.920654296875,
28.59773063659668,
28.59773063659668,
28.50855255126953,
28.393035888671875,
28.393035888671875,
28.393035888671875,
28.38041114807129
],
"content": [
"http : en.wikipedia.org wiki Enterprise JavaBeans .. . .. . Enterprise JavaBeans EJB is a managed server software for modular construction of enterprise software and one of several Java APIs .",
"I have only seen CDI in Java EE .",
"Or if not do the specs CDI or Java EE forbid it",
"Since Java EE 6 @Inject supersede @EJB .",
".. . .. . AFAIK since Java EE 6 you can use @Inject instead of @EJB when injecting CDI managed beans .",
"I have Java EE application web and ejb modules in one ear and OmniFaces and CDI is used in web part .",
"The Transactional annotation has precisely been introduced in Java EE 7 to make non-EJB managed CDI beans transactional .",
"CDI 1.1 with default Weld java-ee 7 Maven dependency .",
"This works only in at least Java EE 7 + CDI 1.1 server .",
"This is a Dynamic Web Project with CDI using Java EE 6 .",
"In Java EE 7 CDI 1.1 injection of HttpServletRequest is supported out of the box .",
"In Java EE 6 CDI 1.0 however this is not supported out of the box .",
"CDI 1.0 has been added to the Java EE specs with Java EE 6 .",
"I am using Java EE 6 and tend to use more CDI than EJB injection .",
"Is it possible to do something like this in Java EE 6 CDI",
"Injection already existed in Java EE 5 with the @Resource @PersistentUnit or @EJB annotations for example .",
"Use CDI interceptor made by my self or ones like CODI http : matthiaswessendorf.wordpress.com 2010 11 20 enterprise-java-without-ejbs-but-with-cdi-and-myfaces-codi .. . 3 .",
"One of the most distinguished feature of CDI of Java EE 6 is type safety .",
"Why is Java EE 6 CDI missing the @ViewScoped and @FlashScoped annotations",
"Hy there .. . .. . I am absolutely fresh to Java EE and CDI .",
"beans.xml is no longer required in CDI 1.1 Java EE 7 .",
"I m trying to create a Java EE 7 project with explicit CDI .",
"For using CDI in Java EE you obviously need a Java EE Container a plain old application with a main method won t do .",
"When using CDI in Java EE 7 CDI 1.1 the default bean discovery mode is annotated .",
"CDI annotated beans however extend far beyond the realm of the web tier which is why the Java EE spec is evolving to make CDI the standard bean and DI mechanism .",
"WebLogic 11g is a Java EE 5 application server .",
"https : docs.oracle.com javaee 7 api javax enterprise inject spi CDI.html .. . .. . With all the AnnotationHell in Java EE people forget how to code .",
"In Java EE 7 JSF will adopt CDI and the javax.faces.bean will eventually be deprecated deprecation is a slow process in Java EE though which is both good and bad .",
".. . .. . The overall objective is to provide the full range of CDI injections simple @Inject as well as Java EE resources like @PersistenceContext @Resource @EJB etc .",
"In Java ee we have many containers that manage life cycle of their objects like JSF container EJB container CDI container Servlet container etc .",
"I m working on a web application with Java EE 6 JSF CDI EJB which should not allow concurrent logins same user and pass .",
"I m working on a Java EE application primarily JAX-RS with a JSF admin console that uses CDI Weld for dependency-injection with javax.enterprise.context.ApplicationScoped http : download.oracle.com javaee 6 api javax enterprise context ApplicationScoped.html objects .",
"Weblogic 10.3.6 is a Java EE 5 container and therefore does not support CDI out-of-the-box .",
"I am making a Java EE based product in which I m using GlassFish 3 and EJB 3.1 .",
"Problem .. . .. . Injecting an enterprise java bean with @EJB in an application-client launched with Java web start and from a GlassFish 3.1.2.2 build 5 server. . works as long as the requirements are fulfilled see note at bottom .",
"Java EE 7 Full profile .. . 3 .",
"As you already noticed setting up all dependencies of non-trivial java systems like ejb cdi manually is difficult .",
"If you test with CDIUnit the only thing you get is CDI injections not the full power of Java EE .",
"The 2 vanished since Java EE 5 .",
"@Gas : @Inject enjoys higher precedence over @EJB since Java EE 6 .",
"Assuming you have Maven project add a dependency on EJB api the implementation will be provided by your Java EE application server .",
"Except strictly Java EE-oriented features what CDI features make sense on Java SE as well",
"Except strictly Java EE-oriented features what CDI features make sense on Java SE as well",
"Especially since EJB and CDI seem to work very much the same way in Java EE 7 in all other cases @Inject + @EJB in POJOs.. . .. . .. . Is this difference documented somewhere or is it a bug",
"As OP is already at JSF 2.2 Java EE 7 he s strongly encouraged to move to CDI @Named .",
"Thus you will end up with two instances of CDIServletRequestProducingListener - one managed by the Java EE container one managed by the CDI-container .",
"In fact CDI will detect EJB beans and turn them into CDI beans as well .",
"Note : Though the question is tagged hk2 questions tagged hk2 and cdi questions tagged cdi I imagine this question could be answered by anyone knowledgeable in DI as I don t think the term is strictly tied to Java DI .",
"At some time Pax CDI was planned to be the official reference implementation of the CDI Service specified by the OSGi Enterprise Expert Group .",
"I m using Websphere 8.5 and its internal Java EE frameworks Apache OpenWebBeans for DI Apache MyFaces for view .",
"To set up a learning CDI environment all you need is a CDI implementation such as the Weld reference implementation you don t need a Java EE container .",
"I m using Javaa EE 6 CDI 1.0 EJB 3.1 Glassfish 3.2",
"TomEE as being a true Java EE container already provides among others JSF and CDI out the box .",
"This will make all beans of your archive available for injection same behavior than Java EE 6 CDI 1.0 .",
"@Inject can inject any managed-bean and is a part of the new CDI specification since Java EE 6 .",
"in the Java EE server .",
"Dependency injection will work in your case as long as you don t try to inject any Java EE objects or use any CDI features that require a Java EE container .",
"When CDI was released with Java EE 6 it was regarded as the managed-bean framework for that platform and of course EJBs outdated them all having been around for well over a decade .",
"http : stackoverflow.com questions 13487987 where-to-use-ejb-3-1-and-cdi makes me think the EJB container should be aware of CDI interceptors etc .",
"JSF CDI EJB etc .",
"CDI EJB works pretty well together .",
"Also note : As per CDI specification link http : docs.jboss.org cdi spec 1.2 cdi-spec.html javaee components passage 3.6 java-ee beans are NOT consideres managed beans .",
"I need to use CDI on that EJB .",
"CDI Beans .. . .. . CDI is the bean management and dependency-injection framework that was released as part of Java EE 6 and it includes a complete comprehensive managed-bean facility .",
"So something like this : .. . .. . In Java EE 7 and CDI 1.1 we removed the requirement to include the beans.xml deployment-descriptor to turn on CDI for an archive bringing CDI 1.1 in line with most other Java EE APIs where deployment descriptors are optional .",
"This is not CDI Qualifier specific its a Java annotation issue .",
"Doesn t the Java EE specs state that the configuration-files are optional",
"In Java EE 6 your named CDI bean can btw also directly be mapped to a path using JAX-RS .",
"Non-Java EE containers like Tomcat and Jetty doesn t ship with CDI bundled .",
"See Oracle Java EE Tutorial https : docs.oracle.com javaee 7 tutorial cdi-basic013.htm",
"JSF Managed Beans .. . .. . In short don t use them if you are developing for Java EE 6 and using CDI .",
"CDI finished rather late in the Java EE 6 cycle and both JSF 2 JAX-RS were already done .",
"I think it was the overlap of injection methods between CDI and some of the rest of the Java EE acronym soup that confused me .",
"If that were to happen all managed beans in Java EE could become CDI beans .",
"I am migrating an application to Java EE 7 and would like to CDI 1.1 .",
"As documented in the Java EE 7 Tutorial : .. . .. . CDI can only manage and inject beans annotated with a scope type in an implicit archive .",
"CDI is readily available in Java EE Web Profile compatible containers such as WildFly TomEE and GlassFish .",
"Available to all Java EE components including CDI JSF @ManagedBean @WebServlet @WebListener @WebFilter etc .",
"Since Java EE 7 and JTA 1.2 you can use transactional interceptor in CDI with @Transactional annotation .",
"No because EJB are Transactional by default convention over configuration approach so it s normal you get specific annotation .",
"Injecting entityManager using @PersistenceContext into AbstractDAO is not part of standalone CDI it is only supported when application is running within a Java EE application server .",
"You re not going to learn Java EE by using a Java SE Weld package .",
"Seems that CDI does understand what EJB is so in Java EE 6 compliant server in your servlet you can write both .. . .. . and .. . .. . that s what can make you confusing but that s probably the only thing which is the bridge between EJB and CDI .",
"I m using Java EE 6 .",
"There is no inherent mechanism for this in Java EE 6 .",
"AFAIK since Java EE 6 you can use @Inject instead of @EJB .",
"Until Java EE 7 only EJB was transactional and the @Transactional annotation didn t exist .",
"Your setup is ok for learning CDI in Java SE .",
"Your bean is an EJB before being a CDI bean .",
"Is your producer a CDI bean or an EJB",
"Is it permitted to make such calls in EJB and CDI",
"Hence the @Typed http : docs.jboss.org cdi api 1.2 javax enterprise inject Typed.html annotation is used to prevent @Inject ambiguity .",
"CDI is more firepower than is needed in many cases especially non-enterprise literally cases .",
"JSR-330 dependency-injection can be applied to both Java SE and Java EE environments while JSR-299 is titled Contexts and Dependency Injection for the Java EE platform .",
"Today Agorava is build on CDI to ease its usage in Java EE stack but we want to provide an implementation with Dagger to have a lighter solution working for Android .",
"CDI provides an alternative versatile and more powerful mechanism for dependency-injection bean and general resource management within the Java EE space .",
"Currently JSF and CDI annotated beans are interchangeable within any given Java EE web application given a handful of minor restrictions .",
"I m currently using : .. . GlassFish 3 .. . Java EE 6"
]
}
|
{
"confidence": [
56.09202194213867,
54.780521392822266,
53.832489013671875,
52.83077621459961,
52.34000778198242,
51.90906524658203,
51.632972717285156,
51.208213806152344,
50.59252166748047,
50.52093505859375,
50.22587203979492,
49.89350128173828,
49.82542037963867,
48.792110443115234,
48.73509979248047,
48.385711669921875,
48.123374938964844,
47.22404861450195,
46.984622955322266,
46.827369689941406
],
"content": [
"Question : I ve tried CDI injection and @EJB injection of Stateless EJBs in a Rivr dialog . They don t work . I ve also tried JNDI lookup of the EJBs through the Global JNDI name but I get following error note I am using java : global but I get this message : .. . .. . A JNDI operation on a java : comp env name cannot be completed because the current thread is not associated with a Java Enterprise Edition application component . This condition can occur when the JNDI client using the java : comp env name does not occur on the thread of a server application request . Make sure that a Java EE application does not run JNDI operations on java : comp env names within static code blocks or in threads created by that application . Such code does not necessarily run on the thread of a server application request and therefore is not supported by JNDI operations on java : comp env names . .. . .. . Is there anyway I can inject or locate CDI @Named or EJBs in a Rivr dialog thanks Ignacio Comment : I am not familiar with Rivr but from the documentation page https : github.com nuecho rivr wiki Getting-Started I do not see any connection of the library to Java EE platform . In order to access EJB and CDI beans you need to run your application as a WAR or EAR on a JavaEE application server . Can you post some code-snippets of how you use Rivr and how you want to inject an EJB using JNDI Comment : It seems like the more appropriate question is how are you deploying your rivr based application Comment : Hello the app is run as a standard War . The problem was not related to how I am running the Rivr app as I was using a JEE7 app server and Injecting CDI and EJBs successfully in other places of my code . The problem was that Rivr default Dialogs are ran in a thread out of JEE or Servlet context so EJBs were not accessible even in the JNDI tree . I just posted the solution hoping it can help someone else . .. . Answer : I examined the Spring example in Rivr cookbook and found that the DialogFactories are executed in the ServletThread . This allowed me to perform a standard JNDI lookup using the Global JNDI name successfully and pass the EJBs to the Dialog being created . Rivr team confirmed this by email and I am now successfully accessing EJBs that way . I could not perform standard @Inject or @EJB injections but the JNDI traditional solution worked for me .",
"Question : My company has tomcat 7 as distributed environement . I d like to get JSF2 and CDI working together on tomcat 7 . This is possible with not a lot of surprises as described here : http : www.theserverside.com tutorial Working-with-CDI-and-JSF-20-on-Tomcat-7-Configuring-Weld .. . .. . My problem is about transaction without Java EE 3 solutions comes to me : .. . .. . 1 . Do it by hand : em.getTransaction .begin .. . .. . 2 . Use CDI interceptor made by my self or ones like CODI http : matthiaswessendorf.wordpress.com 2010 11 20 enterprise-java-without-ejbs-but-with-cdi-and-myfaces-codi .. . 3 . Use spring transaction but as far as I know there is a problem between JSR 299 330 and it needs some glue to work : http : matthiaswessendorf.wordpress.com 2010 05 06 using-cdi-scopes-with-spring-3 .. . .. . So where would you go if you were me CODI seems nice to me . thx .. . Answer : Change to Google Guice like me : .. . .. . For latest project I use JSF2 + Primefaces + Google Guice + EclipseLink .. . .. . This solution make code clean easy and ready to make unit test . with TestNG Comment : I haven t done anything with Guice does it have transaction control I thought it just did DI . Comment : Guice have transaction Just put @Transaction on method .",
"Question : In CDI there is the @ApplicationScoped and the javax.inject @Singleton pseudo-scope . What is the difference between them Besides the fact that @ApplicationScoped is proxied and @Singleton is not . Can I just change my @Singleton bean to @ApplicationScoped Can @ApplicationScoped bean have two or more instances Comment : Have you read the Weld reference http : docs.jboss.org weld reference 1.1.0.Final en-US pdf weld-reference.pdf There is some explanation about the practical differences between @ApplicationScoped and @Singleton at its section 5.4 p . 36 . Comment : I also find the summary of differences at the end of this article germanescobar.net 2010 04 http : germanescobar.net 2010 04 4-areas-of-possible-confusion-in-jee6.html useful .. . Answer : in short : You can even mix it @Singleton and @ApplicationScoped and it makes sense in some scenarios . and works as expected in mine Additionally to the other answers so far I d like to add some more points for clarification in real world scenarios . For me this question developed out of How do I force an application-scoped bean to instantiate at application startup http : stackoverflow.com a 34871843 1915920 In some discussion there I stated this and can t find a valid argument against it so far : .. . .. . In a lot of real-life scenarios setups I would say it s hard to definitely say - from an abstract modelling point of view - whether something is or will become be treated like an EJB or an application-scoped managed-bean . .. . .. . debatable but not conclusive arguments from my point of view against it so far : @BalusC and all others : I d like to see them beeing conclusive but if not the above may hold true and nevertheless the arguments may still help the reader to get the differences advantages disadvantages bad good practices .. . .. . EJB vs . Managed Bean .. . .. . BalusC : That s an EJB not a managed-bean which is quite different . EJBs run in backend and managed beans in frontend . EJBs run in transactional context too . .. . You just confused enterprise beans with managed beans and I just pointed out that . but : .. . .. . me : I think you are not quite correct and overstating the meaning usage and it looks debatable to me . http : en.wikipedia.org wiki Enterprise JavaBeans .. . .. . Enterprise JavaBeans EJB is a managed server software for modular construction of enterprise software and one of several Java APIs . EJB is a server-side software component that encapsulates the business logic of an application . .. . .. . Types of Enterprise Beans .. . .. . Session Beans 3 that can be either Stateful Stateless or Singleton .. . .. . .. . Message Driven Beans .. . .. . .. . .. . which still holds true in my case . Singleton EJB vs . Application Scoped Bean .. . .. . Locking .. . .. . BalusC : A singleton EJB isn t the same as an application scoped bean . A singleton EJB is read-write locked and thus potentially inefficient overconvoluted for the task you had in mind . Long story short : Grab a good Java EE book and learn to use the right tool for the job . One way definitely isn t the other way . That it works doesn t mean that it s the right tool . A sledgehammer is capable of fastening a screw but it isn t necessarily the right tool to that : .. . .. . but : .. . .. . I can t see the sledgehammer here - sorry .. . It s good to know the locking defaults I was not aware of it but this seems to be incorrect again : Oracle Java EE 6 Tutorial on Managing Concurrent Access in a Singleton Session Bean https : docs.oracle.com cd E19798-01 821-1841 gipsz index.html .. . .. . When creating a singleton session-bean concurrent access to the singleton s business methods can be controlled in two ways : container-managed concurrency and bean-managed concurrency . .. . .. . .. . Although by default singletons use container-managed concurrency the @ConcurrencyManagement CONTAINER annotation may be added at the class level of the singleton to explicitly set the concurrency management type",
"Question : JSR-330 dependency-injection can be applied to both Java SE and Java EE environments while JSR-299 is titled Contexts and Dependency Injection for the Java EE platform . Except strictly Java EE-oriented features what CDI features make sense on Java SE as well Any examples available Thanks Revised Here s Weld on JSE . http : docs.jboss.org weld reference latest en-US html environments.html d0e5571 .. . Answer : Except strictly Java EE-oriented features what CDI features make sense on Java SE as well Any examples available Thanks Well the one mentioned in the Weld documentation : .. . .. . 18.4 . Java SE http : docs.jboss.org weld reference latest en-US html environments.html d0e5571 .. . .. . In addition to improved integration of the Enterprise Java stack the Contexts and Dependency Injection for the Java EE platform specification also defines a state of the art typesafe stateful dependency-injection framework which can prove useful in a wide range of application types . To help developers take advantage of this Weld provides a simple means for being executed in the Java Standard Edition SE environment independently of any Java EE APIs . .. . When executing in the SE environment the following features of Weld are available : .. . .. . Managed beans with @PostConstruct and @PreDestroy lifecycle callbacks .. . Dependency injection with qualifiers and alternatives .. . @Application @Dependent and @Singleton scopes .. . Interceptors and decorators .. . Stereotypes .. . Events .. . .. . This obviously makes sense in a Java SE context .",
"Question : I feel there is a little mess in the Java EE 6 spec . There are several sets of annotations . We have javax.ejb annotations like @Stateful and @Stateless for creating EJBs . There is also a @javax.annotation.ManagedBean to create a managed-bean . There are annotations in javax.enterprise.context like @SessionScoped and @RequestScoped . What is more there are also @ManagedBean and @SessionScoped @RequestScoped annotations in javax.faces.bean package . And to make things event more complicated there is a package javax.inject with @Named annotation . Can someone please describe how they are related one to another Where can I use @EJB @Inject or @ManagedPropery to inject other beans Comment : See also : stackoverflow.com questions 4684112 http : stackoverflow.com questions 4684112 how-do-cdi-and-ejb-compare-interact 4705840 4705840 .. . Answer : First of all let me do some clarifications : .. . .. . Managed bean definition : generally a managed-bean is an object that its life cycle construction destruction etc is managed by a container . In Java ee we have many containers that manage life cycle of their objects like JSF container EJB container CDI container Servlet container etc . All of these containers work kind of independent they boot in application server initialization and scan classes of all artifacts including jar ejb-jar war and ear files in deployment time and gather and store some metadata about them then when you need an object of a class at runtime they will give you instances of those classes and after finishing the job they will destroy them . So we can say that we have : .. . .. . JSF managed beans .. . CDI managed beans .. . EJB managed beans .. . And even Servlets are managed beans because they are instantiated and destroyed by a container which is a servlet container . So when you see the Managed Bean word you should ask about the context or type of it . JSF CDI EJB etc . Then you might ask why we have many of these containers : AFAIK Java EE guys wanted to have a dependency-injection framework but they could not gather all requirements in one specification because they could not predict the future requirements and they made EJB 1.0 and then 2.0 and then 3.0 and now 3.1 but EJB s target was for just some requirements transaction distributed component model etc . At the same time in parallel they realized that they need to support JSF too then they made JSF managed beans and another container for JSF beans and they considered it a mature DI container but still it was not complete and mature container . After that Gavin King and some other nice guys made CDI which is the most mature DI container I ve seen . CDI inspired by Seam2 Guice and Spring was made to fill the gap between JSF and EJB and lots of other useful stuff like pojo injection producer methods interceptors decorators integration SPI very flexible etc . and it can even do what EJB and JSF managed beans are doing then we can have just one mature and powerful DI container . But for some backward compatibility and political reasons Java EE guys want to keep them Here you can find the difference and use cases for each of these types : .. . .. . JSF Managed Beans CDI Beans and EJBs .. . .. . JSF was initially developed with its own managed-bean and dependency-injection mechanism which was enhanced for JSF 2.0 to include annotation based beans . When CDI was released with Java EE 6 it was regarded as the managed-bean framework for that platform and of course EJBs outdated them all having been around for well over a decade . The problem of course is knowing which one to use and when use them . Let s start with the simplest JSF Managed beans . JSF Managed Beans .. . .. . In short don t use them if you are developing for Java EE 6 and using CDI . They provide a simple mechanism for dependency-injection and defining backing beans for web pages but they are far less powerful than CDI beans . They can be defined using the @javax.faces.bean.ManagedBean annotation which takes an optional name parameter . This name can be used to reference the bean from JSF pages . Scope can be applied to the bean using one of the different scopes defined in the javax.faces.bean package which include the request session application view and custom scopes . JSF beans cannot be mixed with other kinds of beans without some kind of manual coding . CDI Beans .. . .. . CDI is the bean management and dependency-injection framework that was released as part of Java EE 6 and it includes a complete comprehensive managed-bean facility . CDI beans are far more advanced and flexible than simple JSF managed beans . They can make use of interceptors conversation scope Events type safe injection decorators stereotypes and producer methods . To deploy CDI beans you must place a file called beans.xml in a META-INF folder on the classpath . Once you do this then every bean in the package becomes a CDI bean . There are a lot of features in CDI too many to cover here but as a quick reference for JSF-like features you can define the scope of the CDI bean using one of the scopes defined in the javax.enterprise.context package namely request conversation session and application scopes . If you want to use the CDI bean from a JSF page you can give it a name using the javax.inject.Named annotation . To inject a bean into another bean you annotate the field with javax.inject.Inject annotation . Automatic injection like that defined above can be controlled through the use of Qualifiers that can help match the specific class that you want injected . If you have multiple payment types you might add a qualifier for whether it is asynchronous or not . While you can use the @Named annotation as a qualifier you shouldn t as it is provided for exposing the beans in EL . CDI handles the injection of beans with mismatched scopes through the use of proxies . Because of this you can inject a request scoped bean into a session scoped bean and the reference will still be valid on each request because for each request the proxy re-connects to a live instance of the request scoped bean . CDI also has support for interceptors events the new conversation scope and many other features which makes it a much better choice over JSF managed beans . EJB .. . .. . EJBs predate CDI beans and are in someways similar to CDI beans and in other ways very different . Primarily the differences between CDI beans and EJBs is that EJBs are : .. . .. . Transactional .. . Remote or local .. . Able to passivate stateful beans freeing up resources .. . Able to make use of timers .. . Can be asynchronous .. . .. . The two types of EJBs are called stateless and stateful . Stateless EJBs can be thought of as thread safe single-use beans that don t maintain any state between two web requests . Stateful EJBs do hold state and can be created and sit around for as long as they are needed until they are disposed of . Defining an EJB is simple you just add either a javax.ejb.Stateless or javax.ejb.Stateful annotation to the class . Stateless beans must have a dependent scope while a stateful-session-bean can have any scope . By default they are transactional but you can use the transaction attribute annotation . While EJBs and CDI beans are very different in terms of features writing the code to integrate them is very similar since CDI beans can be injected into EJBs and EJBs can be injected into CDI beans . There is no need to make any distinction when injecting one into the other . Again the different scopes are handled by CDI through the use of proxying . One exception to this is that CDI does not support the injection of remote EJBs but that can be implemented by writing a simple producer method for it . The javax.inject.Named annotation as well as any Qualifiers can be used on an EJB to match it to an injection point . When to use which bean .. . .. . How do you know when to use which bean Simple . Never use JSF managed beans unless you are working in a servlet container and don t want to try and get CDI working in Tomcat although there are some Maven archetypes for that so there s no excuse . In general you should use CDI beans unless you need the advanced functionality available in the EJBs such as transactional functions . You can write your own interceptor to make CDI beans transactional but for now it s simpler to use an EJB until CDI gets transactional CDI beans which is just around the corner . If you are stuck in a servlet container and are using CDI then either hand written transactions or your own transaction interceptor is the only option without EJBs . If you need to use @ViewScoped in CDI you should .. . .. . use seam-faces http : seamframework.org Seam3 FacesModule or MyFaces CODI http : myfaces.apache.org extensions cdi download.html module . just add one of them to your classpath and @ViewScoped will work in CDI . MyFaces CODI has an even more solid support of @ViewScoped .. . use MyFaces CODI s @ViewAccessScoped it is an extension written on top of CDI by Apache just download http : myfaces.apache.org extensions cdi download.html it and use @ViewAccessScoped annotation instead of @ViewScoped . Use CDI @ConversationScoped and make it long running . See here for more info http : www.andygibson.net blog tutorial pattern-for-conversational-crud-in-java-ee-6 . Use Omnifaces http : showcase.omnifaces.org cdi ViewScoped @ViewScoped annotation .. . .. . Some parts gotten from here http : www.andygibson.net blog article comparing-jsf-beans-cdi-beans-and-ejbs . Comment : This is great Thanks To be complete just tell how to inject CDI or EJB bean into JSF bean . Is the @ManagedProperty someBean the proper way Comment : Nope it won t work . just turn your jsf managed-bean to CDI managed-bean by annotating it using @Named and @javax.enterprise.context.RequestScoped and use CDI injection using @Inject annotation . don t use jsf managed beans if you don t have to . Comment : JEE guys want to keep them - It s a bit more subtle than that . CDI finished rather late in the Java EE 6 cycle and both JSF 2 JAX-RS were already done . They had enhanced resp . introduced their own managed-bean facility already . Had CDI been available a little earlier things might have looked differently . In Java EE 7 JSF will adopt CDI and the javax.faces.bean will eventually be deprecated deprecation is a slow process in Java EE though which is both good and bad . Comment : When you say : To deploy CDI beans you must place a file called beans.xml in a META-INF folder on the classpath . Once you do this then every bean in the package becomes a CDI bean . Do you mean every bean also becomes a CDI bean in addition to what it was What if I have JSF ManagedBeans with ManagedBean and ViewScoped . They are still JSF Managed Beans right Comment : Someone able to do an update for Java EE 7 on this great article",
"Question : I have found this question : What is the difference between @Inject and @EJB http : stackoverflow.com questions 5889767 what-is-the-difference-between-inject-and-ejb but I did not get any wiser . I have not done Java EE before nor do I have experience with dependency-injection so I do not understand what I should use Is @EJB and old way of injecting Is the injection done by the EJB container when using this annotation while using @Inject use the new CDI framework Is that the difference and should I be using @Inject instead of @EJB if this is the case .. . Answer : Injection already existed in Java EE 5 with the @Resource @PersistentUnit or @EJB annotations for example . But it was limited to certain resources datasource EJB . . . and into certain components Servlets EJBs JSF backing bean . . . . With CDI you can inject nearly anything anywhere thanks to the @Inject annotation .",
"Question : I found that a new thread created in the servlet donot contain the servlet CDI context . I created a HelloWorld servlet given below to experiment with this problem . In the below example you ll see that I am running doIt function in a new Thread FutureTask . But it returns NULL but when I call doIt method directly BeanManager is not NULL . I searched online but could not find a good reference than saying it is possible . It would be great if anybody can help me or provide me with some good pointers to inject pass context into the new thread . Comment : Yes this looks awkward but I need this for my own logic and project requirement . This is just an example . That is why I am interested in knowing whether I can do this way or not . Similar to me : stackoverflow.com questions 21284191 cdi-multithreading http : stackoverflow.com questions 21284191 cdi-multithreading .. . Answer : If you are using EJB 3.1 and Java EE 6 or greater the notation @Asynchronous http : docs.oracle.com javaee 6 api javax ejb Asynchronous.html on a method makes it run in a separate thread and takes care of managing resources etc . If you need more control as pointed out by Kalpesh Soni this answer describes http : stackoverflow.com a 19404307 1270789 how to use ManagedExecutorService https : concurrency-ee-spec.java.net javadoc javax enterprise concurrent ManagedExecutorService.html if you have Java EE 7 or greater . Additionally I m not sure if you really need that getBeanManager static method - wouldn t just @EJB BeanManager beanManager or @Inject suffice Comment : Thanks . I solved it with your recommendation . I ll post the solution source to the problem soon so that guys looking for similar answers would be helpful for them .",
"Question : Java EE7 consists of a bunch of bean definitions : .. . .. . Managed Beans 1.0 JSR-316 JSR-250 .. . Dependency Injection for Java 1.0 JSR-330 .. . CDI 1.1 JSR-346 .. . JSF Managed Beans 2.2 JSR-344 .. . EJB 3.2 JSR-345 .. . .. . In order to get rid of the chaos in my mind I studies several articles of when to use which bean type . One of the pros for EJB seems to be that they alone support declarative container-managed transactions the famous transaction annotations . I m not sure though if this is correct . Can anyone approve this Meanwhile I came up with a simple demo application to check if this was actually true . I just defined a CDI bean not an EJB - it has no class level annotations as follows based on this http : stackoverflow.com a 6259691 1399395 snippet : .. . .. . Now the outcome on GlassFish 4.0 is that this method actually returns true which according to my inquiries is not working as expected . I did expect the container to ignore the @Transactional annotation on a CDI bean method or to even throw an exception . I use a freshly-installed GlassFish 4 server so there are no interferences . So my question is really : .. . .. . Which bean types do actually support container-managed transactions Just for the sake of curiosity how could I test it with a simple demo application if the code above is wrong BTW : Someone described a similar problem here http : stackoverflow.com questions 6908191 cdi-transactionattribute-for-bean but its solution does not apply to my case . Comment : In order to get rid of the chaos in my mind so true .. . Answer : Until Java EE 7 only EJB was transactional and the @Transactional annotation didn t exist . Since Java EE 7 and JTA 1.2 you can use transactional interceptor in CDI with @Transactional annotation . To answer your question about the best type of bean to use the answer is CDI by default . CDI beans are lighter than EJB and support a lot of feature including being an EJB and is activated by default when you add beans.xml file to your app . Since Java EE 6 @Inject supersede @EJB . Even if you use remote EJBs feature not existing in CDI the best practice suggest that you @EJB once to inject remote EJB and a CDI producer to expose it as a CDI bean .. . .. . The same is suggested for Java EE resources .. . .. . These producers will be used later .. . .. . EJB continue to make sense for certain services they include like JMS or Asynchronous treatment but you ll use them as CDI bean . Comment : Oh now I see . I did actually confuse javax.ejb.TransactionAttribute from the EJB spec which is part of JEE5+ and javax.transaction.Transactional which was added in the new JTA 1.2 spec which is now part of JEE7 . So it s great news If I got you right this might then kill off the EJB layer for mid-size applications . Comment : Yet another side note : Having transactional attributes from both JTA and EJB spec is then just another confusing DRY violation in the JEE ecosystem right Can javax.ejb.TransactionAttribute now be considered deprecated even for EJBs Comment : No because EJB are Transactional by default convention over configuration approach so it s normal you get specific annotation . Plus you can do advanced transactions stuff with EJBs like a nested transactions or manage XA transactions . But remember when you need EJB it can and should always be a CDI bean . And yes CDI can replace EJB for a light application . Comment : I see . However in my opinion they should have centralized all transaction stuff in the JTA spec and no more EJB-specific transaction handling . But let s stop discussion here . Thank you for your clarifications . Comment : I d say use @Inject only if you want to let the container automatically deal with the normally scoped life cycle all but @Dependent of a @Stateful EJB and also let the container pass around the stateful reference for you . Otherwise you might end up with illegally combined scopes CDI 1.1 section 3.2 or try to lookup a @Remote EJB which will fail without the bloated hack posted in the answer above . Looking for an EJB Use @EJB . Using @Inject makes sense only for @Stateful with a declared CDI scope .",
"Question : I m working on a Java EE application primarily JAX-RS with a JSF admin console that uses CDI Weld for dependency-injection with javax.enterprise.context.ApplicationScoped http : download.oracle.com javaee 6 api javax enterprise context ApplicationScoped.html objects . Minor debugging issues aside CDI has worked beautifully for this project . Now I need some very coarse-grained control over CDI-injected object lifecycles . I need the ability to : .. . .. . Remove an injected object from the application context or .. . Destroy delete clear reset remove the entire application context or .. . Define my own @ScopeType and implementing Context http : docs.jboss.org weld reference 1.0.0 en-US html scopescontexts.html d0e1654 in which I could provide methods to perform one of the two above tasks . I m fully aware that this is across if not against the grain of CDI and dependency-injection in general . I just want to know .. . .. . Is this remotely possible If yes what is the easiest simplest quickest foolproofiest way to get the job done Comment : just curious : what if these objects are simply global objects i.e . some static fields . No DI is involved . In your specific application can you attest that DI is really valuable for you app scope objects Comment : That s not going to fly for this app . I m not just using DI because it s shiny . Comment : I don t think this goes against the grain of DI at all - after all the CDI specification was created to address precisely the matter of scope lifecycle and explicitly allows the creation of new scopes Granted recreating a particular bean in a context is not the CDI way .. . Answer : In CDI 1.1 there is a javax.enterprise.context.spi.AlterableContext interface which allows you to individually destroy a bean instance . All normal scopes request conversation session are alterable . The beanManager here is a javax.enterprise.inject.spi.BeanManager instance . You can get it via JNDI lookup : .. . .. . or via CDI static method : .. . .. . but be aware of the issues with the static method in some Weld versions : .. . .. . javax.enterprise.inject.spi.CDI implementation does not support multiple deployments https : issues.jboss.org browse WELD-1551 .. . CDI.current .getBeanManager returns a beanmanager from a different deployment https : issues.jboss.org browse WFLY-2481 .",
"Question : Well i need use @Schedule EJB to put a task in crontab . I know that CDI dont have this unhappy just EJB . All my beans are CDI-Managed so i have some doubts to include EJB inside this project i hope that you can help me : .. . .. . 1 I ll create a new bean to use @Schedule but i dont know if this bean should use @Singleton EJB or @Named + @RequestScoped CDI . My ideia is that : .. . .. . Note that i have a CDI Bean inside a EJB Bean this is possible This above bean is correct 2 How can i add the ejb to my pom.xml 3 If i add EJB to my project can have any conflicts Because my project is already in production . Comment : Can you give me some example how to do it only with CDI Comment : You can create scheduled Executors with JDK 8 . What s the problem Comment : I know how to inject the bean with Spring . Not sure how to do the same with CDI but I ll bet it s similar . Comment : I didn t use Spring . Comment : I know that but dependency-injection in Java EE was practically written by Rod Johnson . I m sure the annotations are similar . Create one of these and inject it as you know how : docs.oracle.com javase 8 docs api java util concurrent https : docs.oracle.com javase 8 docs api java util concurrent Executors.html .. . Answer : To dispel your worries : .. . .. . 1 CDI Bean inside a EJB Bean this is possible CDI EJB works pretty well together . In fact CDI will detect EJB beans and turn them into CDI beans as well . So if you create say @Stateful bean it will be picked up as CDI bean as well . That means you will be able to perform any CDI-related magic there while still having EJB features . As for choice of annotation @Singleton sounds reasonable or probably @Stateful . @RequestScoped would only live during request and die afterwards hence killing your periodic task . Choose scope based on nature of your task one bean vs many short lived vs permanent . . . Just make sure you make it an EJB bean and CDI will follow . 2 How can i add the ejb to my pom.xml Assuming you have Maven project add a dependency on EJB api the implementation will be provided by your Java EE application server . 3 If i add EJB to my project can have any conflicts Too general question I am afraid I do not know your project . But I ll go ahead and say no . At least as far as CDI and EJB goes you should be able to deal with it . Comment : Very helpful informations but a last question : Do i need a Application Server Jboss Glassfish TomEE to run EJB Can i run in tomcat7 Comment : Tomcat in a servlet and as such is not required to support EJB . You will need a proper server . The easiest way to adopt one assuming you have Tomcat now is probably TomEE . By the way if you find this information sufficient please mark my answer as a solution . Comment : thanks for help @Siliarus",
"Question : I have found this question : What is the difference between @Inject and @EJB http : stackoverflow.com questions 5889767 what-is-the-difference-between-inject-and-ejb but I did not get any wiser . I have not done Java EE before nor do I have experience with dependency-injection so I do not understand what I should use Is @EJB and old way of injecting Is the injection done by the EJB container when using this annotation while using @Inject use the new CDI framework Is that the difference and should I be using @Inject instead of @EJB if this is the case .. . Answer : The @EJB is used to inject EJB s only and is available for quite some time now . @Inject can inject any managed-bean and is a part of the new CDI specification since Java EE 6 . In simple cases you can simply change @EJB to @Inject . In more advanced cases e.g . when you heavily depend on @EJB s attributes like beanName lookup or beanInterface than in order to use @Inject you would need to define a @Producer field or method . These resources might be helpful to understand the differences between @EJB and @Produces and how to get the best of them : .. . .. . Antonio Goncalves blog : .. . CDI Part I http : agoncal.wordpress.com 2011 04 07 injection-with-cdi-part-i .. . CDI Part II http : agoncal.wordpress.com 2011 05 03 injection-with-cdi-part-ii .. . CDI Part III http : agoncal.wordpress.com 2011 09 25 injection-with-cdi-part-iii .. . .. . JBoss Weld documentation : .. . CDI and the Java EE ecosystem http : docs.jboss.org weld reference latest en-US html part-4.html .. . .. . StackOverflow : .. . Inject @EJB bean based on conditions http : stackoverflow.com questions 7920123 inject-ejb-bean-based-on-conditions 7923159 7923159 Comment : why does @EJB work for circular injection one singleton bean and another bean needing a reference to each other with reference to my answer below - i am not sure if i am doing the right thing by switching to @EJB",
"Question : I m working on a Java EE application primarily JAX-RS with a JSF admin console that uses CDI Weld for dependency-injection with javax.enterprise.context.ApplicationScoped http : download.oracle.com javaee 6 api javax enterprise context ApplicationScoped.html objects . Minor debugging issues aside CDI has worked beautifully for this project . Now I need some very coarse-grained control over CDI-injected object lifecycles . I need the ability to : .. . .. . Remove an injected object from the application context or .. . Destroy delete clear reset remove the entire application context or .. . Define my own @ScopeType and implementing Context http : docs.jboss.org weld reference 1.0.0 en-US html scopescontexts.html d0e1654 in which I could provide methods to perform one of the two above tasks . I m fully aware that this is across if not against the grain of CDI and dependency-injection in general . I just want to know .. . .. . Is this remotely possible If yes what is the easiest simplest quickest foolproofiest way to get the job done Comment : just curious : what if these objects are simply global objects i.e . some static fields . No DI is involved . In your specific application can you attest that DI is really valuable for you app scope objects Comment : That s not going to fly for this app . I m not just using DI because it s shiny . Comment : I don t think this goes against the grain of DI at all - after all the CDI specification was created to address precisely the matter of scope lifecycle and explicitly allows the creation of new scopes Granted recreating a particular bean in a context is not the CDI way .. . Answer : Out of the box there is only the Conversation scope that gives you total control on its lifecycle . But you can create your own scope if conversation doesn t suit your needs . Creating a scope is a tough job but you can go to weld code and look how conversation was implemented . Comment : I did try to use conversation scope already - unfortunately my brief attempt was not fruitful . It does look like a custom scope is the only solution though I d really rather not take this path.. .",
"Question : I know there are a lot of articles out there that explain how to use CDI in Java EE but I m having trouble figuring out what advantage this actually brings . For example suppose I have a class that currently uses an instance of Foo . I might either do .. . .. . or .. . .. . I keep reading that with CDI I can do : .. . .. . but why is this better than the previous factory based approach I assume there is some other use-case that I m not aware of but I haven t been able to identify this . If I ve understood the responses below the concept is that the DI framework acts as a master object factory that is configured centrally . Is this a reasonable interpretation Update .. . .. . I ve since started learning Spring and this now makes a lot more sense . The paragraph below is taken from Spring in Practice taking an example of an AccountService class which in turn uses an instance of AccountDao . I apologise for the long quote but I think it really gets to the heart of why injected resources offer something over standard initialisation . You could have constructed the AccountService using the new keyword but the creation of service-layer objects is rarely so straightforward . They often depend on DAOs mail senders SOAP proxies and whatnot . You could instantiate each of those dependencies programmatically in the AccountService constructor or through static initialization but that leads to hard dependencies and cascading changes as they re swapped out . .. . .. . Additionally you could create dependencies externally and set them on the AccountService via setter methods or constructor arguments . Doing so would eliminate the hard internal dependencies as long as they were declared in the AccountService by interface but you d have duplicated initialization code everywhere . Here s how you create a DAO and wire it up to your AccountService the Spring way : .. . .. . Having configured the beans as above your program can now request an instance of AccountService from the Spring ApplicationContext and the Spring DI framework will look after instantiated everything that needs instantiating . Comment : You re asking of what use is dependency-injection Comment : Pretty much . I can accept that CDI does more than my factory class as stated below but I m still not clear on what that more is . Comment : I d probably search around for general DI IoC info then . There are many advantages and duffymo s update in response to this comment sums them up nicely . For me the first three are key the fourth is just a consequence and proxies AOP don t enter into it much although I use both . .. . Answer : This is an important and subtle question about what enterprise programming is all about . The name is well chosen : contexts and dependencies . CDI has nothing to do with better or cleaner code it s about ensuring that large organizations can build complex distributed software systems and share data . It s about making 100 sure that governments or other bureaucracies can indiscriminately distribute self-contained well-documented packages for every piece of software they control . Remember that these days virtually any POJO can be injected . Let s say you re building a client app of some sort and you want it to print the first name of the user in the corner . The enterprise architects of this large company would like you to have this capability but as a junior software engineer there is no chance of you being handed the keys to the DB . They would also like to secure the data across the network but the company isn t paying any engineers to re-engineer an authentication client every time they need to share a scrap of data . They would like for you to be able to be able to query and update this info but would like transactions to be handled at a higher level than any one app . They would like for you to be able to test your classes with trivial mocks in setup blocks . They would like for coupling between classes to involve a minimum of static-methods . And on and on and on.. . Most JSRs probably have a EAs would like to be able to.. . buried inside somewhere . CDI is preferred because it allows apps of large arbitrary horizontal and vertical scales to share contexts dependencies and therefore data . .. . .. . In Fowler s words : .. . .. . The problem is how can I make that link so that my lister class is ignorant of the implementation class but can still talk to an instance to do its work . .. . But if we wish to deploy this system in different ways we need to use plugins to handle the interaction with these services so we can use different implementations in different deployments . .. . The approach that these containers use is to ensure that any user of a plugin follows some convention that allows a separate assembler module to inject the implementation into the lister . In a nutshell they allow for centralized command and control of complex enterprise applications . Java EE is a systematized reliable process for abstraction and CDI is a an incarnation of it that works so well it almost makes it invisible . It makes the stitching together of complex apps almost trivial . Two more things : .. . .. . 1 . Note that CDI exists peacefully alongside the service locator pattern known as JNDI in Java EE which is preferable if the client developer will need to choose among many identically-typed alternatives . 2 . CDI is more firepower than is needed in many cases especially non-enterprise literally cases .",
"Question : I m working on a Java EE application primarily JAX-RS with a JSF admin console that uses CDI Weld for dependency-injection with javax.enterprise.context.ApplicationScoped http : download.oracle.com javaee 6 api javax enterprise context ApplicationScoped.html objects . Minor debugging issues aside CDI has worked beautifully for this project . Now I need some very coarse-grained control over CDI-injected object lifecycles . I need the ability to : .. . .. . Remove an injected object from the application context or .. . Destroy delete clear reset remove the entire application context or .. . Define my own @ScopeType and implementing Context http : docs.jboss.org weld reference 1.0.0 en-US html scopescontexts.html d0e1654 in which I could provide methods to perform one of the two above tasks . I m fully aware that this is across if not against the grain of CDI and dependency-injection in general . I just want to know .. . .. . Is this remotely possible If yes what is the easiest simplest quickest foolproofiest way to get the job done Comment : just curious : what if these objects are simply global objects i.e . some static fields . No DI is involved . In your specific application can you attest that DI is really valuable for you app scope objects Comment : That s not going to fly for this app . I m not just using DI because it s shiny . Comment : I don t think this goes against the grain of DI at all - after all the CDI specification was created to address precisely the matter of scope lifecycle and explicitly allows the creation of new scopes Granted recreating a particular bean in a context is not the CDI way .. . Answer : A custom scope which might fit your needs is available at https : github.com openknowledge openknowledge-cdi-extensions tree master openknowledge-cdi-scope src main java de openknowledge cdi scope Maybe you have to adjust the implementation a bit . Comment : This might do quite nicely.. . I assume you re specifically talking about DestroyableContext Comment : Yes . It s at least very similar . You could also have a look at the JSF centric scopes of MyFaces CODI which are also fine grained but if you need something independent of JSF and or easy to use as template for your custom scope that one might fit .",
"Question : JSR-299 CDI introduces the unfortunately named concept of a resource : http : docs.jboss.org weld reference 1.0.0 en-US html resources.html d0e4373 .. . .. . You can think of a resource in this nomenclature as a bridge between the Java EE 6 brand of dependency-injection @EJB @Resource @PersistenceContext and the like and CDI s brand of dependency-injection . The general gist seems to be that somewhere and this will be the root of my question you declare what amounts to a bridge class : it contains fields annotated both with Java EE s @EJB or @PersistenceContext or @Resource annotations and with CDI s @Produces annotations . The net effect is that Java EE 6 injects a persistence context say where it s called for and CDI recognizes that injected PersistenceContext as a source for future injections down the line handled by @Inject . My question is : what is the community s consensus--or is there one--on : .. . .. . what this bridge class should be named .. . where this bridge class should live .. . whether it s best to localize all this stuff into one class or make several of them .. . .. . .. . Left to my own devices I was thinking of declaring a single class called CDIResources and using that as the One True Place to link Java EE s DI with CDI s DI . Many examples do something similar but I m not clear on whether they re just examples or whether that s a good way to do it . Thanks . .. . Answer : This seems highly subjective but I prefer to make several classes and I call FooProducer a class producing a Foo .",
"Question : I have a full-fledged Java EE application using GlassFish Server 4.1 Java EE 7 . It is a standard NetBeans project i.e . it does not use Apache Maven . The application contains a class-library named ProjectLibrary which is added to both the modules namely the EE module and the web module . The IDE shows the basic tree structure diagrammatically as follows . enter image description here http : i.stack.imgur.com BnAWF.png .. . .. . .. . .. . There is a requirement to inject an EJB into a JPA entity listener as follows . This listener is present in the EE project and the class-library as well . UserService is a stateless local EJB . This works coherently unless the annotation @EJB is replaced by @Inject in which case the following exception is thrown . Is it officially disallowed to inject EJBs using @Inject in class libraries GlassFish 4.1 uses Weld 2.2.2 final as the CDI implementation . Comment : If you change the @Stateless with @Dependent does it deploy Comment : The behaviour remains unchanged if the EJB is replaced by a @Dependent scoped CDI bean the same exception is caused after applying this change . Comment : Any reason why you want to change @EJB with @Inject if it works Comment : @Gas : @Inject enjoys higher precedence over @EJB since Java EE 6 . Comment : For EJBs I find it better to use @EJB since just by looking at the code you already know what you are injecting without inspecting other classes . As you see in your case sometimes newer doesn t mean better . .. . Answer : If you fail to include a beans.xml in your application library none of the components within it will be eligible for CDI injection either as receiving injection points or as being injectable in to other components . When you added your beans.xml you made it so that your library could be injected into and its classes were now eligible to be injected using @Inject .. . .. . It s a catch 22 . The purpose of a library is that it has little outside dependency and has no knowledge of how its being used so you wouldn t typically have CDI related code in it . Comment : Isn t this behaviour very GlassFish specific or is an oversight in the CDI implementation and or CDI specification . The JPA specification states The persistence provider is only required to support CDI injection into entity listeners in Java EE container environments . If the CDI is not enabled the persistence provider must not invoke entity listeners that depend upon CDI injection . The listener in the given example is dependent upon CDI injection the Event . It is invoked when the said EJB is injected by using @EJB i.e . CDI appears to have already been enabled there . Comment : Multiple specs have stated things they can t enforce . I doubt this is a glassfish specific issue as it occurs in other containers . GF probably does it a little different since they re default is for beans.xml at the root e.g . the war in this case . Whats happening is that you re not getting any bean definitions created for EJBs in your library . Comment : Why is this mentioned in the specification https : docs.jboss.org cdi spec 1.0 html packagingdeployment.html A library jar EJB jar application-client jar or rar archive is a bean archive if it has a file named beans.xml in the META-INF directory Comment : Similar reasons . Those should all be bean archives however it s not the CDI runtime that makes that call it s the entire EE container who decides this .",
"Question : From just a few searches this seems like a problem that has been around for a while . I have written a FacesConverter that looks like the following . The object Category is a JPA entity and CategoryControl is the DAO that fetches it . As you probably guessed by now I never get the injection . I got this workaround from this page https : issues.apache.org jira browse EXTCDI-127 which looks like this . : .. . .. . However I can t make this work either . My backing bean creates and returns a converter all right but it doesn t get the object injected into it . I am using MyFaces CODI 1.0.1 . With the current GlassFish Weld container . Can anyone suggest a solution before I re-code to not use a Converter .. . Answer : The @Inject Annotation only works in CDI managed instances . If you want to use CDI features inside a non-CDI managed instance Like a JSF Validator or a JSF Converter you can just programm against the CDI API . This works only in at least Java EE 7 + CDI 1.1 server . https : docs.oracle.com javaee 7 api javax enterprise inject spi CDI.html .. . .. . With all the AnnotationHell in Java EE people forget how to code .",
"Question : null .. . Answer : Problem .. . .. . Injecting an enterprise java bean with @EJB in an application-client launched with Java web start and from a GlassFish 3.1.2.2 build 5 server. . works as long as the requirements are fulfilled see note at bottom . But all fails if I inject something using @Inject despite whatever resource type we re trying to inject . And I know it failed because I shall get a NullPointerException if I try to use the injected resource . That tells me the annotation processor has completely forgot @Inject . Not only am I intrigued that @EJB work flawlessly at the same time @Inject does not work at all I also reason that this silent failure of the injection must be a violation of the Java EE 6 specification http : jcp.org en jsr detail id 316 . The specification says on page 69 : .. . .. . If the container fails to find a resource needed for injection initialization of the class must fail and the class must not be put into service . This issue could be related to or an expression of a bugg in GlassFish https : java.net jira browse GLASSFISH-11257 . My end goal. . .. . .. . . . is to separate API from implementation so that I get a much easier job trying out different implementations when it s time for performance-testing and profiling my application . However I take it this design pattern is pretty much impossible to recreate in an application-client then My immediate approach is to create new instances of all the implementations in the Main class or use factories . Of course the best solution of all would be to use qualifiers Note : Requirements for injection in application clients are that CDI must be enabled for the component package must contain the file beans.xml most likely empty if you re used to annotations and support of CDI in application clients is actually optional implementation specific . Moreover if CDI is enabled and supported then you should know that the application-client container can only be active during the boot of the client and requires thus that the resources be injected into the Main class and that the fields are static . Comment : You re trying to get a reference to a remote EJB Comment : No I m trying to get a specific implementation of an interface . Comment : As far as I am aware app client is really only applicable around remotable objects . CDI has no remoting capabilities . I doubt it something any of them are particularly thinking of since it s much easier to simply run CDI in your client than it is to try to use the app server to do this work . Looking at this thread java.net projects javaee-spec lists jsr342-experts archive https : java.net projects javaee-spec lists jsr342-experts archive 2012-12 message 40 it appears that basic support was added in CDI 1.1 JEE 7 . Comment : did your other question about appclient answer this",
"Question : null .. . Answer : I should pass some information coming with a HTTP header from a request to an EJB and I don t want to add parameters and pass them everywhere I need them . So i used a RequestScoped bean to hold my header values . Is this implementation ok or do I misunderstand the concept of @RecuestScoped beans First I get the headers with an interceptor Resteasy and save them into my request scoped bean : .. . .. . This is the bean : .. . .. . Then I can access the value different in every request from my EJB : .. . .. . Based upon the description of @RequestScoped https : docs.oracle.com javaee 7 api javax enterprise context RequestScoped.html this should work as expected : .. . .. . The request scope is active : .. . .. . during the service method of any servlet in the web application during the doFilter method of any servlet filter and when the container calls any ServletRequestListener or AsyncListener .. . during any Java EE web service invocation .. . during any remote method invocation of any EJB during any asynchronous method invocation of any EJB during any call to an EJB timeout method and .. . during message delivery to any EJB message-driven bean and during any message delivery to a MessageListener for a JMS topic or queue obtained from the Java EE component environment . Comment : What do your tests say Does it do what you want Does it work as you expect it to work Comment : The tests work so far.. . Also everything I read about CDI seem to correspond with my plan . It is more that I know of @RequestScope d beans from the web context of ManagedBeans so it feels unnatural to use this in my scenario . Comment : If everything works as expected and this solutions suits you and what you re seeing matches with the documentation you shouldn t be concerned .",
"Question : null .. . Answer : Hello fellow developers I am working on a J2EE application and am testing it using JUnit and CDI-Unit http : jglue.org cdi-unit-user-guide . There I have a @Session @Named Bean into which I need to inject an EJB : .. . .. . The Appointment Service https : github.com vasigorc rimmaproject blob master src main java com vgorcinschi rimmanew ejbs DefaultAppointmentService.java is @Stateless and just passes the commands to a @Singleton EJB which is a repository https : github.com vasigorc rimmaproject blob master src main java com vgorcinschi rimmanew ejbs InMemoryAppointmentRepository.java . Testing both of them together works marvelously . But the problems started appearing when doing the integration-testing between the session-bean and the stateless ejb . I initially tried to start a session for the test method calls using the @InSessionScope as suggested in the mentioned below reference but that royally failed with a org.jboss.weld.context.ContextNotActiveException . I then used the BoundSessionContext as inspired from this stackoverflow ticket http : stackoverflow.com questions 11521613 access-sessionscoped-object-from-stateless-ejb . Now the context seems to be seen but the injected @Stateless EJB is null . I have also tried to exclude the default weld artifact and to include another allegedly more appropriate for Glassfish 4.1 as inspired from this post https : github.com omnifaces omnifaces issues 140 . Alas to no avail so I have reverted back to default . Below is the test code : .. . .. . .. . .. . The exception is thrown in the method ejbCalledFromMBTest .. . .. . This is the stacktrace : .. . .. . Here are two more links that I have consulted prior to posting this : .. . .. . 1 . http : balusc.omnifaces.org 2013 10 01 archive.html .. . 2 . WELD-001303 No active contexts for scope type javax.enterprise.context.SessionScoped http : stackoverflow.com questions 15496374 weld-001303-no-active-contexts-for-scope-type-javax-enterprise-context-sessionsc .. . .. . The full code of my app is available at github https : github.com vasigorc rimmaproject . I am following Manning s EJB 3 in Action for the EJBs set-up and management ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
dependency-injection
|
UNK_RELATION
|
asp.net-mvc-4@web-applications@110
|
asp.net-mvc-4 -- asp.net-mvc-4 is the fourth major version of the asp.net model-view-controller platform for @placeholder .
|
{
"confidence": [
69.2265853881836,
67.80555725097656,
66.76394653320312,
66.00189971923828,
66.00189971923828,
64.78885650634766,
63.585567474365234,
62.859710693359375,
62.859710693359375,
62.21342086791992,
62.21342086791992,
60.692161560058594,
60.692161560058594,
60.56886291503906,
60.56886291503906,
60.56886291503906,
60.56886291503906,
60.56886291503906,
60.56886291503906,
60.56886291503906,
60.56886291503906,
60.56886291503906,
59.26615905761719,
59.24199676513672,
58.79124450683594,
58.63972473144531,
58.63972473144531,
58.63972473144531,
58.63972473144531,
58.63972473144531,
58.63972473144531,
58.63972473144531,
58.63972473144531,
58.63972473144531,
58.63972473144531,
58.63972473144531,
58.63972473144531,
58.63972473144531,
57.89457321166992,
57.869361877441406,
57.869361877441406,
57.660926818847656,
57.33702087402344,
57.33702087402344,
56.497215270996094,
56.497215270996094,
56.46710205078125,
56.46710205078125,
56.287574768066406,
56.14033508300781,
55.44693374633789,
54.96263885498047,
54.852657318115234,
54.852657318115234,
54.852657318115234,
54.852657318115234,
54.852657318115234,
54.852657318115234,
54.852657318115234,
54.852657318115234,
54.852657318115234,
54.852657318115234,
54.852657318115234,
54.64301681518555,
54.41773223876953,
53.873233795166016,
53.6502685546875,
53.645938873291016,
52.92351531982422,
52.92351531982422,
52.92351531982422,
52.92351531982422,
52.92351531982422,
52.92351531982422,
52.92351531982422,
52.92351531982422,
52.92351531982422,
52.92351531982422,
52.92351531982422,
52.92351531982422,
52.92351531982422,
52.92351531982422,
52.92351531982422,
52.92351531982422,
52.92351531982422,
52.92351531982422,
52.92351531982422,
52.92351531982422,
52.92351531982422,
52.92351531982422,
52.92351531982422,
52.92351531982422,
52.92351531982422,
52.80412673950195,
52.71387481689453,
52.71387481689453,
52.71387481689453
],
"content": [
"ASP.Net MVC 4 will run on ASP.Net 4 and ASP.Net 4.5 .",
"I m using ASP.NET MVC 4 .",
"Is it possible to use ASP.NET MVC 5 instead of ASP.NET MVC 4",
"They are not compatible with ASP.NET MVC 4 .",
"This is not specific to ASP.NET MVC 4 .",
"This code was specifically for ASP.NET MVC 4 .",
"I am new to asp.net-mvc-4 .",
"I m using ASP.NET MVC 4 .",
"Mine is a Asp.net MVC 4 application .",
"I have an ASP.NET MVC 4 application .",
"ASP.NET MVC 4 uses the new SimpleMembershipProvider .",
"It needs to be generated by an ASP.NET MVC 4 controller while using Open XML .",
"ASP.NET MVC 4 . allows a controller to support asynchronous patterns .",
"I m working on ASP.NET MVC 4 application .",
"we developed an asp.net-mvc-4 application .",
"It is ASP.NET MVC 4 app on 64 bit machine .",
"I developed asp.net MVC 4 site .",
"I have a problem with ASP.NET MVC 4 application .",
"I am running an asp.net-mvc-4 site .",
"Would this solution work for ASP.NET MVC 4",
"I am new to ASP.NET MVC 4 .",
"What is the role of dependency resolver in ASP.NET MVC 4",
"The Setup : .. . .. . I have updated an app from ASP.NET MVC 3 to ASP.NET MVC 4 .",
"I use it with ASP.net Web API APIController with no problem but I hit problem when using the ASP.net MVC 4 Controller .",
"As I have migrated from Asp.Net MVC 3 to MVC 4 everything working fine with Asp.Net MVC 4 except minification .",
"is your code acceptable for the ASP.NET MVC 4 Razor",
"I m developing an ASP.Net MVC 4 application .",
"ASP.NET MVC 4 application throws TypleLoadException at startup .",
"Is there an update coming to the ASP.NET MVC 4 Beta that will fix this",
"ASP.NET MVC 4 RC includes Newtonsoft.Json JSON.NET",
"I did asp.net program using mvc 4 .",
"I switched to SimpleMembershipProvider in an ASP.NET MVC 4 app .",
"I m exploring ASP.NET MVC 4 these days .",
"I have a simple ASP.NET MVC 4 Project .",
"I have an application an asp.net-mvc-4 application .",
"I m building a framework on top of ASP.NET MVC 4 .",
"How would you implement this is ASP.NET MVC 4",
"In an ASP.Net MVC 4 web application that I m working on .",
"ASP.NET Web API released with ASP.NET MVC 4 Beta .",
"The SimpleMembership provider has been introduced with ASP.NET MVC 4 .",
"I have an ASP.NET MVC 4 site based off the internet template .",
"One of the major advantages with asp.net MVC is extensibility .",
"I get the following exception after installing ASP.NET MVC 4 Beta on a machine with ASP.NET MVC 3 .",
"I had the same problem but when migrating ASP.NET MVC 3 to ASP.NET MVC 4 .",
"In my ASP.NET MVC 4 application I can filter on multiple tags .",
"Create a new ASp.NET MVC 4 application using the Internet Template .. . 2 .",
"Using ASP.NET MVC 4 and NuGet to manage packages .",
"I m working on a ASP.NET MVC 4 website .",
"Is ViewState relevant in ASP.NET MVC",
"I have integrated an ASP.NET MVC 4 app with a legacy ASP.NET 4 Webforms app .",
"Check the Controlling Bundling and Minification section : asp.net-mvc tutorials mvc-4 bundling-and-minification http : www.asp.net mvc tutorials mvc-4 bundling-and-minification",
"I am using ASP.NET MVC Front Controller not Classic ASP.NET ASP.NET Page Controller",
"I am using Ninject together with ASP.NET MVC 4 .",
"We have an ASP.NET MVC 4 application with around 3000 views in it .",
"Upshot and the server-side are not part of ASP.NET MVC 4 RTM at the Moment .",
"I had the same problem with asp.net-mvc-4 and Rotativa .",
"What is the best way to create a confirmation modal window in asp.net-mvc-4",
"How can I force the format of datetime in asp.net-mvc-4",
"Tested and working on both ASP.NET MVC 3 4 RC .",
"ASP.NET MVC 4 uses a new membership provider called SimpleMembershipProvider .",
"There is no longer a need to modify the config file with ASP.NET MVC 4 .",
"A : ASP.NET MVC 4 Now uses a new membership provider : SimpleMembershipProvider .",
"Create a new ASP.NET MVC 4 project using the Empty Template .. . 2 .",
"Is it true for ASP.NET MVC too",
"but it s not just mvc4.. . you can t use async without 4.5 it has nothing to do with asp.net or asp.net-mvc-4",
"I am new to Asp.Net MVC .",
"Below is my code - .. . .. . ASP.Net MVC Controller : .. . .. . AngularJS :",
"I have a very small simple ASP.NET MVC app MVC 4 I think .",
"ASP.NET MVC 4 standard template comes with a reference to the WebMatrix.WebData assembly .",
"As Darin points out ASP.NET MVC 4 is a Framework and is container agnostic .",
"I am working on an asp.net mvc-4 web application .",
"which is an Asp.net mvc-4 deployed under iis-8 .",
"I m using asp.net-mvc-4 webapi beta to build a rest service .",
"The project is developed by VS2012 .NET 4.5 and ASP.NET MVC 4 .",
"I created a new ASP.NET MVC 4 application and it works as expected .",
"I ve got a project based in ASP.NET MVC 4 that simple-authentication .",
"What are the best practices for implementing these in ASP.net MVC 4 today",
"ASP.NET MVC 4 suitable for complex single-page solutions .",
"I m trying to deploy an ASP.NET MVC 4 application to IIS 8 .",
"I have a TorrentLeech application with ASP.Net MVC 4 and MonoTorrent library .",
"I am working on an asp.net mvc-4 order management system .",
"It explains how to use MEF in an Asp.net MVC 4 Web Api project .",
"I am working on an asp.net mvc-4 web application .",
"I am using Grid.MVC with my ASP.NET MVC 4 Project .",
"I m at a beginner with ASP.NET MVC 4 and I have a problem .",
"I am doing an application using ASP.NET MVC 4 Razor .",
"I have made an asp.net MVC 4 Internet application .",
"ASP.NET MVC 4 uses the SimpleMemebrship provider out of the box .",
"I have a asp.net MVC 4 project with MEF and RavenBD .",
"Create a new ASP.NET MVC 4 application using the empty template .",
"Missing ASP.NET MVC 3 and 4 http : i.stack.imgur.com ummei.jpg",
"I have a simple asp.net-mvc-4 site that uses less files .",
"Combine several answers this works for me in ASP.NET MVC 4 .",
"The latest ASP.NET SPA release Beta is not compatible with ASP.NET MVC4 RC and later but you can built your application with older NuGet packages or modyfi current sources of ASP.NET SPA to work with ASP.NET MVC 4 RC .",
"This is not supported by standard ASP.NET MVC .",
"It was the same in ASP.NET MVC 3 .",
"And it is asp.net MVC related ."
]
}
|
{
"confidence": [
58.79045867919922,
58.68714141845703,
57.47899627685547,
57.473297119140625,
57.430747985839844,
57.211387634277344,
56.99669647216797,
56.79957580566406,
56.7936897277832,
56.473548889160156,
56.46331024169922,
56.39745330810547,
56.376564025878906,
56.08612060546875,
56.055442810058594,
55.98308563232422,
55.916343688964844,
55.838287353515625,
55.78376770019531,
55.727378845214844
],
"content": [
"Question : I am trying to set place holder to textbox or multi line text box in MVC 4 . So far it is not working . And the View as below .. . .. . Place holder just need to show some information and I am happy to display it anywhere View or model .. . .. . We are using MVC4 . Cheers Comment : Instead of editorfor use textareafor. . .. . Answer : You cannot use Placeholder attribute on @Html.EditorFor in asp.net-mvc there are two solutions for your problem : .. . .. . 1 . You can make a custom attribute for @Html.EditorFor a great article on this is there on stackoverflow link : - Html5 Placeholders with .NET MVC 3 Razor EditorFor extension http : stackoverflow.com questions 5824124 html5-placeholders-with-net-mvc-3-razor-editorfor-extension and you can visit this link also http : aspadvice.com blogs kiran archive 2009 11 29 Adding-html-attributes-support-for-Templates- 2D00 -ASP.Net-MVC-2.0-Beta 2D00 1.aspx http : aspadvice.com blogs kiran archive 2009 11 29 Adding-html-attributes-support-for-Templates- 2D00 -ASP.Net-MVC-2.0-Beta 2D00 1.aspx .. . .. . 2 . Instead of @Html.EditorFor you can use @Html.TextAreaFor Comment : Worked without any exception Cheers Comment : Great..thankzz.. .",
"Question : Here is my controller code : .. . .. . How can I cast the ViewData EmpData in the view code Comment : Just use return View user and add @model user in the view Comment : I know it would work that way . But how to cast ViewData using @model AccountModel Comment : If your not going to pass a model to the view then there is no point having a @model statement in the view . You could use @ var user ViewData EmpData as user but what would be the point Comment : asp.net-mvc overview getting-started introduction http : www.asp.net mvc overview getting-started introduction accessing-your-models-data-from-a-controller Comment : Possible duplicate of How to handle ViewData type casting in MVC http : stackoverflow.com questions 2685723 how-to-handle-viewdata-type-casting-in-mvc .. . Answer : Here you go use this in view code :",
"Question : When I installed MVC4 beta on a development PC it had a template for SPA Single Page Application . Today on a different PC with the same setup VS2010 SP1 win7 I installed MVC4 RC http : www.microsoft.com en-us download details.aspx id 29935 but no longer is the SPA template available see image . Any one else having this issue or is this a documented change that I could not find enter image description here http : i.stack.imgur.com VZXgZ.png .. . Answer : Changes from ASP.NET MVC 4 Beta .. . .. . The major changes from ASP.NET MVC 4 Beta in this release are summarized below : .. . .. . Removed ASP.NET Single Page Application : ASP.NET Single Page Application SPA shipped with ASP.NET MVC 4 Beta as an early preview of the experience for building applications that include significant client-side interactions using JavaScript . SPA won t ship with the final MVC 4 release but will continue to evolve outside of the MVC 4 release . Check out the ASP.NET SPA home page for details . .. . .. . .. . http : www.asp.net whitepapers mvc4-release-notes .. . .. . P.S . Wow I am glad that I didn t use it for an app I build right now . I was considering it 3 months ago but decided not to risk it because MS said that it is experimental . Comment : The answer right in the release notes Should of read more carefully . I was about to use it for an App . Glad I waited until it came out of beta to do so .",
"Question : Is there any way to do attribute Routing in ASP.Net MVC4 and Web API 1 project I have search so much about that only solution I found was update or install the project to MVC5 Web Api 2 and AttributeRouting . I tried to do it from nuget but having issues with supporting older version packages in the project Install-Package AttributeRouting Install-Package Microsoft.AspNet.WebApi Install-Package Microsoft.AspNet.Mvc . Is there any way to do attribute routing with out updating or installing Comment : To avoid compatibility issues it is advised to update to a more recent version that supports attribute routing . How to Upgrade an ASP.NET MVC 4 and Web API Project to ASP.NET MVC 5 and Web API 2 http : www.asp.net mvc overview releases how-to-upgrade-an-aspnet-mvc-4-and-web-api-project-to-aspnet-mvc-5-and-web-api-2 Comment : Thankx Nkosi. . This is what I wanted.. . .. . Answer : To avoid compatibility issues it is advised to update to a more recent version that supports attribute routing . I used the following walkthrough to successfully upgrade my ASP.NET MVC 4 and Web API Project to ASP.NET MVC 5 and Web API 2 .. . .. . How to Upgrade an ASP.NET MVC 4 and Web API Project to ASP.NET MVC 5 and Web API 2 http : www.asp.net mvc overview releases how-to-upgrade-an-aspnet-mvc-4-and-web-api-project-to-aspnet-mvc-5-and-web-api-2",
"Question : I am just trying out ASP.NET MVC 4 but I can t figure out how to disable Javascript CSS minification feature . Especially for development-environment this will help greatly on debugging . I would imagine it would be a switch in web.config but since ASP.NET MVC 4 is still in beta stage at the moment there s really not much information out there . Would appreciate if someone can help or point to the right blog posts etc . Comment : Just me or is it ridiculous that this isn t a configuration setting Comment : @Jeff : Ruby on Rails has it s own limitations as does every platform . .. . Answer : On newer versions of ASP.NET MVC just add .. . .. . right after",
"Question : ASP.NET MVC development has been very fast during the past 2 years . However even though the RTM version of ASP.NET MVC 3 has been released there doesn t seem to be any roadmap for the next releases . The roadmap at codeplex is empty and contains only milestones for the MVC 3 . Also I have not seen any blog posts on things planned for the next release yet . This seems to be different than with the previous two releases . Does anyone have any links to resources on new features that are planned for MVC 4 Comment : I am waiting too . When ASP.NET MVC 2 was released they updated roadmap at same day . Comment : The roadmap is aspnetwebstack.codeplex.com wikipage title Roadmap http : aspnetwebstack.codeplex.com wikipage title Roadmap We ll be starting the MVC 5 roadmap soon . .. . Answer : An interesting blog post.. . http : haacked.com archive 2011 07 13 asp-net-mvc-4-roadmap.aspx",
"Question : I am using ASP.NET MVC 4 RC and the latest version of MvcExtensions and MvcExtensions.Autofac . I don t know if MVC 4 works differently to MVC 3 The code below is how I used it in my MVC 3 application . I have just copied and pasted it into my MVC 4 app . I replaced the Global.asax.cs file to look like this : .. . .. . RegisterRoutesBootstrapper AutoMapperBootstrapper and FluentValidationBootstrapper are my custom bootstrapper classes . The code for AutoMapperBootstrapper looks like this : .. . .. . It underlined IEnumerable in blue with the error : .. . .. . Ok so when I compiled my project it is looking for an ASP.NET MVC 3 reference : .. . .. . I didn t bother with this reference and added the MVC 4 reference . I thought that this would have solved my areas issue but it did not . Any ideas why it is asking for an the MVC reference .. . Answer : I guess that the MvcExtensions and MvcExtensions.Autofac NuGet packages are compiled against ASP.NET MVC 3 and have strong-references to System.Web.Mvc V3.0.0.0 . They are not compatible with ASP.NET MVC 4 . You will have to contact the author of those packages to provide you with an updated version that is compiled against ASP.NET MVC 4 . Remember that ASP.NET MVC 4 hasn t hit RTM yet so don t expect all NuGet packages to immediately get updated versions for it . Comment : Any particular reason for ruling out Binding Redirects being capable of curing the issue at hand Ninject.Web and stuff happens to work or am I confused and is the Ninject.MVC3 bit source code only.. . I know an answer saying just use Binding Reidrects without any qualifications would definitely be wrong too.. .",
"Question : I used Nuget to install the Ninject.Web.Common reference . I use it with ASP.net Web API APIController with no problem but I hit problem when using the ASP.net MVC 4 Controller . The error : .. . .. . NinjectWebCommon.cs : Comment : At the right side of your screen you ll see at least 7 questions with the same error . Can you tell us what suggestions you have attempted and what the results were .. . Answer : Check if in your Web.config you have two lines for MVC versioning I had something like : .. . .. . If you do then replace them with one line like to redirect to highest version that you are using in my case it s 4.0.0.1 : .. . .. . This did it for me .",
"Question : I installed the package MvcMailer for MVC4 project but it does not show up in the reference area . I m not able to do a reference for the IUserMailer.cs There should be a reference for Mvc.Mailer I m using VS 2012 and .NET 4.5 .. . Answer : The package and version of MvcMailer needed depends on both the the MVC and the .NET version you are using : .. . .. . ASP.NET MVC3 .. . .. . ASP.NET MVC4 with .NET 4 .. . .. . ASP.NET MVC4 with .NET 4.5 .. . .. . This will likely change again when MVC5 and .NET 5 come out . MVCMailer https : www.nuget.org packages MvcMailer",
"Question : The Setup : .. . .. . I have updated an app from ASP.NET MVC 3 to ASP.NET MVC 4 . The app worked fine in MVC 3 . The only thing that isn t working in MVC 4 is Ajax.Begin form : the form defaults to full page requests instead of async AJAX requests . Essentially it is a wizard that I have written but that is irrelevant . Model.Step.ActionName correctly returns a string see code below . The Code : .. . .. . The code in the View is : .. . .. . The Rendering : .. . .. . I note that Ajax.BeginForm in MVC 4 uses HTML 5 . I show the difference between how MVC 3 and MVC 4 render the form below : .. . .. . MVC 3 : .. . .. . MVC 4 : .. . .. . I have no idea if this is correct but assume it is . The Problem : .. . .. . The problem however is that Ajax isn t used just full page refreshes . So sumat is wrong.. . .. . .. . The Question : .. . .. . The question is : What is wrong .. . Answer : OK I have solved this . In the MVC 3 app I had commented out the following in the web.config : .. . .. . This explains why asp.net-mvc-3 was not rendering html 5 . In the new mvc 4 app the default setting has ClientValidationEnbled true and UnobstrusiveJavaScriptEnabled true as follows : .. . .. . So my app needed the following javascript files to be included : .. . .. . And it needed the microsoft .js files throwing away ie : .. . .. . I figured this out after reading @Darin Dimitrov s reply to the following question : .. . .. . Are MicrosoftAjax.js MicrosoftMvcAjax.js and MicrosoftMvcValidation.js obsolete as of ASP.NET MVC 3 http : stackoverflow.com q 8782697 271087 .. . .. . Many thanks to Darin . The answer is worth reading to enlighten yourself as to the meaning of the two appSettings I had disabled .",
"Question : I am just trying out ASP.NET MVC 4 but I can t figure out how to disable Javascript CSS minification feature . Especially for development-environment this will help greatly on debugging . I would imagine it would be a switch in web.config but since ASP.NET MVC 4 is still in beta stage at the moment there s really not much information out there . Would appreciate if someone can help or point to the right blog posts etc . Comment : Just me or is it ridiculous that this isn t a configuration setting Comment : @Jeff : Ruby on Rails has it s own limitations as does every platform . .. . Answer : In Global.asax.cs Comment : This has now changed in the latest version see this answer for details : stackoverflow.com a 11270224 http : stackoverflow.com a 11270224 Comment : @Michael : Yes but the answer is correct for beta as the OP requested : - I still have an MVC 4 beta website that is yet to be upgraded and glad I found this answer : -",
"Question : I want to do a similar implementation done by Sivaraman Dhamodharan in MVC 4 asp.net in his article found on : http : www.codeproject.com Articles 139792 Multi-Select-List-Box-and-Checked-List-Box .. . .. . I am new in MVC 4 and I m enjoying it Comment : And what s your question Please explain what problem do you have . .. . Answer : You can create Multi-Select boxes for Visit Area and Assigned Id as mentioned in the article you have put very easily in MVC . For the select box with the checkboxes you can create a table in MVC . Please follow the steps below . Let s assume that that the view model for the page is AssignWorkViewModel and the view model for the product is ProductViewModel . Let s assume that the action method name is AssignWork .. . .. . The View .. . .. . The result .. . .. . enter image description here http : i.stack.imgur.com sKch8.png .. . .. . I think this might help you to start .",
"Question : How does one integrate Managed Extensibility Framework http : mef.codeplex.com MEF with ASP.NET MVC 4 and ASP.NET Web API in the same project Consider an example application with an MVC controller HomeController and a Web API controller ContactController . Both have a property of type IContactRepository which they rely on MEF to resolve . The problem is how to plug MEF into MVC and Web API so that instances are created via MEF . HomeController : .. . .. . ContactController : .. . .. . IContactRepository and ContactRepository : .. . .. . Contact : .. . Answer : You can take a look at this http : kennytordeur.blogspot.be 2012 08 mef-in-aspnet-mvc-4-and-webapi.html . It explains how to use MEF in an Asp.net MVC 4 Web Api project . There also exists a Nuget package http : kennytordeur.blogspot.be 2012 11 nuget-package-integrated-mef-in-aspnet.html based on this code . That way you can test it very easily and quickly . Comment : I looked at your blog post before coming up with my answer . I think the use of DefaultControllerFactory with MVC is now an outdated technique though and one should implement IDependencyResolver instead http : weblogs.asp.net shijuvarghese archive 2011 01 21 dependency-injection-in-asp-net-mvc-3-using-dependencyresolver-and-controlleractivator.aspx . Besides just linking to an external solution in an SO answer is best avoided . Comment : For good reason the blog is now gone .",
"Question : I am new to ASP.NET MVC 4 . I have used a custom dependency resolver in my ASP.NET MVC 4 project in order to use Dependency injection framework . What is the role of dependency resolver in ASP.NET MVC 4 Comment : so you used it without knowing what it does Why not stop using it Comment : I have used using global.asax.cs file to register the custom dependency resolver . But in global.asax.cs file I didn t find any registering about default dependency resolver . .. . Answer : I use a different approach using Ninject .. . .. . 1 . Using NuGet I downloaded Ninject just it without any special modification for MVC . So you will have Ninject in references . 2 . Now I create a custom controller factory class class derived from DefaultControllerFactory .My goal is to make MVC use my controller factory when it tries to create a controller object . public class NinjectControllerFactory : DefaultControllerFactory .. . .. . .. . region Member Variables .. . .. . private IKernel ninjectKernel null .. . .. . endregion .. . .. . public NinjectControllerFactory IKernel kernel .. . .. . this.ninjectKernel kernel .. . AddBindings .. . .. . .. . private void AddBindings .. . .. . BO .. . ninjectKernel.Bind IAuthenticationBO .To AuthenticationBO .. . .. . DAO .. . ninjectKernel.Bind ISharedDAO .To SharedDAO .. . .. . .. . .. . protected override IController GetControllerInstance System.Web.Routing.RequestContext requestContext Type controllerType .. . .. . return controllerType null null : IController ninjectKernel.Get controllerType .. . .. . .. . .. . .. . 3 . Make MVC to use my custom controller factory . In Global.asax in Application Start .. . .. . public class MvcApplication : System.Web.HttpApplication .. . .. . private IKernel kernel new StandardKernel .. . .. . protected void Application Start .. . .. . .. . AreaRegistration.RegisterAllAreas .. . WebApiConfig.Register GlobalConfiguration.Configuration .. . FilterConfig.RegisterGlobalFilters GlobalFilters.Filters .. . RouteConfig.RegisterRoutes RouteTable.Routes .. . BundleConfig.RegisterBundles BundleTable.Bundles .. . .. . register a cutom controller factory .. . ControllerBuilder.Current.SetControllerFactory new NinjectControllerFactory kernel .. . .. . .. . .. . .. . .. . So now when MVC creates controller objects it uses our custom controller factory and as you saw it resolves all dependencies using Ninject . For example .. . .. . Ninject injects the implementation of IAuthenticationBO in our case AuthenticationBO and we can use it . Also it s very easy to use mocking and TDD but it s beyond the scope of the question . Comment : Thanks to share your method. .",
"Question : I am little confused regarding this matter . I understand that VS had a SPA template for MVC4 beta but not for MVC4 RC . But http : www.asp.net single-page-application says I can install SPA with nuget-package after installing MVC4 RC . Does this mean that SPA is still working for MVC4 RC I am asking this because some discussions over web http : aspnetwebstack.codeplex.com discussions 358133 indicated the opposite . Any clue will be appreciated . .. . Answer : The latest ASP.NET SPA release Beta is not compatible with ASP.NET MVC4 RC and later but you can built your application with older NuGet packages or modyfi current sources of ASP.NET SPA to work with ASP.NET MVC 4 RC . Here you can find some how-to for those solutions : .. . .. . Building Single Page Apps with ASP.NET MVC4 - Part 5 - using ASP.NET MVC4 RC http : bartjolling.blogspot.nl 2012 06 building-single-page-apps-with-aspnet.html .. . DeliveryTracker with ASP.NET MVC 4 RC http : peterporfy.wordpress.com 2012 06 18 deliverytracker-with-asp-net-mvc-4-rc",
"Question : ASP.NET MVC development has been very fast during the past 2 years . However even though the RTM version of ASP.NET MVC 3 has been released there doesn t seem to be any roadmap for the next releases . The roadmap at codeplex is empty and contains only milestones for the MVC 3 . Also I have not seen any blog posts on things planned for the next release yet . This seems to be different than with the previous two releases . Does anyone have any links to resources on new features that are planned for MVC 4 Comment : I am waiting too . When ASP.NET MVC 2 was released they updated roadmap at same day . Comment : The roadmap is aspnetwebstack.codeplex.com wikipage title Roadmap http : aspnetwebstack.codeplex.com wikipage title Roadmap We ll be starting the MVC 5 roadmap soon . .. . Answer : it s here .. . .. . http : aspnet.codeplex.com wikipage title ASP.NET 20MVC 204 20RoadMap .. . .. . http : haacked.com archive 2011 07 13 asp-net-mvc-4-roadmap.aspx",
"Question : ASP.NET MVC development has been very fast during the past 2 years . However even though the RTM version of ASP.NET MVC 3 has been released there doesn t seem to be any roadmap for the next releases . The roadmap at codeplex is empty and contains only milestones for the MVC 3 . Also I have not seen any blog posts on things planned for the next release yet . This seems to be different than with the previous two releases . Does anyone have any links to resources on new features that are planned for MVC 4 Comment : I am waiting too . When ASP.NET MVC 2 was released they updated roadmap at same day . Comment : The roadmap is aspnetwebstack.codeplex.com wikipage title Roadmap http : aspnetwebstack.codeplex.com wikipage title Roadmap We ll be starting the MVC 5 roadmap soon . .. . Answer : The Release Notes of the final Version can be found here : http : www.asp.net whitepapers mvc4-release-notes",
"Question : I am new to ASP.NET MVC 4 . I have used a custom dependency resolver in my ASP.NET MVC 4 project in order to use Dependency injection framework . What is the role of dependency resolver in ASP.NET MVC 4 Comment : so you used it without knowing what it does Why not stop using it Comment : I have used using global.asax.cs file to register the custom dependency resolver . But in global.asax.cs file I didn t find any registering about default dependency resolver . .. . Answer : It allows you to abstract away from Dependency Injection implementation . Later if you decide to switch from Unity to Windsor you can do it much easier without having to re-write lots of code .. . .. . It means that you can resolve your instances using this code Comment : lets say what if we didn t use a dependency-injection framework . how default dependency resolver going to work . Comment : It should not work . For example for controllers it will use Default Controller Factory that creates controllers using their default constructors Comment : @evhen14 I think DefaultControllerfactory uses DependencyResolver to create controller instances .",
"Question : ASP.NET MVC development has been very fast during the past 2 years . However even though the RTM version of ASP.NET MVC 3 has been released there doesn t seem to be any roadmap for the next releases . The roadmap at codeplex is empty and contains only milestones for the MVC 3 . Also I have not seen any blog posts on things planned for the next release yet . This seems to be different than with the previous two releases . Does anyone have any links to resources on new features that are planned for MVC 4 Comment : I am waiting too . When ASP.NET MVC 2 was released they updated roadmap at same day . Comment : The roadmap is aspnetwebstack.codeplex.com wikipage title Roadmap http : aspnetwebstack.codeplex.com wikipage title Roadmap We ll be starting the MVC 5 roadmap soon . .. . Answer : During the discussion of MVC in the day 1 post-keynote interview on http : live.visitmix.com Phil Haack asked that anyone with thoughts and ideas for MVC4 post their thoughts on the ASP.NET MVC forum http : forums.asp.net 1146.aspx 1 MVC as this is where most of the ASP.NET MVC team hang out and where you re most likely to have your thoughts considered and discussed .",
"Question : I use this codes for Role Authorization on my ASP.NET MVC 4 Internet Application. . It works normally but sometimes I have an error. . It is on the this image. . .. . .. . http : forum.yazgelistir.com JS HTMLEditor Image.aspx id 593 siteid 0 http : forum.yazgelistir.com JS HTMLEditor Image.aspx id 593 siteid 0 .. . .. . I have 2 things in my mind. . First .. . .. . I have two connection-string in web.config. . First for entity-framework data model second for SimpleMembership. . By the way what can I do for use only one connection-string http : forum.yazgelistir.com JS HTMLEditor Image.aspx id 594 siteid 0 http : forum.yazgelistir.com JS HTMLEditor Image.aspx id 594 siteid 0 .. . .. . Second .. . .. . I create ASP.NET MVC 4 Internet Application. . After I have to set something for using ASP.NET SimpleMembership role. . Comment : Is there any reason to use two different con-str Why do you use same DB .. . Answer : Do you have in system.web section within web.config... . Note : my roles look to DefaultConnection .. . .. . This appears to also be mentioned here Role based authentication in the new MVC 4 Internet template using simplemembership http : stackoverflow.com questions 12257232 role-based-authentication-in-the-new-mvc-4-internet-template-using-simplemembers"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
web-applications
|
UNK_RELATION
|
facebook-javascript-sdk@facebook@117
|
facebook-javascript-sdk -- facebook s javascript sdk provides a rich set of client-side functionality for accessing @placeholder s server-side api calls .
|
{
"confidence": [
57.122982025146484,
55.41054916381836,
55.38594055175781,
53.91337585449219,
53.846893310546875,
53.531654357910156,
53.50853729248047,
53.131324768066406,
53.059539794921875,
50.769187927246094,
49.53153610229492,
49.53153610229492,
49.01947021484375,
48.373504638671875,
47.065528869628906,
46.96697235107422,
46.96697235107422,
46.41199493408203,
46.239036560058594,
46.19977569580078,
45.80126953125,
45.76813507080078,
45.660980224609375,
45.660980224609375,
45.660980224609375,
45.660980224609375,
45.27548599243164,
45.135772705078125,
45.01971435546875,
44.781005859375,
44.51313781738281,
44.457984924316406,
44.3876838684082,
44.3876838684082,
44.14109420776367,
43.50420379638672,
43.36827087402344,
42.825401306152344,
42.695255279541016,
42.45137023925781,
42.45137023925781,
42.45137023925781,
42.45137023925781,
42.45137023925781,
42.45137023925781,
42.11088943481445,
42.0786018371582,
41.76890182495117,
41.64116287231445,
41.313743591308594,
41.19939422607422,
40.94554138183594,
40.685638427734375,
40.39887237548828,
40.39887237548828,
40.39887237548828,
40.39887237548828,
40.39887237548828,
40.39887237548828,
40.39887237548828,
40.25873565673828,
40.01337814331055,
39.85385513305664,
39.85385513305664,
39.767051696777344,
39.65507125854492,
39.385948181152344,
39.372108459472656,
39.101261138916016,
38.88064956665039,
38.559295654296875,
38.431556701660156,
38.410614013671875,
38.410614013671875,
38.410614013671875,
38.324951171875,
38.247928619384766,
38.247928619384766,
38.18333435058594,
38.10987854003906,
38.10987854003906,
38.10987854003906,
38.10987854003906,
38.1041374206543,
38.1041374206543,
38.1041374206543,
38.1041374206543,
38.08732223510742,
38.08732223510742,
38.08732223510742,
38.046539306640625,
37.99608612060547,
37.611141204833984,
37.611141204833984,
37.14038848876953,
36.808372497558594,
36.78804016113281,
36.64336013793945,
36.53619384765625,
36.50679397583008
],
"content": [
"I m trying to integrate Facebook login into my website with Facebook Javascript SDK .",
"using the facebook js sdk on the client-side and using passport facebook strategy on the server-side",
"To use facebook API for javascript try Facebook Javascript SDK https : developers.facebook.com docs reference javascript",
"I m building a website with Facebook Connect and therefore using the Facebook Javascript SDK .",
"example : devils-heaven.com facebook-javascript-sdk-login http : www.devils-heaven.com facebook-javascript-sdk-login",
"maybe this tutorials helps you to understand what s happening with the js sdk : devils-heaven.com facebook-javascript-sdk-login http : www.devils-heaven.com facebook-javascript-sdk-login",
"it s a methode from the JavaScript SDK .",
"I use Facebook Javascript SDK .",
"I have both .NET Facebook SDK https : github.com facebook-csharp-sdk facebook-csharp-sdk and the Javascript SDK installed in my site .",
"More information and an example : http : devils-heaven.com facebook-javascript-sdk-login",
"The FB.api is called after the Facebook javascript SDK is loaded .",
"That aside why doesn t Facebook utilize the javascript SDK",
"I am trying to use the Facebook javascript sdk for my chrome extension .",
"I also know that facebook provides their own javscript sdk to simply login users directly from the client-side .",
"https : github.com pythonforfacebook facebook-sdk .. . .. . facebook-sdk a set of essential tools for working with Facebook in Python .",
"I am using the Facebook Javascript SDK to upload a photo to the user s timeline .",
"I m using Facebook Javascript SDK to do it and the FB.ui method .",
"I have a mobile web application that uses the Javascript SDK to connect to facebook and use the Graph API to retrieve user information .",
"The user logs in using Facebook Login with the Facebook SDK .",
"omniauth.rb under initializers directory : .. . .. . PS : I am using facebook-javascript-sdk with facebook-omniauth https : github.com mkdynamic omniauth-facebook",
"When calling FB.init method of facebook JavaScript SDK with xfbml set to false thous plugins won t render .",
"https : github.com facebook facebook-android-sdk .. . .. . http : code.google.com p facebook-java-sdk",
"@CBroe Then I think Facebook should mention this restriction in their Javascript SDK tutorial before user start to pick this choice .",
"I m trying to get a long lived facebook-access-token for pages and i m working with javascript sdk .",
"I am trying to use SDK Javascript with Facebook@work .. . .. . I am getting FB is not defined .",
"All I ve done is add the JavaScript SDK based on the tutorial in Facebook for Websites http : developers.facebook.com docs guides web .",
"Is there anyway to do this with the javascript sdk",
"This is the only post on SO that accurately represents all the inconsistencies of using Omniauth client-side with the Facebook SDK .",
"You probably forgot to load the JavaScript SDK : .. . .. . Of course you MUST create an App for this : https : developers.facebook.com apps .. . .. . More information : http : www.devils-heaven.com facebook-javascript-sdk-login",
"Facebook sdk debug getVersion http : i.stack.imgur.com 9RJfu.png",
"I am trying to do this on a regular old PHP website that uses the current JavaScript SDK http : developers.facebook.com docs reference javascript and the PHP SDK https : github.com facebook php-sdk .",
"Better to send only the Facebook userID and access token to the server and look up the user info in a server-side API call .",
"You can do this by using asynchronous Javascript SDK provided by facebook .. . .. . Have a look at the following code .. . .. . FB Javascript SDK initialization .. . .. . Note : Remember to replace YOUR APP ID with your facebook AppId .",
"I have tried to use both ways using an iframe and using Facebook SDK for JavaScript and I have noticed that using an iframe was displayed a long time before the other one using Facebook SDK for JavaScript .",
"I got this error in javascript console while using the Facebook Login Api .",
"Or with a server-side PHP SDK call to the Graph",
"but is this deprecating the javascript sdk altogether or just the javascript sdk for authentication .",
"I don t know if the best way is to call a PHP page via ajax where validates EMAIL + PASS via Facebook PHP SDK or Facebook SDK Javascript .",
"For facebook-authentication I use facebook-node-sdk https : github.com amachang facebook-node-sdk to connect with facebook and retrieve details .",
"According facebook-javascript-sdk we can only send message to only one user at a time .",
"I have just put implemented Facebook connect on my web-site using the JavaScript SDK .",
"@Michael : all i am doing is call Fb.init where the javascript facebook connect sdk is mentioned .",
"If you use the JavaScript SDK you have to ask Facebook to index and cache your page .",
"Like so : .. . .. . Explanation .. . .. . If you unminify the Facebook JavaScript SDK you ll see that its basically an object-literal with a bunch of properties .",
"I want to ask a user to grant the publish stream permission to my app with the facebook-javascript-sdk .",
"Why don t you just combine the javascript-sdk with the php-sdk as it seems you re using php as the server-side language anyway",
"In the Facebook SDK here under 4 .",
"This should be a working example how to do a login correctly copied together from several articles in the Facebook docs : .. . .. . More explanation : http : www.devils-heaven.com facebook-javascript-sdk-login",
"Here I am using Facebook Login button plugin and javascript sdk .. . .. . I am able to successfully login and logout by using above .",
"The Facebook SDK requires that div id fb-root div be on the page .",
"Could Facebook page Accesstoken and Signed Request be exposed in client-side aka javascript .",
"I am trying to post picture on facebook using the facebook JS sdk .",
"I know you want to avoid doing graph calls but you can make a call client-side as well and call the Facebook API : .. . .. . This will allow you to check against the logged in user s Facebook id .",
"Also you can directly share link with call by having Javascript Facebook SDK .",
"You can also force the popup or page types when using the Facebook SDK for JavaScript if necessary .",
"I have attempted to call FB.AppEvents.activateApp manually using the Facebook SDK for Javascript but get an error AppEvents undefined .",
"Some of our users have problem with Facebook Javascript SDK - login popup gets blocked even it s triggered by user .",
"This is why I use Facebook Javascript SDK http : developers.facebook.com docs howtos login getting-started .",
"FYI : I have noticed that loading the buttons using an iframe is faster than loading them using the Facebook SDK for JavaScript .",
"I am trying to request additional permissions at the time of a facebook-login using Facebook s suggested Javascript SDK .",
"Updated code .. . .. . I ve updated my code based on Stack OVerflow question Facebook JavaScript SDK over HTTPS loading non-secure items http : stackoverflow.com questions 5212016 facebook-javascript-sdk-over-https-loading-non-secure-items - this however hasn t fixed the issue yet .",
"Javascript SDK code . .",
"And also facebook sdk will be started Asynchronously as the name of the function suggests .",
"I have a Facebook JS SDK apprequest button on my website. .",
"facebook c sdk sucks unfortunately .",
"I m working on a Javascript mobile game which includes some FB functions through the Javascript Facebook API .",
"Developing a web application using Facebook API JavaScript SDK I m trying to store some application-settings on the Facebook so it would be possible to load the settings even if the user has changed a browser .",
"I have heard that the JavaScript SDK is being deprecated and or authentication via the JavaScript SDK is being deprecated .",
"JavaScript SDK documentation says SDK includes all of the features of the REST API and REST API has data.getCookies and data.setCookies .",
"With the new OAuth2 JavaScript SDK calls I see no documentation for enable profile selector .",
"You need to fill the value for Website with Facebook Login with the value http : localhost OfferDrive to allow Facebook to authenticate that the requests from JavaScript SDK are coming from right place",
"Is there a way to control the user prompt defaults to Say something about this.. . in a facebook feed dialog using the Javascript SDK https : developers.facebook.com docs reference dialogs feed",
"Please see the Getting Started with the Facebook SDK : Create a Facebook App section for more details on this .",
"I m trying to use fb https : github.com node-facebook facebook-node-sdk plugin .",
"Facebook SDK uses the Facebook Application to handle the login process if it s installed on the device otherwise it fallbacks to a webview based login .",
"For future references.. . .. . .. . Using JavaScript SDK",
"of course you need an app to use initialize the javascript sdk",
"I need to get the access token from FB.login method in Javascript SDK .",
"I m using the Facebook JavaScript SDK and the code I ve got to logout looks like this : .. . .. . This is the logout code specified at the Facebook Developers Documentation http : developers.facebook.com docs reference javascript FB.logout just with a button being assigned the method on document.ready .. . .. . Before this code I have the FB.init method that all runs fine .",
"Sometimes this error occurs for old javascript sdk .",
"I m working on using Facebook s Javascript SDK for authentication .",
"The current javascript SDK definitely isn t being deprecated .",
"i am using FB JavaScript SDK for that .",
"Use Facebook sdk v2.2 or whatever the latest in your app .",
"First you need the Facebook SDK bundle that contains base facebook.php facebook.php and fb ca chain bundle.crt .",
"I saw that facebook now requires an app-id to use the JS SDK .",
"So is there a way to make new Facebook Apps with the current JS SDK",
"Latest JavaScript SDK from facebook connect.facebook.net en US all.js http : connect.facebook.net en US all.js .. . 2 .",
"I am writing Facebook login for my site.I am using Javascript Sdk but I don t understand one thing .",
"I am using JavaScript sdk for one of my Facebook canvas game application .",
"Are you using the JavaScript SDK or the C SDK or neither",
"Check this for details : SDKs Tools JavaScript SDK FB.login http : developers.facebook.com docs reference javascript FB.login",
"The example on FB s chat document shows PHP on the server-side however I need to connect-by getting the access token from the JavaScript sdk .",
"Does anyone have working code where the access token comes from the JavaScript sdk in a browser rather than from the server-side",
"By doing this you know that the login request hit your server as the user with user id used client-side SDK .",
"I am using Javascript SDK with Facebook at Work Graph API and my goal is to be able to publish a post to a user s wall preferably with an attachment or maybe create an event .",
"If you are not loading the javascript sdk async you could see this error a lot .",
"I m using the Facebook JS sdk and I have created a new App today .",
"Start reading the JavaScript SDK documentation http : developers.facebook.com docs reference javascript .. . 2 .",
"Actually I have succeeded to use Facebook Share Button inside an iframe instead of Loading Facebook SDK for JavaScript : .. . .. . In this way I can change the url to Share without refreshing reloading the whole page ."
]
}
|
{
"confidence": [
63.985782623291016,
62.19759750366211,
61.58838653564453,
59.13938522338867,
58.91189193725586,
58.706485748291016,
58.042972564697266,
57.841285705566406,
57.66712188720703,
57.28352737426758,
56.51395797729492,
56.27024841308594,
56.171878814697266,
55.82701110839844,
55.33186340332031,
55.327911376953125,
54.93119812011719,
54.69268798828125,
54.6060905456543,
54.52692413330078
],
"content": [
"Question : I know there are currently two methods that can be used to do this documented poorly on Facebook s Developer site : .. . .. . 1 . The old depreciated JavaScript SDK FB.Connect.createApplication http : developers.facebook.com docs reference oldjavascript FB.Connect.createApplication .. . 2 . A new FBJS method Facebook.createApplication only for use on Canvas pages http : developers.facebook.com docs fbjs createApplication .. . .. . The problem is that I not using a Canvas app that runs FBJS and I am not using the OLD JS SKD . I am trying to do this on a regular old PHP website that uses the current JavaScript SDK http : developers.facebook.com docs reference javascript and the PHP SDK https : github.com facebook php-sdk . I am doing the usual Open Graph API calls and such with the current SDK so I understand the basics I m just not sure how to proceed to use the OLD SDK or if fingers crossed I even really have to So is there a way to make new Facebook Apps with the current JS SDK Or with a server-side PHP SDK call to the Graph And if not how do I call the old SDK to do this .. . .. . Thanks .. . .. . UPDATE : You still can t do this but there is an official bug in the Facebook tracker about it : http : developers.facebook.com bugs 295627350461318 .. . Answer : There isn t outside of the OLD SDK as you indicated . It s been removed what Facebook calls deprecated . I put in a feature request recently for them to add it back into the API : .. . .. . Me : .. . .. . The Facebook Developer tool is considerably lacking in features . We d like to be able to create a third party application that adds layers of functionality to the developer application but we d need to be able to create and administer applications via the Graph API . .. . The Graph API supports querying for information on existing applications . To create administer or delete applications developers must go to the Developer Application . Them : .. . .. . ------- Comment 1 From Jeff Bowen 2010-12-07 16 : 59 : 12 - reply .. . .. . ------- Thanks for the request . We ll track this on our wishlist Comment : Thanks for your answer you have confirmed my suspicions . But I am also looking for guidance on HOW to create apps using the Old API . Comment : Sorry for leaving this hanging so long - I have given up on figuring out how to do this with the old API obviously - so here is the answer flag Also check out the official bug about this here : developers.facebook.com bugs 295627350461318 http : developers.facebook.com bugs 295627350461318 Comment : Seems this bug bugs 295627350461318 has been fixed or the interweb gremlins have eaten it . It no longer exists .",
"Question : Developing a web application using Facebook API JavaScript SDK I m trying to store some application-settings on the Facebook so it would be possible to load the settings even if the user has changed a browser . There are data.getCookies and data.setCookies methods described on the Facebook API documentation but both of them don t work . They return .. . .. . Here is the request I m sending : .. . .. . All other methods from the documentation work fine for instance : .. . .. . returns an array with uid s . Are data . methods deprecated Is there a workaround .. . Answer : There are data.getCookies and data.setCookies methods described on the Facebook API documentation .. . .. . Where exactly but both of them don t work . Facebook has recently turned some methods in the SDK that before where publicly available into private ones . Developers should only use the methods described here : https : developers.facebook.com docs reference javascript .. . .. . Everything else is not guaranteed to work in any particular way nor guaranteed to continue working if it should do so right now by pure chance . Comment : JavaScript SDK documentation says SDK includes all of the features of the REST API and REST API has data.getCookies and data.setCookies . The problem if they are depricated is that there is no alternative for them . Comment : That may be an old comment not updated yet . Fact is the Rest API has been deprecated for quite some time now and using any of it s features in a new build app is not a good idea . And maybe Facebook has given up on the possibility to store data on their side via cookies altogether . You could store it on your side and relate it to the user once the log in to your app .",
"Question : null .. . Answer : I am working on a website and I need a facebook-login system for users . Since I am working with NodeJs I found the passport module for authentication . I also know that facebook provides their own javscript sdk to simply login users directly from the client-side . My question is : what is the difference between these two ways of authenticating users using the facebook js sdk on the client-side and using passport facebook strategy on the server-side",
"Question : This issue is very common in stackoverflow and there s a lot of different questions and answers about it yet I couldn t find exactly what I need . First I d like to define exactly what I need : the option to let users log in to my app using their Facebook credentials . The app will save a matching classic Django user . I will only need to use the user s profile-picture and to make sure that each time the same Facebook user will be related to the matching Django user . Unfortunately I find it really frustrating to implement for the following reasons : .. . .. . 1 . By now after reading a lot I couldn t find out what is the best package for this task . 2 . Some people recommend django-social-auth and praise its functionality and documentation . Personally I don t understand why since it s not specifically for Facebook and there are no explanations about the client-side i.e the Facebook login button and how the whole flow works . 3 . When you go to Facebook developers you suddenly find yourself reading about some magical javascript sdk and about a promise that that s all you need . Then you get frustrated again and can t understand how a client-side related sdk can sign up users to your app . I know developers somehow implement Facebook auth packages in their apps but I just can t figure out how to do it . If anyone could tell me : at this time point what is the best way to add Facebook authentication to my Django app I would also ask for detailed documentation tutorial that explains how to log in a Facebook user from settings and configuration level through signup to Django app and to client-side code . .. . Answer : The fastest way understand FB s Oauth 2.0 flow is to play with FB s Javascript SDK . Once you get the hang of it the FB s PHP library is similar . Also other OAuth sites like Google Twitter or Dropbox have almost identical implementation . In baby steps : .. . .. . 1 . Learn how to install FB Javascript SDK https : developers.facebook.com docs reference javascript onto a simple page .. . .. . 2 . Use FB.login https : developers.facebook.com docs reference javascript FB.login to determine login status and obtain the login url . 3 . Lastly use FB.Event.Subscribe https : developers.facebook.com docs reference javascript FB.Event.subscribe and subscribe to auth.statusChange to detect the login logout changes . Also good to check out https : developers.facebook.com roadmap on the upcoming features or features being removed . Comment : Thanks - so I need to learn about FB js sdk but don t need to install any special package except python-oauth2 in other words : don t need django-social-auth installed Comment : Correct generally I write small apps http : apps.facebook.com oauth two test to test the FB Google API from time to time just to ensure my code is still valid . This Python app runs on Google App Engine .",
"Question : I want to let users log in on my website using their Facebook ID without reloading the page . This is why I use Facebook Javascript SDK http : developers.facebook.com docs howtos login getting-started . This scheme describes the authorization flow with this SDK : enter image description here http : i.stack.imgur.com FHRE1.png .. . .. . At the end of the process I know that the user is logged in and I know their Facebook ID . I can then register them in my database via this ID and let them use it to log in afterwards . However this seems terribly insecure . In order to let my server-side script know the user s ID I have to send it via AJAX . However I have no way of knowing whether it s the owner of the ID who s trying to log in . Anyone can send the POST request with an ID especially of one gets hold of another user s ID . My current idea is to let the user log in via JS SDK as usual send the ID and Access Token via AJAX to the server and then use cURL in the PHP script to ensure the user is actually logged in . Is this the way to go or am I overlooking better alternatives Comment : Why don t you just combine the javascript-sdk with the php-sdk as it seems you re using php as the server-side language anyway .. . Answer : 1 . You don t need to push the user s ID via ajax . You should on the server-side use the fbsr app-id cookie which holds the signed request . Parse this signed request using your secret app secret issued by FB to get the user id . NOTE : a successful parse also shows that the cookie data provided by FB is not tampered with . 2 . Once you parse the signed request you should also get the issued at time . Check that this time is within the last 10 mins . By doing this you know that the login request hit your server as the user with user id used client-side SDK . Refer : http : developers.facebook.com roadmap completed-changes .. . .. . 3 . You should immediately exchange this code for an access token . If this fails FB will give you an error message of type OAuthException it means that there was an unnatural delay between user signing in to facebook and you getting the login request . With step 2 you can thwart attempts of an attack using old fbsr cookie . If the user from user id already has an account with you then you may wish to stop here and login the user . However there may be scenarios where your app secret may be compromised . To take care of this case you should follow step 3 as the exchange of code for access token can happen only once and within 10 mins of it s issue . If the user doesn t have an account with your site then you anyway need step 3 to use the access token for retrieving other necessary user data like name email etc from FB . Therefore someone else stealing the victim s cookie and trying to attack is possible only within this 10 min security gap . If you are unhappy with this security hole you should migrate to server-side authentication . The decision depends on the sensitivity of the user information you store . And you don t compromise anything moving to server-side auth you can simultaneously continue to use client-side methods for other things . Comment : @exizt I tried to clarify some points for your understanding . If this solves your query you should accept the answer . Comment : I m using java on my server-side . What calls to graph API shall I made for the first step Comment : What do you mean by parsing the cookie how to do this using node.js or ASP.net",
"Question : I m using the Facebook Javascript API for login in conjunction with the official Facebook PHP SDK on my server to execute the two following lines-of-code : .. . .. . With the token I m further able to execute this code which gets the necessary details I need on the server : .. . .. . If I refresh the webpage I m working with and let it fully load everything works correctly and I m able to print to screen all of the details I get back in response . The problem I m having however is that if I quickly refresh the screen either by hitting F5 on Windows machines or COMMAND+R on Macs before the Facebook javascript code executes I get the following thrown error from the Facebook API : .. . .. . This authorization code has been used .. . .. . How do I avoid this Do I wrap the Facebook code on the client-side in a jQuery document-ready function I hesitate to do that because I ve been told that the Facebook Javascript code is good to go as a stand-alone script that is intelligent enough to know when the document is loaded . I m about ready to throw in the towel and just code a manual login process that totally bypasses the Facebook Javascript API . Thanks for your help . .. . Answer : Put the access code into a session access token and then redirect to another page to get the data . 1 . Login Page .. . 2 . Callback Page save into the session variable .. . 3 . Working Page work with the session variable .. . .. . See more : https : benmarshall.me facebook-php-sdk example-login",
"Question : I am looking for a way to verify a users facebook id when posting user specific data using ajax . I want to be able to verify that a facebook user id is correct when posting data using ajax . The problem being that if I post the facebook id as part of my ajax data it can be edited in the javascript . I could make a graph call on the server-side but these are really slow so I want to keep graph calls to a minimum . Preferably only calling it at the beginning . Can any suggest an efficient secure method Comment : Downvoted as this is a dup of your last one . I ve voted to close that one rather than this as this has much more detail . .. . Answer : I know you want to avoid doing graph calls but you can make a call client-side as well and call the Facebook API : .. . .. . This will allow you to check against the logged in user s Facebook id . There s no way you can really modify anything in the javascript to fake being a different logged in Facebook user . Otherwise I m not sure how else you can verify the id unless you have a whole login-system yourself where by you can match session data to saved user data on the database on the server-side . Comment : Surly this is no more secure as I can inject a response Comment : That s true . You can change the Facebook id within the javascript but I m not sure what that would accomplish I guess it depends on the action that you re doing . The access token granted by Facebook should prevent the code from acting as a different person if you were to try and set a different id . Maybe some more details on what it is you re doing when interacting with Facebook and what kind of scenarios you are trying to prevent",
"Question : I m trying to integrate my project with Facebook . I m taking baby steps at first and just trying to login get a Facebook session and get some user data . I m developing it locally so my Facebook application-settings are : .. . .. . The canvas URL is the same as above . I haven t specified a site domain . However when I click on the login button I get an error : .. . .. . At the moment I haven t written any server-side code to deal with redirects etc . All I ve done is add the JavaScript SDK based on the tutorial in Facebook for Websites http : developers.facebook.com docs guides web . What have I done wrong It s obviously something to do with my Facebook application-settings but I can t see what Comment : For readers : please notice that this question and the accepted answer apply both to local server development testing and real servers and urls .. . Answer : Working locally.. . I couldn t get the feeds api to work but the share api worked pretty much straight away with no problems .",
"Question : Here I am using Facebook Login button plugin and javascript sdk .. . .. . I am able to successfully login and logout by using above . When a first time user has gone through authentication process I need to store user basic information i.e . Facebook login name email in my database . Please suggest how I can do this . .. . Answer : Subscribe to the event http : developers.facebook.com docs reference javascript FB.Event.subscribe auth.login . If you do this Facebook will call your handler after a login as happened . In that handler use FB.api http : developers.facebook.com docs reference javascript FB.api to call the Graph API to get any information you desire . For example calling me as shown in the second example will get you basic information about the logged in user . Now you have all the data in JavaScript . To send that up to your server do a plain old XMLHttpRequest AJAX request . Your JavaScript library probably makes this easy -- in jQuery this is jQuery.ajax http : api.jquery.com jQuery.ajax -- but worst case you can use XHR directly http : en.wikipedia.org wiki XMLHttpRequest . Now you have the data on your server and you can do whatever you want like store it in the database . If you only want to store the data once just check that you haven t already stored info about that user ID yet . Comment : Per @Jon Watte s answer be aware that user info sent via AJAX this way can t be trusted . Better to send only the Facebook userID and access token to the server and look up the user info in a server-side API call . Comment : Isn t there a more elegant way with Facebook directly This solution is very insecure",
"Question : I want to let users log in on my website using their Facebook ID without reloading the page . This is why I use Facebook Javascript SDK http : developers.facebook.com docs howtos login getting-started . This scheme describes the authorization flow with this SDK : enter image description here http : i.stack.imgur.com FHRE1.png .. . .. . At the end of the process I know that the user is logged in and I know their Facebook ID . I can then register them in my database via this ID and let them use it to log in afterwards . However this seems terribly insecure . In order to let my server-side script know the user s ID I have to send it via AJAX . However I have no way of knowing whether it s the owner of the ID who s trying to log in . Anyone can send the POST request with an ID especially of one gets hold of another user s ID . My current idea is to let the user log in via JS SDK as usual send the ID and Access Token via AJAX to the server and then use cURL in the PHP script to ensure the user is actually logged in . Is this the way to go or am I overlooking better alternatives Comment : Why don t you just combine the javascript-sdk with the php-sdk as it seems you re using php as the server-side language anyway .. . Answer : Once you ve logged in a user via the JS SDK a special cookie will be setup containing credential info encoded with your secret-key if I m correct . This info can then be used via the PHP SDK getUser method https : developers.facebook.com docs reference php facebook-getUser . As long as your API your ajax endpoint is on the same domain as your app you should receive this cookie whenever the user request your server . Of course you need to make sure the Javascript SDK is setup correctly and that you used the cookie : true config option https : developers.facebook.com docs reference javascript FB.init and that you give a valid channel file https : developers.facebook.com docs reference javascript channel . If these requirement ain t met you may have some trouble with cross-domain communication and 3rd party cookie in IE and Safari . You can also check this related question : A proper approach to FB auth http : stackoverflow.com questions 13351235 a-proper-approach-to-fb-auth",
"Question : I ve asked this on the Facebook Developer Forums but no-one is answering so thought i d ask it on Stack . I ve got a website which integrates with Facebook Connect using OAuth for authentication . But i have some code which leverages the JavaScript SDK http : developers.facebook.com docs reference javascript . I have heard that the JavaScript SDK is being deprecated and or authentication via the JavaScript SDK is being deprecated . Can anyone : .. . .. . Confirm if the above statement is true .. . Provide a link giving the date that it is to be deprecated .. . Tell me im wrong .. . .. . EDIT .. . .. . For anyone who is curious as to why i still use the JavaScript SDK see my other Stack question http : stackoverflow.com questions 5508057 facebook-connect-c-sdk-how-to-see-if-user-is-authenticated-to-fb-but-dont for the reasoning . In short this cannot be done with OAuth Graph API : Comment : if your going to vote to close as off topic at least give a reason . i realise the developer forums are more appropriate but as i said getting no love . what else can i do .. . Answer : To be very clear we are not deprecating the JavaScript SDK https : developers.facebook.com docs reference javascript . It s here to stay . We are in the process of changing it to rely on OAuth 2.0 http : tools.ietf.org pdf draft-ietf-oauth-v2.pdf but it will be just as simple to use . If you use access token today then the changes will be minor largely replace session.access token with authResponse.accessToken once the updated JS SDK is out . If you rely on session key and secret and use md5 signature based calls then you have some migrating to do since those will go away in the OAuth 2.0 only world . Comment : We So are you on the Facebook team And so are you saying we can continue to use FB.getLoginStatus xd receiver.htm etc Comment : I m an engineer in the the Platform team at Facebook by we I meant Facebook -- should have been clearer about that . You can indeed keep using FB.getLoginStatus keeping in mind the changes wrt to OAuth 2.0 as mentioned above . Comment : Awesome . That s all i needed to know - cheers",
"Question : I am trying to use SDK Javascript with Facebook@work .. . .. . I am getting FB is not defined . What do I have to put on the appId fied the community ID doesn t work and I can t have any App on facebook@work . Thank you for your help . .. . Answer : You probably forgot to load the JavaScript SDK : .. . .. . Of course you MUST create an App for this : https : developers.facebook.com apps .. . .. . More information : http : www.devils-heaven.com facebook-javascript-sdk-login Comment : I thaught I don t need an app when it s about Facebook@Work Comment : of course you need an app to use initialize the javascript sdk Comment : The app is created I made it public but still have the same error . FB is not defined Comment : then you did not load the javascript as i have explained in my answer . take a look at the code and make sure you understand what it does . also of course don t try this by just opening your html file locally without a server .",
"Question : I ve asked this on the Facebook Developer Forums but no-one is answering so thought i d ask it on Stack . I ve got a website which integrates with Facebook Connect using OAuth for authentication . But i have some code which leverages the JavaScript SDK http : developers.facebook.com docs reference javascript . I have heard that the JavaScript SDK is being deprecated and or authentication via the JavaScript SDK is being deprecated . Can anyone : .. . .. . Confirm if the above statement is true .. . Provide a link giving the date that it is to be deprecated .. . Tell me im wrong .. . .. . EDIT .. . .. . For anyone who is curious as to why i still use the JavaScript SDK see my other Stack question http : stackoverflow.com questions 5508057 facebook-connect-c-sdk-how-to-see-if-user-is-authenticated-to-fb-but-dont for the reasoning . In short this cannot be done with OAuth Graph API : Comment : if your going to vote to close as off topic at least give a reason . i realise the developer forums are more appropriate but as i said getting no love . what else can i do .. . Answer : The older SDK is already deprecated but will be available for you to use . But you should really think about migrating to the new SDK http : alekseykorzun.com post 6919673137 why-are-you-still-using-facebooks-legacy-javascript-sdk . Currently the latest PHP-SDK is out of sync in terms of authentication implementations with JS they will be rolling out few changes to both of the SDK s in the near future to unify some of the routines . Comment : trust me i would love to move to the API . Here s why i can t : stackoverflow.com questions 5508057 http : stackoverflow.com questions 5508057 facebook-connect-c-sdk-how-to-see-if-user-is-authenticated-to-fb-but-dont Comment : @Sean that time line is behind the schedule ATM . Comment : @RPM I don t use ASP but if you are having problems transfering session from Social Plug-ins to PHP-SDK v3.0 I have a patch for that here : alekseykorzun.com post 6925234287 http : alekseykorzun.com post 6925234287 integrating-facebooks-social-plug-ins-with-facebook-php Comment : @RPM1984 This might be what your looking for amirrajan.net Blog asp-mvc-and-facebook-single-sign-on http : amirrajan.net Blog asp-mvc-and-facebook-single-sign-on Comment : @Sean - yep i can do all that . but the trick is that requires the user to explicitly click the Connect with Facebook button . With the JavaScript API you can detect if they re already logged in and do the sign in automatically . this is because the JavaScript API allows my site access to Facebook s cookies which the Graph API does not . Hence my conundrum .",
"Question : I ve asked this on the Facebook Developer Forums but no-one is answering so thought i d ask it on Stack . I ve got a website which integrates with Facebook Connect using OAuth for authentication . But i have some code which leverages the JavaScript SDK http : developers.facebook.com docs reference javascript . I have heard that the JavaScript SDK is being deprecated and or authentication via the JavaScript SDK is being deprecated . Can anyone : .. . .. . Confirm if the above statement is true .. . Provide a link giving the date that it is to be deprecated .. . Tell me im wrong .. . .. . EDIT .. . .. . For anyone who is curious as to why i still use the JavaScript SDK see my other Stack question http : stackoverflow.com questions 5508057 facebook-connect-c-sdk-how-to-see-if-user-is-authenticated-to-fb-but-dont for the reasoning . In short this cannot be done with OAuth Graph API : Comment : if your going to vote to close as off topic at least give a reason . i realise the developer forums are more appropriate but as i said getting no love . what else can i do .. . Answer : The current javascript SDK definitely isn t being deprecated . Perhaps they will deprecate the old Facebook connect javascript but they haven t announced a date . The best place for deprecation dates is the Facebook developer roadmap . http : developers.facebook.com roadmap",
"Question : I m trying to integrate my project with Facebook . I m taking baby steps at first and just trying to login get a Facebook session and get some user data . I m developing it locally so my Facebook application-settings are : .. . .. . The canvas URL is the same as above . I haven t specified a site domain . However when I click on the login button I get an error : .. . .. . At the moment I haven t written any server-side code to deal with redirects etc . All I ve done is add the JavaScript SDK based on the tutorial in Facebook for Websites http : developers.facebook.com docs guides web . What have I done wrong It s obviously something to do with my Facebook application-settings but I can t see what Comment : For readers : please notice that this question and the accepted answer apply both to local server development testing and real servers and urls .. . Answer : Something I d like to add since this is error 191 first question on google : .. . .. . When redirecting to facebook instead of your own site for a signed request you might experience this error if the user has secure browsing on and your app does redirect to facebook without SSL .",
"Question : I m trying to integrate my project with Facebook . I m taking baby steps at first and just trying to login get a Facebook session and get some user data . I m developing it locally so my Facebook application-settings are : .. . .. . The canvas URL is the same as above . I haven t specified a site domain . However when I click on the login button I get an error : .. . .. . At the moment I haven t written any server-side code to deal with redirects etc . All I ve done is add the JavaScript SDK based on the tutorial in Facebook for Websites http : developers.facebook.com docs guides web . What have I done wrong It s obviously something to do with my Facebook application-settings but I can t see what Comment : For readers : please notice that this question and the accepted answer apply both to local server development testing and real servers and urls .. . Answer : This is just because of a URL mistake . Whatever website URL is specified should be correct . I mentioned website URL as http : localhost : 3000 and domain as localhost but in my browser I was running http : 0.0.0.0 : 3000 . When I ran server as localhost : 3000 it solved the problem . As I mentioned the site URL as localhost Facebook will redirect to the same if we are running 0.0.0.0 : 3000 it will rise error that Given URL is not allowed by the Application configuration .",
"Question : I m trying to integrate my project with Facebook . I m taking baby steps at first and just trying to login get a Facebook session and get some user data . I m developing it locally so my Facebook application-settings are : .. . .. . The canvas URL is the same as above . I haven t specified a site domain . However when I click on the login button I get an error : .. . .. . At the moment I haven t written any server-side code to deal with redirects etc . All I ve done is add the JavaScript SDK based on the tutorial in Facebook for Websites http : developers.facebook.com docs guides web . What have I done wrong It s obviously something to do with my Facebook application-settings but I can t see what Comment : For readers : please notice that this question and the accepted answer apply both to local server development testing and real servers and urls .. . Answer : I have noticed also that even if you specify your website under secion - Website With Facebook Login - Site url as e.g . http : example.com but if your App Domains section is empty and you open website as www.example.com you will get this error too . To avoid it in App Domains section write example.com that will allow subdomains like www.example.com something.example.com etc",
"Question : I m trying to integrate Facebook login into my website with Facebook Javascript SDK . According to the step by step instructions provided by Facebook Developer document here https : developers.facebook.com docs javascript quickstart v2.2 login here is the test code I wrote : .. . .. . Sorry because of the restriction of website domain I can t take this to fiddle . But I tried on my own domain the Facebook login window popuped in Chrome and Firefox but blocked by Safari . This is kind of weird is there anything wrong for the code-snippets provided by Facebook Developer Document Comment : It is common for modern browsers to block automatic popups automatic meaning they were not triggered by any user interaction like a click . The latter is also the recommendation only call FB.login on click . That makes it much less likely the popup will be blocked . Besides it leaves the choice whether they want to login via FB in the user s hands instead of just pushing it onto them . Comment : @CBroe Then I think Facebook should mention this restriction in their Javascript SDK tutorial before user start to pick this choice . BTW I ve tried user FB.login only on user click action but there are some restrictions such as the authorization code has been used error happens when user tried to login twice . Comment : Well then don t let them try to login twice FB.getLoginStatus tells you if they are logged in already at page load-time and if so don t display a login link but hello name or something instead . And I think Facebook mentions the issue of calls without user interaction somewhere in their best practices the above code however is just a short example and it is the nature of examples not to cover every possible issue . Comment : the example code in the facebook docs is using FB.login in the async callback of FB.getLoginStatus - but it s just an example it should be pretty clear why it gets blocked . .. . Answer : As we already discussed in the comments FB.login must be called on user interaction the example in the docs is not correct . This should be a working example how to do a login correctly copied together from several articles in the Facebook docs : .. . .. . More explanation : http : www.devils-heaven.com facebook-javascript-sdk-login Comment : is this still likely to work seem to be getting the standard Unsupported Browser message at the moment . Comment : yes i am using this every day . not sure what message you are talking about you need to be a lot more specific . Comment : do you have an example site that I can visit I ve copied the code above into mine but still get the Error Unsupported Browser : Google Chrome for IOS doesn t support this feature . PLease use Safari I m using my iphone to test Comment : To be clear it works on a desktop Chrome but not mobile Chrome Comment : that error is completely unrelated to this topic you are definitely doing something else . check out this thread it s about that exact error message : stackoverflow.com questions 26916545 http : stackoverflow.com questions 26916545 any-workaround-to-avoid-unsupported-browser-when-trying-to-use-fb-ui-on-ch",
"Question : I need to retrieve a facebook-page s list of posts feed using their javascript SDK just like they explain in their docs : https : developers.facebook.com docs graph-api reference v2.4 page feed .. . .. . I need it to be my website s news section so users should see it even if they are not connected to facebook . The problem .. . .. . Cool but there is a problem.. . It returns : An access token is required to request this resource . Holy cow.. . I d like to get some access token for you @facebook but my app doesn t make use of your authentication tools plugins . ANYWAY I tried with FB.getLoginStatus https : developers.facebook.com docs reference javascript FB.getLoginStatus but doesn t work because the only way it can return an access token is if the user is actually connected to the application . My users may not even be logged to facebook So How can I get an access token to be stored into a variable and later be used to get my-page posts I ve already payed a look to this SO question http : stackoverflow.com questions 14449927 getting-an-access-token-without-user-login-in-facebook-graph-api but it doesn t solves my problem simply because there are no such generic tokens . I ve also read https : developers.facebook.com docs facebook-login access-tokens and that also relies on tokens generated through facebook-login methods.. . So can t I display a list of fb page s posts in my website without being connected into facebook hence an application ADD : My app is build with angularJS I m not dealing with server-side code . I shall rely purely on javascript methods . Comment : It seems you have to be authenticated in facebook to use facebook Comment : Hey did you find a way to do this I m still trying to figure out how to have that page access token and call the api via PHP.. . .. . Answer : You could either use an page or an app access token but as you d be using them on the client-side neither of them are an option . See .. . .. . https : developers.facebook.com docs facebook-login access-tokens apptokens .. . https : developers.facebook.com docs facebook-login access-tokens pagetokens .. . .. . Note that because this request uses your app secret it must never be made in client-side code or in an app binary that could be decompiled . It is important that your app secret is never shared with anyone . Therefore this API call should only be made using server-side code . I d strongly recommend to build a simple server-side script PHP for example to proxy the request to the Graph API . You could then call this via AJAX for example and load the posts asynchronously and alse get rid of the FB JS SDK . There is NO way to handle this in a secure manner if you don t want to use FB Login for all of your users which also doesn t make much sense IMHO . Comment : Ok let me recap a bit : D You re suggesting me to build my own API using PHP for example and facebook PHP SDK to target the my-page posts endpoint of facebook API and then I call my own api from my client just like api pageFeed which should return the same object that I d get if I were logged to facebook and I call my-page posts normally with an access token Sorry for the looooong question : D Comment : More or less an accurate recap : - If you re more familiar with JS you could also write a 20 line Node.js script . You can create an eternal page access Token which doesn t need to be refreshed for calling the Graph API Comment : Let me talk with the back-end crew and I ll come back at you later Btw what do you suggest : That my API returns the generated token only and I do the rest in JS or approach the server-side script to return the full json object from page posts instead Comment : I d recommend the latter .",
"Question : This issue is very common in stackoverflow and there s a lot of different questions and answers about it yet I couldn t find exactly what I need . First I d like to define exactly what I need : the option to let users log in to my app using their Facebook credentials . The app will save a matching classic Django user . I will only need to use the user s profile-picture and to make sure that each time the same Facebook user will be related to the matching Django user . Unfortunately I find it really frustrating to implement for the following reasons : .. . .. . 1 . By now after reading a lot I couldn t find out what is the best package for this task . 2 . Some people recommend django-social-auth and praise its functionality and documentation . Personally I don t understand why since it s not specifically for Facebook and there are no explanations about the client-side i.e the Facebook login button and how the whole flow works . 3 . When you go to Facebook developers you suddenly find yourself reading about some magical javascript sdk and about a promise that that s all you need . Then you get frustrated again and can t understand how a client-side related sdk can sign up users to your app . I know developers somehow implement Facebook auth packages in their apps but I just can t figure out how to do it . If anyone could tell me : at this time point what is the best way to add Facebook authentication to my Django app I would also ask for detailed documentation tutorial that explains how to log in a Facebook user from settings and configuration level through signup to Django app and to client-side code . .. . Answer : django-social-auth is not just for Facebook but that doesn t mean you should use all the backends available . Project documentation is at http : django-social-auth.readthedocs.org en latest index.html and Facebook backend details at http : django-social-auth.readthedocs.org en latest backends facebook.html . Comment : I have followed the documentation and installed django-social-auth and used only the Facebook related backends . I have also set somthing in the project s urls.py . Yippi . Now what What about the views How do users being created How could it be that I didn t write any views.py function Where is the flow described What about the client-side and Facebook s login button What about tokens What to do next.. . Comment : django-social-auth DSA from now on takes care of login registration disconnection only it doesn t offer other views templates etc that s up to the user to fulfill the user-experience desired for the site . User registration is triggered by any link button pointing to login facebook you can use url socialauth begin facebook in your templates that will create an instance of User and UserSocialAuth with Facebook access token Facebook ID . etc . Then you can call any Facebook API that your access token has rights to access . There s no explanatory flow at the moment . Comment : Thanks but this is exactly the problem - no explanatory flow at the moment . Since I m not skilled enough to make one of my one I just hope that in the future some noble soul will ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
facebook
|
UNK_RELATION
|
ocpsoft-rewrite@url-rewriting@47
|
ocpsoft-rewrite -- an open-source routing and @placeholder solution for servlet java web frameworks and java-ee .
|
{
"confidence": [
50.25989532470703,
44.16145324707031,
40.5297737121582,
37.7138786315918,
37.7138786315918,
36.666412353515625,
36.39539337158203,
33.9208869934082,
31.473957061767578,
30.32951545715332,
30.02351188659668,
28.99945068359375,
28.362205505371094,
28.179256439208984,
27.080055236816406,
26.617048263549805,
26.46215057373047,
26.176589965820312,
26.110233306884766,
26.084556579589844,
26.084556579589844,
26.084556579589844,
25.34047508239746,
25.302305221557617,
25.08963394165039,
25.01464080810547,
24.743623733520508,
24.743623733520508,
23.682662963867188,
23.54852867126465,
23.54852867126465,
23.54852867126465,
23.54852867126465,
23.54852867126465,
23.54852867126465,
23.405658721923828,
23.003753662109375,
22.329105377197266,
22.269115447998047,
21.702835083007812,
21.57110023498535,
21.44025230407715,
20.991762161254883,
20.43636703491211,
20.43636703491211,
20.43636703491211,
20.43636703491211,
20.43636703491211,
20.43636703491211,
20.43636703491211,
20.43636703491211,
20.43636703491211,
20.43636703491211,
20.43636703491211,
20.43636703491211,
20.43636703491211,
20.43636703491211,
20.43636703491211,
20.43636703491211,
19.36640167236328,
18.54572296142578,
18.54572296142578,
18.48546028137207,
18.371742248535156,
18.371742248535156,
18.371742248535156,
18.371742248535156,
18.371742248535156,
18.371742248535156,
18.371742248535156,
18.371742248535156,
18.371742248535156,
18.371742248535156,
18.371742248535156,
18.371742248535156,
18.371742248535156,
18.371742248535156,
18.371742248535156,
18.371742248535156,
18.371742248535156,
18.371742248535156,
18.371742248535156,
18.371742248535156,
18.371742248535156,
18.371742248535156,
18.371742248535156,
18.371742248535156,
18.371742248535156,
18.371742248535156,
18.371742248535156,
18.371742248535156,
17.3042049407959,
15.897234916687012,
15.897234916687012,
15.897234916687012,
15.897234916687012,
15.897234916687012,
15.897234916687012,
15.897234916687012,
15.897234916687012
],
"content": [
"I am using Ocpsoft Rewrite .",
"This is a bug : github.com ocpsoft-rewrite issues 160 https : github.com ocpsoft-rewrite issues 160 We will work on fixing ASAP .",
"Changing the proxy conf or the ocpsoft-rewrite conf",
"I want to use ocpsoft-rewrite in order to overcome proxy issues with Richfaces .",
"I m using Ocpsoft Rewrite to perform URL rewriting in a JSF project .",
"I add the rewrite-integration-cdi https : github.com ocpsoft-rewrite tree master integration-cdi artifact in the pom.xml .",
"I already read this thread https : github.com ocpsoft-rewrite issues 151 but the workaround doesn t work for me .",
"I m using JSF 2.2 Mojarra 2.2.8 and ocpsoft-rewrite 2.0.12.Final In the 8.2.1 WildFly server .",
"Until then you can use the latest 2.0.11-SNAPSHOT when it deploys to the Sonatype Snapshots repository tonight or build from sources if you need it sooner https : github.com ocpsoft-rewrite :",
"This construct will indeed fail as described when the rewrite filter runs before the authentication filter and the rewrite filter performs internally a RequestDispatcher forward https : docs.oracle.com javaee 7 api javax servlet RequestDispatcher.html forward-javax.servlet.ServletRequest-javax.servlet.ServletResponse- call on the target source .",
"Additionally if you could post a sample application on the OCPsoft support forums it would be very helpful to determing what is going on .",
".. . .. . EDIT .. . .. . On a server test or prod .. . .. . when I redirect in JSF using FacesContext.getCurrentInstance .getExternalContext .redirect the ocpsoft-rewrite doesn t perform the redirect so the url remain resource-1 view.xhtml id 42 .",
"It is about URL configuration for rewrite .",
"When updating OCPsoft Rewrite http : ocpsoft.org rewrite from Version 1.0.5.Final to 1.1.0.Final the following Rule no longer works and I don t know how to fix it : .. . .. . In the Rewrite changelog https : github.com ocpsoft-rewrite blob master CHANGELOG.md there is one point that could help you help me : .. . .. . Configuration strings are now literal .",
"Even though the rewrite uses the content out of secure .",
"This bug has been documented in the Rewrite issue tracker has now been resolved and will be included in the 2.0.11.Final release of Rewrite in the next few days .",
"The Project layout is as follows : .. . .. . src .. . main .. . java .. . resources .. . webapp .. . META-INF .. . services .. . org.ocpsoft.rewrite.config.ConfigurationProvider containing the full qualified-name to the ConfigurationProvider implementation .. . WEB-INF .. . resources .. . target .. . .. . My project is Maven based using JSF2 with Richfaces 4.3.0.Final and opcsoft rewrite 1.1.0.Final .",
"when I navigate returning an outcome : resource-1 view.xhtml faces-redirect true includeViewParams true id 42 in the action param of a commandButton the ocpsoft-rewrite does perform the redirect so the URL is now resource-1 42 view but that URL is not join so I have a not found page .",
"Step : .. . .. . Login page : The user will login into the web portal .",
"I m using the latest stable version of Rewrite 2.0.12.Final by Maven .",
"I definitely should ve pay more attention to the Rewrite documentation .",
"Now I left only rewrite-servlet.jar and everything works fine",
"I want to rewrite my URLs .",
"After more research and googling i ve found the solution :",
"My solution was to move or copy the multipart-config setting to the default servlet in web.xml :",
"I require to rewrite the URL of these pages and I would like to use this framework http : ocpsoft.org rewrite .",
"I m new to Rewrite and I m just trying to make my test application work with it using simple redirect rules .",
"The problem was with dependencies - I included all rewrite- JARs from Maven to my application .",
"But you will be able to read the parameter using the standard Servlet API :",
"There was no problem for the last one year suddenly I started getting too much of logs .",
"e.g .",
"when I hit my profile page face profile.jsf I am getting following logs .. . .. . I was using 3.0.0.Alpha6 and I tried upgrading to 3.0.0.Alpha10 .",
"Still no use .",
"What could be the problem",
"how do i disable this logging",
"Without Rewrite : Request.getWrapper returns StandardEngine Catalina .StandardHost localhost .StandardContext TestWeb .StandardWrapper Faces Servlet .. . .. . With Rewrite @URLMapping annotation : Request.getWrapper returns StandardEngine Catalina .StandardHost localhost .StandardContext TestWeb .StandardWrapper default .. . .. . So it seems that I need to configure this application s default container similar to how Faces is configured or find a way to get Rewrite to delegate to the Faces Servlet container .",
"I want to rewrite my urls like this : .. . .. . admin - admin admin.xhtml .. . .. . I wrote this code : .. . .. . but with this configuration I got this exception : .. . .. . How can i use one variable from when twice in perform",
"All parameters including original ones from the original URL will be available via the standard Servlet API :",
"Here is the warning message I receive : .. . .. . WARNING : No ConfigurationProviders were registered : Rewrite will not be enabled on this application .",
"Seems like the issue is the rewrite library 2.0.12 .",
"I m developing a web application that provides some pages .",
"I know that is possible but I haven t some experience with this framework. . If you know other frameworks that allow to do it please tell me .",
"URL rewriting solution needed http : stackoverflow.com questions 9905946 jsf-url-rewriting-solution-needed .",
"I want to create the following scenario : .. . .. . 1 .",
"Each user has an username .",
"For example tester12345 .",
"This username is stored in the database .",
"2 .",
"Step : .. . .. . After the redirect from the login page all pages should be in this format : .. . .. . http : tester12345.domain.com . . .. . .. . This means : username .domain.com . . .. . .. . How can I do this",
"No websites have been seen so far that use this sort of URLs .",
"Why not use REST like things instead in which you can meet with URLs such as those you see on this site stackoverflow.com including other sites in its network",
"@Tiny : never seen zeef.com https : zeef.com",
"It uses basically the same technique albeit for a completely different functional requirement .",
"@BalusC : I visited several times but did not much concentrate on the incoming URLs in the address-bar .",
":",
"You would need to do something like this :",
"I have this rewriteconfiguration : .. . .. . Is there a way that I can map this one time",
"I just want the .xhtml part is mapped .",
"I thought something like this would work but it didden t :",
"It seems like it should default to the FacesServlet s settings because that s the final destination after rewrite .",
"The following did the trick I just had to reorder the join clauses : .. . .. . Thanks to Lincoln who figured this out and answered my question on the Rewrite support forums .",
"WEB.xml : .. . .. . home.xhtml .. . .. . context.xml .. . .. . Updated After creating a simplified application it appears that the Rewrite library is causing a different container wrapper to be used in the request .",
"Again this is working in dev but not in test in a server behind a revers proxy .. . .. . Maybe the projectstage solution will work if I use the IP address but that doesn t sound to be a good idea to deal with IP even if I m in a standalone mode .",
"Could you please post the XHTML page you are attempting to render",
"Thanks .",
"ocpsoft.org support http : ocpsoft.org support",
"The problem is not about the XHTML page .",
"I want to render admin admin.xhtml with admin URL .",
"Yes I understand this but the way in which the URL is being rendered is an important factor here .",
"I need to know how the failing link is being generated .",
"It happens when i directly enter the URL in the address-bar .",
"There is no special command in the XHTML file.I think it happens just when filter matches admin address .",
"@Lincoln",
"Confirmed .",
"But for every redirect event I m getting Response already committed error in log in spite of redirect works well and I can see target page in my browser .",
"I checked it with Glassfish 4.1 and Wildfly 9 the problem is same .",
"Here is stack-trace for Wildfly : .. . .. . ExampleConfigurationProvider.java : .. . .. . web.xml :",
"Sorry but I ve already solved the problem by myself .",
"So I have this RewriteConfiguration : .. . .. . And this filter : .. . .. . The problem I have facing is that when I for example access the page http : localhost : 8080 webapp profile profile is a file in secure so there is a page secure profile.xhtml but because of the rewriteConfiguration just profile also works .",
"But the problem is that the WebFiler doesn t capture profile it only captures http : localhost : 8080 webapp secure profile.xhtml .",
"Is there a way that the rewrited pages out of secure also get captured with the filter",
"So that when I access the page profile it s handled the same as secure profile.xhtml .",
"Filter will not catch your webapp profile because in your filter your url-mapping is secure that means your url should contain secure followed by anything . .",
"@Babel So I will need to add all the pages out of secure manually in the filter added to secure",
"Filters listen by default on direct requests only .",
"You d need to explicitly add the FORWARD dispatcher to let the filter listen on forwarded requests too .",
"Or in web.xml flavor :",
"Thank you",
"I thought there would be a simple way to also include the forwarded pages to the filter but couldn t find it .",
"This solved the problem I had .",
"You re welcome .",
"I don t like this solution but it serves my purposes for now .",
"Since the JavaScript files could not be found through a proxy configuration similar to the problem described in JSF .",
"Somehow I do not manage to register the ConfigurationProvider correctly .",
"Did you forget to create a META-INF services org.ocpsoft.rewrite.config.ConfigurationProvider file containing the fully qualified-name of your provider implementation",
"Any ideas",
"The location of your SPI file is incorrect .",
"It should be :",
"I have a redirect rule which works fine : .. . .. . However because of the redirect this changes the URL in the navigation bar .",
"I thought I could use a Join rule instead but it doesn t work as i expected : .. . .. . I thought this rule would redirect from for example foo venue 123 to foo protected index.xhtml venueID 123 but I don t get the venueID .. . parameter appended to the URL ."
]
}
|
{
"confidence": [
44.86587142944336,
44.777305603027344,
44.1275634765625,
42.5802001953125,
40.642574310302734,
40.320037841796875,
38.68795394897461,
37.696571350097656,
36.59206008911133,
33.55855178833008,
31.665142059326172,
29.773418426513672,
22.98630142211914,
22.59170913696289
],
"content": [
"Question : I want to use ocpsoft-rewrite in order to overcome proxy issues with Richfaces . Since the JavaScript files could not be found through a proxy configuration similar to the problem described in JSF . URL rewriting solution needed http : stackoverflow.com questions 9905946 jsf-url-rewriting-solution-needed . Somehow I do not manage to register the ConfigurationProvider correctly . Here is the warning message I receive : .. . .. . WARNING : No ConfigurationProviders were registered : Rewrite will not be enabled on this application . Did you forget to create a META-INF services org.ocpsoft.rewrite.config.ConfigurationProvider file containing the fully qualified-name of your provider implementation The Project layout is as follows : .. . .. . src .. . main .. . java .. . resources .. . webapp .. . META-INF .. . services .. . org.ocpsoft.rewrite.config.ConfigurationProvider containing the full qualified-name to the ConfigurationProvider implementation .. . WEB-INF .. . resources .. . target .. . .. . My project is Maven based using JSF2 with Richfaces 4.3.0.Final and opcsoft rewrite 1.1.0.Final . Any ideas .. . Answer : The location of your SPI file is incorrect . It should be :",
"Question : null .. . Answer : I am using Ocpsoft Rewrite . There was no problem for the last one year suddenly I started getting too much of logs . e.g . when I hit my profile page face profile.jsf I am getting following logs .. . .. . I was using 3.0.0.Alpha6 and I tried upgrading to 3.0.0.Alpha10 . Still no use . What could be the problem how do i disable this logging",
"Question : I want to rewrite my urls like this : .. . .. . admin - admin admin.xhtml .. . .. . I wrote this code : .. . .. . but with this configuration I got this exception : .. . .. . How can i use one variable from when twice in perform Comment : Could you please post the XHTML page you are attempting to render Thanks . Additionally if you could post a sample application on the OCPsoft support forums it would be very helpful to determing what is going on . ocpsoft.org support http : ocpsoft.org support Comment : The problem is not about the XHTML page . It is about URL configuration for rewrite . I want to render admin admin.xhtml with admin URL . Comment : Yes I understand this but the way in which the URL is being rendered is an important factor here . I need to know how the failing link is being generated . Comment : It happens when i directly enter the URL in the address-bar . There is no special command in the XHTML file.I think it happens just when filter matches admin address . @Lincoln Comment : Confirmed . This is a bug : github.com ocpsoft-rewrite issues 160 https : github.com ocpsoft-rewrite issues 160 We will work on fixing ASAP . .. . Answer : This bug has been documented in the Rewrite issue tracker has now been resolved and will be included in the 2.0.11.Final release of Rewrite in the next few days . Until then you can use the latest 2.0.11-SNAPSHOT when it deploys to the Sonatype Snapshots repository tonight or build from sources if you need it sooner https : github.com ocpsoft-rewrite :",
"Question : null .. . Answer : I m using JSF 2.2 Mojarra 2.2.8 and ocpsoft-rewrite 2.0.12.Final In the 8.2.1 WildFly server . I want to rewrite my URLs . Here is my conf file : .. . .. . The point is to redirect URL that match a pattern and have an id : resource-1 view.xhtml id 42 to app resource-1 42 view I have to add the contextPath to redirect . And then join the URL resource-1 42 view to the file resource-1 view.xhtml id 42 . And this is working in dev on my CPU but not in test nor in prod on a server . The URL are not redirected : they remain resource-1 view.xhtml id 42 and if I enter the url app resource-1 42 view I have a Not found page .. . .. . Well this not working when I use the domain-name : .. . .. . http : domain.com app resource-1 42 view .. . .. . but if I try with the IP adress : .. . .. . http : 123.123.123.123 : 8080 app resource-1 42 view .. . .. . it s working.. . So I suspect a problem of Apache reverse proxy in fact the URL domain.com is linked to a server while the URL domain.com app is linked to another server . the proxy conf is : .. . .. . Is there something I can do to make the rewriting working Changing the proxy conf or the ocpsoft-rewrite conf .. . .. . EDIT .. . .. . On a server test or prod .. . .. . when I redirect in JSF using FacesContext.getCurrentInstance .getExternalContext .redirect the ocpsoft-rewrite doesn t perform the redirect so the url remain resource-1 view.xhtml id 42 . when I navigate returning an outcome : resource-1 view.xhtml faces-redirect true includeViewParams true id 42 in the action param of a commandButton the ocpsoft-rewrite does perform the redirect so the URL is now resource-1 42 view but that URL is not join so I have a not found page . I tried to redirect with absolute path . I use a JNDI resource that indicate the JSF ProjectStage I previously setup https : planet.jboss.org post setting jsf projectstage with jndi . I add the rewrite-integration-cdi https : github.com ocpsoft-rewrite tree master integration-cdi artifact in the pom.xml . Again this is working in dev but not in test in a server behind a revers proxy .. . .. . Maybe the projectstage solution will work if I use the IP address but that doesn t sound to be a good idea to deal with IP even if I m in a standalone mode . The log I add-in the getConfiguration methoh is called in test and in prod .",
"Question : I m using Ocpsoft Rewrite to perform URL rewriting in a JSF project . I have a redirect rule which works fine : .. . .. . However because of the redirect this changes the URL in the navigation bar . I thought I could use a Join rule instead but it doesn t work as i expected : .. . .. . I thought this rule would redirect from for example foo venue 123 to foo protected index.xhtml venueID 123 but I don t get the venueID .. . parameter appended to the URL . Anyone knows what the correct rule should look like .. . Answer : Your rule looks correct . But a Join doesn t result in a redirect . Instead it forwards the request internally . This means that the URL isn t changed . So you won t see the parameter venueID in the URL . But you will be able to read the parameter using the standard Servlet API : Comment : I have the same problem in a GWT application but I can t get the parameter on GWT side with : Window.Location.getParameter param",
"Question : I m new to Rewrite and I m just trying to make my test application work with it using simple redirect rules . But for every redirect event I m getting Response already committed error in log in spite of redirect works well and I can see target page in my browser . I checked it with Glassfish 4.1 and Wildfly 9 the problem is same . I already read this thread https : github.com ocpsoft-rewrite issues 151 but the workaround doesn t work for me . I m using the latest stable version of Rewrite 2.0.12.Final by Maven . Here is stack-trace for Wildfly : .. . .. . ExampleConfigurationProvider.java : .. . .. . web.xml : .. . Answer : Sorry but I ve already solved the problem by myself . I definitely should ve pay more attention to the Rewrite documentation . The problem was with dependencies - I included all rewrite- JARs from Maven to my application . Now I left only rewrite-servlet.jar and everything works fine",
"Question : When updating OCPsoft Rewrite http : ocpsoft.org rewrite from Version 1.0.5.Final to 1.1.0.Final the following Rule no longer works and I don t know how to fix it : .. . .. . In the Rewrite changelog https : github.com ocpsoft-rewrite blob master CHANGELOG.md there is one point that could help you help me : .. . .. . Configuration strings are now literal . Regular expressions must be configured through a parameter such as : .defineRule .when Path.matches .where .matches . .. . .. . The exception I get is the following one : Comment : PS . Sorry for the late answer : Holidays .. . Answer : The following did the trick I just had to reorder the join clauses : .. . .. . Thanks to Lincoln who figured this out and answered my question on the Rewrite support forums .",
"Question : I m using Ocpsoft Rewrite to perform URL rewriting in a JSF project . I have a redirect rule which works fine : .. . .. . However because of the redirect this changes the URL in the navigation bar . I thought I could use a Join rule instead but it doesn t work as i expected : .. . .. . I thought this rule would redirect from for example foo venue 123 to foo protected index.xhtml venueID 123 but I don t get the venueID .. . parameter appended to the URL . Anyone knows what the correct rule should look like .. . Answer : If you really want you can do a Forward instead : .. . .. . But this won t handle outbound HTML link correction like Join will Comment : OK but if there are other parameters those would be forwarded or not Comment : No it will only forward the parameters you specify in the pattern . Comment : However as Christian mentioned earlier . All parameters including original ones from the original URL will be available via the standard Servlet API : Comment : String id HttpServletRequest.getParameter venueID Comment : How to reach those parameters on GWT side Window.Location.getParameter param does not work .",
"Question : When updating OCPsoft Rewrite http : ocpsoft.org rewrite from Version 1.0.5.Final to 1.1.0.Final the following Rule no longer works and I don t know how to fix it : .. . .. . In the Rewrite changelog https : github.com ocpsoft-rewrite blob master CHANGELOG.md there is one point that could help you help me : .. . .. . Configuration strings are now literal . Regular expressions must be configured through a parameter such as : .defineRule .when Path.matches .where .matches . .. . .. . The exception I get is the following one : Comment : PS . Sorry for the late answer : Holidays .. . Answer : Hmm. . that does look like a bug I ll try to reproduce this but you shouldn t need to re-define i and d in the target URL . Join will handle that for you automatically if you use request binding like so : .. . .. . I m guessing if you do that your problem will go away . You can also use .withInboundCorrection if you d like to redirect requests for the old .html URL to the new URL . If you still have a problem with this please post on the support forums and we ll get it figured out : .. . .. . Sorry you had trouble hopefully it won t be trouble any more :",
"Question : null .. . Answer : I m developing a web application that provides some pages . I require to rewrite the URL of these pages and I would like to use this framework http : ocpsoft.org rewrite . All works fine but the problem is that I need invoke the configuration in a particular moment of startup so I can send a list of link-to be rewrited . I know that is possible but I haven t some experience with this framework. . If you know other frameworks that allow to do it please tell me . Thakns for all Bye .",
"Question : So I have this RewriteConfiguration : .. . .. . And this filter : .. . .. . The problem I have facing is that when I for example access the page http : localhost : 8080 webapp profile profile is a file in secure so there is a page secure profile.xhtml but because of the rewriteConfiguration just profile also works . But the problem is that the WebFiler doesn t capture profile it only captures http : localhost : 8080 webapp secure profile.xhtml . Is there a way that the rewrited pages out of secure also get captured with the filter So that when I access the page profile it s handled the same as secure profile.xhtml . Comment : Filter will not catch your webapp profile because in your filter your url-mapping is secure that means your url should contain secure followed by anything . . Comment : @Babel So I will need to add all the pages out of secure manually in the filter added to secure Even though the rewrite uses the content out of secure . .. . Answer : This construct will indeed fail as described when the rewrite filter runs before the authentication filter and the rewrite filter performs internally a RequestDispatcher forward https : docs.oracle.com javaee 7 api javax servlet RequestDispatcher.html forward-javax.servlet.ServletRequest-javax.servlet.ServletResponse- call on the target source . Filters listen by default on direct requests only . You d need to explicitly add the FORWARD dispatcher to let the filter listen on forwarded requests too . Or in web.xml flavor : Comment : Thank you I thought there would be a simple way to also include the forwarded pages to the filter but couldn t find it . This solved the problem I had . Comment : You re welcome .",
"Question : File uploads are working for small files under the default 2MB limit but will not work for larger files . I m using JSF on Tomcat 8.0 and have modified my web.xml appropriately to increase the limit . I ve put breakpoints in the constructor of javax.servlet.MultipartConfig so I can see it reads the web.xml configuration . When the action is called though it defaults back to the default of 2MB specifically in Request.parseParts .. . the wrapper s config is null so uses the connector s default . WEB.xml : .. . .. . home.xhtml .. . .. . context.xml .. . .. . Updated After creating a simplified application it appears that the Rewrite library is causing a different container wrapper to be used in the request . Without Rewrite : Request.getWrapper returns StandardEngine Catalina .StandardHost localhost .StandardContext TestWeb .StandardWrapper Faces Servlet .. . .. . With Rewrite @URLMapping annotation : Request.getWrapper returns StandardEngine Catalina .StandardHost localhost .StandardContext TestWeb .StandardWrapper default .. . .. . So it seems that I need to configure this application s default container similar to how Faces is configured or find a way to get Rewrite to delegate to the Faces Servlet container . Editing the maxPostSize in Tomcat is an option change the default but not one I want to take if I can avoid it . Comment : You should probably remove your multipart config since the default values are what you want . See docs.oracle.com javaee 7 tutorial servlets011.htm https : docs.oracle.com javaee 7 tutorial servlets011.htm Comment : Not with Tomcat 8.0 as I understand it . Without a specified configuration the default comes from the connector s MaxPostSize which is 2MB Comment : I made a simplified application and it didn t show the same issue so I think I have a configuration problem somewhere . Comment : Seems like the issue is the rewrite library 2.0.12 . Adding just the following line to my bean causes the default 2MB to be used instead of the configured values . @URLMapping id home pattern home viewId faces home.xhtml Doesn t matter if I browser to home or to faces home.xhtml it behaves the same . In fact I can have 2 identical xhtml beans running at the same time with only the @URLMapping difference and bean name and the one without it works . .. . Answer : I don t like this solution but it serves my purposes for now . It seems like it should default to the FacesServlet s settings because that s the final destination after rewrite . My solution was to move or copy the multipart-config setting to the default servlet in web.xml :",
"Question : I want to create the following scenario : .. . .. . 1 . Step : .. . .. . Login page : The user will login into the web portal . Each user has an username . For example tester12345 . This username is stored in the database . 2 . Step : .. . .. . After the redirect from the login page all pages should be in this format : .. . .. . http : tester12345.domain.com . . .. . .. . This means : username .domain.com . . .. . .. . How can I do this Comment : No websites have been seen so far that use this sort of URLs . Why not use REST like things instead in which you can meet with URLs such as those you see on this site stackoverflow.com including other sites in its network Comment : @Tiny : never seen zeef.com https : zeef.com It uses basically the same technique albeit for a completely different functional requirement . Comment : @BalusC : I visited several times but did not much concentrate on the incoming URLs in the address-bar . : .. . Answer : You would need to do something like this :",
"Question : I have this rewriteconfiguration : .. . .. . Is there a way that I can map this one time I just want the .xhtml part is mapped . I thought something like this would work but it didden t : .. . Answer : After more research and googling i ve found the solution :"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
url-rewriting
|
UNK_RELATION
|
jsr179@api@29
|
jsr179 -- jsr 179 - java-me @placeholder that produces information about the device s present physical location to java applications .
|
{
"confidence": [
38.83106231689453,
32.2758674621582,
31.513774871826172,
30.683513641357422,
28.84600830078125,
28.354881286621094,
26.874370574951172,
23.845195770263672,
20.85700225830078,
20.718852996826172,
20.567502975463867,
20.530963897705078,
20.069120407104492,
20.030475616455078,
20.030475616455078,
19.98667335510254,
19.253028869628906,
19.0501708984375,
19.003707885742188,
18.962081909179688,
18.883752822875977,
18.80745506286621,
18.646188735961914,
18.640947341918945,
18.293487548828125,
18.223806381225586,
18.223806381225586,
18.223806381225586,
17.969444274902344,
17.893884658813477,
17.79043197631836,
17.724925994873047,
17.575645446777344,
17.422977447509766,
17.417926788330078,
17.417926788330078,
17.2728271484375,
17.160158157348633,
17.160158157348633,
17.160158157348633,
17.00078582763672,
17.00078582763672,
17.00078582763672,
17.00078582763672,
17.00078582763672,
17.00078582763672,
16.97031021118164,
16.887596130371094,
16.83172035217285,
16.745304107666016,
16.67086410522461,
16.64910888671875,
16.619049072265625,
16.583091735839844,
16.499065399169922,
16.45233154296875,
16.400981903076172,
16.374513626098633,
16.374513626098633,
16.36039924621582,
16.36039924621582,
16.324609756469727,
16.324609756469727,
16.324609756469727,
16.271724700927734,
16.049808502197266,
15.937137603759766,
15.937137603759766,
15.937137603759766,
15.874039649963379,
15.870698928833008,
15.78006649017334,
15.78006649017334,
15.664575576782227,
15.664575576782227,
15.664575576782227,
15.58205795288086,
15.534963607788086,
15.534963607788086,
15.534963607788086,
15.534963607788086,
15.441091537475586,
15.286161422729492,
15.286161422729492,
15.286161422729492,
15.286161422729492,
15.282295227050781,
15.233251571655273,
15.22128677368164,
15.218915939331055,
15.20504093170166,
15.146655082702637,
15.137378692626953,
15.048704147338867,
15.000215530395508,
14.988466262817383,
14.931564331054688,
14.923681259155273,
14.923681259155273
],
"content": [
"JSR 179 Location API for J2ME is intended to support creation of applications based on GPS see JSR 179 specification page section 2.5 http : www.jcp.org en jsr detail id 179 : .. . .. . ...this API shall work with most positioning methods such as GPS.. .",
"JSR-179 is an optional package so it requires permissions and certificate signing .",
"I use java ME location API .",
"I am trying to implement jsr-179 APi into Nokia Symbian phone for periodic location update using setLocationListener through J2me .",
"If you are interested in more details below tutorials make for a good start : .. . .. . Develop a location-based service application using JSR 179 http : www.ibm.com developerworks java tutorials wi-mobilesa .. . Developing Location Based Services : Introducing the Location API for J2ME http : mobiforge.com developing story developing-location-based-services-introducing-location-api-j2me",
"The JSR179 specification defines 7 permissions under javax.microedition.location .",
"Inside GPS mockup .. . .. . If you have access to your application code you can always create a mockup implementation for LocationProvider http : www-users.cs.umn.edu czhou docs jsr179 lapi javax microedition location LocationProvider.html so it will read location and speed data from file or RecordStore and return it as a Location http : www-users.cs.umn.edu czhou docs jsr179 lapi javax microedition location Location.html something like .. . .. . and mockup for your Location .. . .. . Then somewhere on the screen .. . .. . Outside GPS mockup .. . .. . Another option is to generally mockup GPS signals .",
"The best you can do is inform the system that your program is no longer interested in positions via the LocationListener interface : .. . .. . Access to the GPS is managed through JSR 179 which satisfies all location data requests and manages the GPS hardware to provide service .",
"I m getting Location request timed out message .",
"Is it possible to hard code the latitude and longitude values somewhere in the device settings so the app reads those instead of the current location",
"I can instantiate the classes of the jar in the java project but not in j2me .",
"Unfortunately java-me developers usually don t have access to the security policies of real devices .",
"I can able to show one location using co ordinates or longtitude and latitude but i dont know how to show more than one location in the blackberry MapField.If is it possible pls share with me how to do this. .",
"The longitude of the location 100 000 .",
"The label to be displayed beside the location .",
"You mean to say once one gets the cell id of the particular mobile device .. . than one can query for the location of the mobile device with reference to that particular cell If yes .. . can you provide me link or code for the same",
"However you can try to read the network based location by identifying the network s cell associated with the device .",
"Can you please tell me how to change my location in BB simulator",
"When I m sending message with location co-ordinates through my Nokia 5800 .",
"Here is the link-to guide : Build a Project from the Command Line - Java ME SDK http : docs.oracle.com javame dev-tools jme-sdk-3.0-mac UserGuide-html z400007747176.html",
"No code is very dangerous practice just search the web for something like java swallow exceptions .",
"How can they get the location",
"BlackBerry Map .. . .. . It s not possible in Blackberry Map to show custom icon for POI . .. . Things you can include in Location on Blackberry Map : .. . .. . The latitude of the location 100 000 .",
"I want to get the longitude and latitude of device .",
"The reason this works in the simulator but hangs on an actual device is probably that you don t have a GPS fix on the device where you do the testing.. .",
"Sorry but it s not possible to set custom icon for location in BlackBerry Map application .",
"I wrote a very simple application that asks the LocationProvider for a location and prints it to System.out .",
"Remember to zoom in out CustomMapField for best fit of all location points .",
"are you using S40 Series device",
"Try this : .. . .. . .. . .. . Also if youre using System.out.println text in simulator on device it would be better to .. . .. . or",
"How do you setup your location criteria",
"You can connect your Device with external GPS device via bluetooth and fetch GPS details in as NMEA Strings format .",
"The information may not be available on opencellid.org",
"Hi coldice..Thanks for ur information But i can able to invoke a Blackberry map and i can able to show the particular location using longtitude and latitude but now i m trying to change the default pinpoint image to some other image to indicate the location.Is it possible to change the default pinpoint image in Blackberry Map",
"I want to test my app on the device .",
"Steps are : .. . .. . configure device gps receiver for bluetooth for ex .",
"If you re doing GPS programming on a BlackBerry there are two good sources of information : .. . .. . 1 .",
"If it s simulator then before you start program use simulator menu - simulate - GPS Location to set GPS data .",
"I am running the code in a separate thread that simply gets a provider and asks for the location .",
"Pass an array of Coordinates into custom MapField define a bitmap for location point and paint it for each Coordinate in custom MapField paint method .",
"In the BB simulator you can go to Simulate GPS Location .",
"Click save and the simulator will start feeding your new location to the apps .",
"Note that whatever location is displayed in the drop down is the one that will be reported by the simulator .",
"Can I obtain the location using cell tower info",
"For 2 of the verizon phones the application s location update method gets called frequently .",
"For the rest the location listener gets called at a regular 5 minute interval .",
"Absolutely I don t know about in India but in the U.S . some carriers can and do restrict applications from accessing the GPS if they are not approved .",
"However when I run it on my blackberry device the call to getLocation seems to hang indefinitely .",
"setup some opensource gps server on your desktop to produce location data over bluetooth .. . change configuration code of gps server to mockup location data .. . .. . Other options .. . .. . There is a possibility to uncontrolled change of location gps data by shielding gps receiver with some radio-material like alluminium foil or so :",
"Address .. . City .. . Province or state .. . Country .. . Postal code .. . Phone .. . Fax .. . URL .. . Email address .. . Category .. . Rating information between 0 and 5 .. . .. . See What Is - BlackBerry Maps Location Document Format http : www.blackberry.com knowledgecenterpublic livelink.exe fetch 2000 348583 800332 800703 What Is - BlackBerry Maps location document format.html nodeid 1363044 vernum 0 .. . .. . Also see How To - Invoke BlackBerry Maps http : www.blackberry.com knowledgecenterpublic livelink.exe fetch 2000 348583 800332 800703 How To - Invoke BlackBerry Maps.html nodeid 1366963 vernum 0 .. . .. . Using MapField .. . .. . As an alternative you can try MapField http : www.blackberry.com developers docs 4.5.0api net rim device api lbs MapField.html + manager screen paint override .",
"So are there other ways of getting longitude and latitude of mobile device through J2ME",
"You can get a location only from one source and this source depends on phone settings location settings .",
"Use javax.microedition.location http : www.blackberry.com developers docs 4.5.0api javax microedition location package-summary.html .. . .. . See BB Dev Lab - Introduction to Location-based Services ZIP http : na.blackberry.com developers resources LBS 5FLAB.zip .. . Toni Westbrook - Creating a Blackberry GPS Tracker http : www.toniwestbrook.com archives 126 .. . riccomini - code blackberry gps http : www.riccomini.name Topics Mobile BlackBerry BlackBerryGPS .. . riccomini - code blackberry storm gps http : www.riccomini.name Topics Mobile BlackBerry BlackBerryStormGPS .. . .. . Also see blackberrymapsdemo and gpsdemo samples in 4.5 4.6 Eclipse plugin .. . components samples com rim samples device",
"I have to find current user location in map view.How can i do that in black berry.Is it possible to find current location using GPS and show it on BlackBerry in India.Please provide some help.How can i achieve .",
"try to : .. . .. . check if GPS on device is turned on .. . check if your device and carrier have available GPS mode you are using here http : www.blackberry.com knowledgecenterpublic livelink.exe fetch 2000 348583 800332 800703 What Is - The BlackBerry smartphone models and their corresponding GPS capabilities.html nodeid 1371352 vernum 0 .. . if your carrier is Verizone check for Verizon GPSSettings signing requirement http : www.blackberry.com knowledgecenterpublic livelink.exe fetch 2000 348583 800332 800703 What Is - Verizon GPSSettings signing requirement.html nodeid 1365068 vernum 0 .. . reset LocationProvider desribed in Best practices for designing GPS applications for BlackBerry smartphones operating on CDMA networks http : www.blackberry.com knowledgecenterpublic livelink.exe fetch 2000 348583 800332 800703 What Is - Best practices for designing GPS applications for BlackBerry smartphones operating on CDMA networks.html nodeid 1446048 vernum 0 .. . .. . .. . .. . Talking about hanging threads .. . .. . hangs because if you use -1 there will be no timeout .",
"It specifies that class file present at compile-time is not found at run time.Check for build time and run time classpaths .",
"I need to get location at specific times but while I trying I notice that if my phone doesn t get gps location it doesn t look for network location .",
"How do I find the route information between two places in BlackBerry http : en.wikipedia.org wiki BlackBerry",
"See meta.stackexchange.com q 263771 215468 http : meta.stackexchange.com q 263771 215468 for more information .",
"If possible pls tell me how to do . .",
"If it was me I wouldn t bother putting the Thread into pause .",
"I m trying to implement a location tracker sort of application .",
"Edit : here is my code for getting location :",
"You can not define the method for the location provider with the API .",
"When I run this on my device it hangs on the call to getLocation.Here is my code below..plzz tell what i might be doing wrong.. .",
"you can read http : www.developer.nokia.com Community Wiki How to read Location from Bluetooth GPS artical for information .",
"I want to test my app for different locations other than my current location .",
"Can I get a location of mobile-devices from j2me programming having no GPS unit installed",
"I have a BB application in which the location listener is set to a 5 minute interval .",
"I tried it with null Criteria which should give me the defaults right",
"Some carriers like Verizon US blocked GPS for third party applications .",
"I have worked on a project where i have to make a spy app to send GPS location of the user to the server without knowing him here is the code for that i hope it may help you a little bit .",
"I used location api to get the longtitude and latitude the problem now I am facing is that I could not call the getLocation method inside button click event .",
"Check for google-maps on device using CodeModuleManager.getModuleHandle GoogleMaps it returns an integer where non zero means it is available .",
"While I installed Midlet on the device nokia 5230 it is given NullPointerException and the application is automatically terminating .",
"Even Fetching cell-Id from some device require permissions and certificate signing .",
"To turn in back on request a location either through a single location request which will allow it to go off again : locationProvider.getLocation timeout or by setting a listener : locationProvieder.setLocationListener listener interval timeout maxAge At the application level you can only limit your own program s power consumption .",
"Google Maps could determine location using cell tower info but not GPS .",
"When I turn of gps at my phone s settings It gets network location .",
"How can I understand location provider is gps or network",
"You are trying to access a Location API which a restricted API .",
"My code for addProximityListener is - .. . .. . While adding ProximityListener to location provider platform showing me an error which are as follows - .. . .. . I saw its error meaning in documentation which is LocationException - if the platform does not have resources to add a new listener and coordinates to be monitored or does not support proximity monitoring at all .. . .. . But i am not getting how to solve this problem",
"Then you can add locations in your KML file you can even customize location pointers using KML file tags .",
"http : docs.blackberry.com en developers deliverables 11944 CS retrieving the location of a BB cont fix 962151 11.jsp .. . .. . Once you obtain the coordinates you can open the maps application and display the location on a map .",
"And gone through http : developers.sun.com mobility apis articles location doc .. . .. . In this doc they have given code only for mobile-phones having GPS application installed .",
"update I got a link which answers my question : http : mobiforge.com developing story adding-location-a-non-gps-phone-introducing-cellid",
"Invoke BB Maps for route direction .. . .. . You can always use MapField in you application for simple functionality like present locations and use BlackBerry Maps application for enhanced stuff like select locations and route directions presentation for user .",
"This http : javaho.wordpress.com 2011 07 03 server-side-sample-code-to-get-latitude-and-longitude-of-a-given-address-using-google-map-api link has the sample code for getting lat and long from java .",
"On Nokia phones you can get it through something like these : .. . .. . while on Sony Ericsson you have this : .. . .. . Once you get the cell id you can easily use the OpencellID API http : www.opencellid.org api to retrieve more information coordinates and all that about the id .",
"It throws an error as getLocation method cannot be called from event thread.Can any one tell me how to solve this problem",
"Device Version : 4.2.168 Platform 2.3.0.54 .. . .. . Can my carrier block it",
"Actually i have tried all Knowledge base documents and sample applications ya.Both map field and Blackberry map have their own merits and demerits so i don t know which is good for my application.Anyway thanks for ur help its help lot .",
"Took me some time to get it right .",
"there should be a prerequisite decides that this kind of API will be required so you must purchase atleast this level device hence no use of developing such code .",
"Thanks Coldice Can u pls tell me which method is good to develop Blackberry GPS application either MapField or BlackberryMap or some other map and Can u pls tell me what is the difference between MapField and Blackberry map .",
"alt text http : www.blackberry.com knowledgecentersupport kmsupport supportknowledgebase images DB-00599 4.jpg .. . .. . Now in BlackBerry Maps you can register your App menu item and start or update your App with selected location using MapView .",
"But when I run my j2me application I am getting NoClassDefFound Error in the line where I am trying to instantiate the class which is present in the jar .",
"I heard about triangulation http : stackoverflow.com a 9820133 839601 method .",
"But what about the others which does not have GPS in them"
]
}
|
{
"confidence": [
56.478981018066406,
39.74195098876953,
34.82780456542969,
32.97819900512695,
32.278926849365234,
31.988815307617188,
27.015321731567383,
26.859540939331055,
25.230300903320312,
24.810148239135742,
24.597156524658203,
24.168304443359375,
23.726566314697266,
23.342525482177734,
22.808805465698242,
22.721080780029297,
22.666996002197266,
21.794719696044922,
21.508808135986328,
20.755517959594727
],
"content": [
"Question : Can I use GPS in J2me enabled phones I am curious to know whether one can use GPS in J2ME enabled phone or can create an application based on GPS .. . Answer : JSR 179 Location API for J2ME is intended to support creation of applications based on GPS see JSR 179 specification page section 2.5 http : www.jcp.org en jsr detail id 179 : .. . .. . ...this API shall work with most positioning methods such as GPS.. . If you are interested in more details below tutorials make for a good start : .. . .. . Develop a location-based service application using JSR 179 http : www.ibm.com developerworks java tutorials wi-mobilesa .. . Developing Location Based Services : Introducing the Location API for J2ME http : mobiforge.com developing story developing-location-based-services-introducing-location-api-j2me",
"Question : I want to test my app on the device . Is it possible to hard code the latitude and longitude values somewhere in the device settings so the app reads those instead of the current location I want to test my app for different locations other than my current location . .. . Answer : Inside GPS mockup .. . .. . If you have access to your application code you can always create a mockup implementation for LocationProvider http : www-users.cs.umn.edu czhou docs jsr179 lapi javax microedition location LocationProvider.html so it will read location and speed data from file or RecordStore and return it as a Location http : www-users.cs.umn.edu czhou docs jsr179 lapi javax microedition location Location.html something like .. . .. . and mockup for your Location .. . .. . Then somewhere on the screen .. . .. . Outside GPS mockup .. . .. . Another option is to generally mockup GPS signals . Steps are : .. . .. . configure device gps receiver for bluetooth for ex . setup some opensource gps server on your desktop to produce location data over bluetooth .. . change configuration code of gps server to mockup location data .. . .. . Other options .. . .. . There is a possibility to uncontrolled change of location gps data by shielding gps receiver with some radio-material like alluminium foil or so : Comment : Thanks for the reply . I do not want to test my code . I want to test a cod file . I don t have access to the code . Can you please tell me how to change my location in BB simulator thanks . Comment : ok lostInTransit see update",
"Question : I am trying to implement jsr-179 APi into Nokia Symbian phone for periodic location update using setLocationListener through J2me . In emulator it is working fine . While I installed Midlet on the device nokia 5230 it is given NullPointerException and the application is automatically terminating . What might be possible causes Below is my class I am instantiating object for this class on a form in netbeans Comment : could you provide code you have problem with preferably in SSCCE http : www.sscce.org form Comment : I copied code snippet from your answer stackoverflow.com a 8877693 839601 http : stackoverflow.com a 8877693 839601 into the question . Recommend to delete the answer Comment : Ok Could you tell me where am i doing the wrong Comment : not quite wrong but likely risky is that MovementTracker constructor throws LocationException . How do you handle this exception Comment : I have not written any code for handling LocationException . How can i catch that exception Any code .. . Answer : .. . public MovementTracker throws LocationException .. . .. . .. . .. . I have not written any code for handling LocationException . No code is very dangerous practice just search the web for something like java swallow exceptions . It is quite possible that because of implementation specifics Nokia throws LocationException where emulator does not throw it . Since you don t handle exception this may indeed crash you midlet at Nokia - and you wouldn t know the reason for that because again you have written no code to handle it . How can I catch that exception The simplest thing you can do is to display an Alert with exception message and exit the midlet after user reads and dismisses alert",
"Question : I want to get longitude and latitude of the phone mobile by this code : .. . .. . The problem is that when clicking the position command then a system alert is shown saying : java.lang.SecurityException : Application not authorized to access the restricted API . So what should I do .. . Answer : add the relevant permission to your application and sign it with a certificate in the corresponding security domain . The JSR179 specification defines 7 permissions under javax.microedition.location . Choose the ones you need based on what you need your code to do . Lucifer s solution Verisign or Thawte will help if the location function group is in the trusted third party security domain for the phones you want to run your code on . The phone s mobile network operator or manufacturer might have decided to put location in their security domain instead though . http : stackoverflow.com q 1716755 contains a brief explanation of the MIDP security model . Comment : Your link answer describes how to stop those messages from emulator but you not do same thing in real device Comment : Unfortunately java-me developers usually don t have access to the security policies of real devices . All you can hope for is some documentation from the manufacturer or mobile network operator telling you what security domain a function group belongs-to Nokia documentation is decent enough . typically third party developers are forced to resort to trial and error to figure it out though . Comment : agree but final solution is Signing Certificate only .",
"Question : Does anyone know how to programmatically turn off the Blackberry internal GPS receiver Comment : If you want to do this from a BB application I think you can t do it . The BB will turn of the GPS once no running application requests coordinates any more . You can only stop requesting coordinates yourself and hope that nothing else requests any . Comment : Great . Thanks for this info . .. . Answer : The best you can do is inform the system that your program is no longer interested in positions via the LocationListener interface : .. . .. . Access to the GPS is managed through JSR 179 which satisfies all location data requests and manages the GPS hardware to provide service . Comment : Thanks . Do you know how to turn it back on Comment : Is there no actual way to turn GPS off however I am really looking to do this to save battery power so the above solution wouldnt help in this case . Thanks . Comment : To turn in back on request a location either through a single location request which will allow it to go off again : locationProvider.getLocation timeout or by setting a listener : locationProvieder.setLocationListener listener interval timeout maxAge At the application level you can only limit your own program s power consumption . If the user wants to disable the GPS so that no programs can turn it on that can be done through the GPS options page .",
"Question : JSR-179 is an optional package so it requires permissions and certificate signing . So are there other ways of getting longitude and latitude of mobile device through J2ME Comment : are you using S40 Series device @pheromix .. . Answer : You can connect your Device with external GPS device via bluetooth and fetch GPS details in as NMEA Strings format . You can use StringTokenizer class to fetch the lat-lon details from NMEA Strings . you can read http : www.developer.nokia.com Community Wiki How to read Location from Bluetooth GPS artical for information . One more way to your requirement is to fetch Cell-Id and based on the Google s Reverse API you can get Latitude-Longitude from Cell-Id . Comment : what if the customer cannot afford the external GPS Comment : then how can customer afford to develop such thing there should be a prerequisite decides that this kind of API will be required so you must purchase atleast this level device hence no use of developing such code . for e.g . you can not use GPRS in Nokia 1100 Comment : Internal GPS or External GPS one option he must choose otherwise no meaning of development . Nothing comes in free you have to purchase something atleast . Comment : are you using S40 Series device @pheromix Comment : Even Fetching cell-Id from some device require permissions and certificate signing . Even after that there is no guaranty of getting cell-Id .",
"Question : I wrote a very simple application that asks the LocationProvider for a location and prints it to System.out . This works great in the simulator . However when I run it on my blackberry device the call to getLocation seems to hang indefinitely . I am running the code in a separate thread that simply gets a provider and asks for the location . I tried it with null Criteria which should give me the defaults right as well as a Criteria that should provide Assist then Autonomous . I ve included my code below . When I run this on my device it hangs on the call to getLocation.Here is my code below..plzz tell what i might be doing wrong.. . .. . Answer : try to : .. . .. . check if GPS on device is turned on .. . check if your device and carrier have available GPS mode you are using here http : www.blackberry.com knowledgecenterpublic livelink.exe fetch 2000 348583 800332 800703 What Is - The BlackBerry smartphone models and their corresponding GPS capabilities.html nodeid 1371352 vernum 0 .. . if your carrier is Verizone check for Verizon GPSSettings signing requirement http : www.blackberry.com knowledgecenterpublic livelink.exe fetch 2000 348583 800332 800703 What Is - Verizon GPSSettings signing requirement.html nodeid 1365068 vernum 0 .. . reset LocationProvider desribed in Best practices for designing GPS applications for BlackBerry smartphones operating on CDMA networks http : www.blackberry.com knowledgecenterpublic livelink.exe fetch 2000 348583 800332 800703 What Is - Best practices for designing GPS applications for BlackBerry smartphones operating on CDMA networks.html nodeid 1446048 vernum 0 .. . .. . .. . .. . Talking about hanging threads .. . .. . hangs because if you use -1 there will be no timeout . Try this : .. . .. . .. . .. . Also if youre using System.out.println text in simulator on device it would be better to .. . .. . or",
"Question : Can I get a location of mobile-devices from j2me programming having no GPS unit installed Can I obtain the location using cell tower info I heard about triangulation http : stackoverflow.com a 9820133 839601 method . And gone through http : developers.sun.com mobility apis articles location doc .. . .. . In this doc they have given code only for mobile-phones having GPS application installed . But what about the others which does not have GPS in them How can they get the location update I got a link which answers my question : http : mobiforge.com developing story adding-location-a-non-gps-phone-introducing-cellid .. . Answer : You can get the ID of the nearest cell tower to you . The way this is fetched however differs from manufacturers . On Nokia phones you can get it through something like these : .. . .. . while on Sony Ericsson you have this : .. . .. . Once you get the cell id you can easily use the OpencellID API http : www.opencellid.org api to retrieve more information coordinates and all that about the id . The two challenge with this though is that .. . .. . 1 . Cell ids may not be accurate to a distance of up to a km .. . 2 . The information may not be available on opencellid.org Comment : You mean to say once one gets the cell id of the particular mobile device .. . than one can query for the location of the mobile device with reference to that particular cell If yes .. . can you provide me link or code for the same",
"Question : I m trying to implement a location tracker sort of application . I need to get location at specific times but while I trying I notice that if my phone doesn t get gps location it doesn t look for network location . When I turn of gps at my phone s settings It gets network location . How can I use both or set what to use at code . I use java ME location API . Thanks in advance . Edit : here is my code for getting location : Comment : Please upload your code .. . Answer : You can not define the method for the location provider with the API . Implementation is transparent for the hardware which is behind this operation . What you have wrote is correct . You can get a location only from one source and this source depends on phone settings location settings . However you can try to read the network based location by identifying the network s cell associated with the device . This article http : www.developer.nokia.com Community Wiki How to get Location Using Location API JSR 179 provided with a code sample should be usefull . Comment : ok I have another question about it . How can I understand location provider is gps or network Comment : developer.nokia.com Community Wiki http : www.developer.nokia.com Community Wiki Determining Current Location via Cell ID In the run method there is a line setting the location retrival methods : int methods Location.MTA ASSISTED Location.MTE CELLID Location.MTE SHORTRANGE Location.MTY NETWORKBASED Comment : Thanks . I m downloading sdk now . I hope this will solve my problem :",
"Question : I want to know how to use our own logo to show the particular place in BBMap Can anyone knows how to do this .. . Answer : BlackBerry Map .. . .. . It s not possible in Blackberry Map to show custom icon for POI . .. . Things you can include in Location on Blackberry Map : .. . .. . The latitude of the location 100 000 . South is negative . The longitude of the location 100 000 . West is negative . The label to be displayed beside the location . The description displayed when the BlackBerry smartphone user selects .. . details . Zoom level from 0 to MAX ZOOM . Address .. . City .. . Province or state .. . Country .. . Postal code .. . Phone .. . Fax .. . URL .. . Email address .. . Category .. . Rating information between 0 and 5 .. . .. . See What Is - BlackBerry Maps Location Document Format http : www.blackberry.com knowledgecenterpublic livelink.exe fetch 2000 348583 800332 800703 What Is - BlackBerry Maps location document format.html nodeid 1363044 vernum 0 .. . .. . Also see How To - Invoke BlackBerry Maps http : www.blackberry.com knowledgecenterpublic livelink.exe fetch 2000 348583 800332 800703 How To - Invoke BlackBerry Maps.html nodeid 1366963 vernum 0 .. . .. . Using MapField .. . .. . As an alternative you can try MapField http : www.blackberry.com developers docs 4.5.0api net rim device api lbs MapField.html + manager screen paint override . Custom extension for MapField : .. . .. . Example of use : .. . .. . See also .. . Using MapComponent in Blackberry http : www.nutiteq.com content using-mapcomponent-blackberry .. . GPS and BlackBerry Maps Development Guide http : docs.blackberry.com eng deliverables 1181 GPS 20and 20BlackBerry 20Maps 20Development 20Guide.pdf .. . .. . Prepare GPS data .. . .. . If it s real device be sure GPS is available and turned on . If it s simulator then before you start program use simulator menu - simulate - GPS Location to set GPS data . Other option is hardcode your own Coordinats and use them without GPS : Comment : Hi coldice..Thanks for ur information But i can able to invoke a Blackberry map and i can able to show the particular location using longtitude and latitude but now i m trying to change the default pinpoint image to some other image to indicate the location.Is it possible to change the default pinpoint image in Blackberry Map If possible pls tell me how to do . . Comment : Sorry but it s not possible to set custom icon for location in BlackBerry Map application . However there are ways to do it using google-maps or MapField inside your application . Comment : Thanks can pls provide some code snippet to using Mapfield and google Maps . Comment : See sample for MapField . Talking about GoogleMaps in deeper investigation I ve found out it s not possible because Blackberry browser has bad JavaScript support yet and static maps require server-side solution + google maps api-key registration . : sorry Comment : HI coldice i dont know how to set longtitude and latitude.If i run the above program then i can get map image with NO DATA AVAILABLE Label .",
"Question : How do I find the route information between two places in BlackBerry http : en.wikipedia.org wiki BlackBerry I m using MapField to show the map in my application . .. . Answer : As I understood you need to get a path length between several locations . It s not possible in MapField you can only set that route by yourself . Invoke BB Maps for route direction .. . .. . You can always use MapField in you application for simple functionality like present locations and use BlackBerry Maps application for enhanced stuff like select locations and route directions presentation for user . To invoke BB Maps for route direction use code : .. . .. . With document formed like : .. . .. . Result will be like .. . alt text http : www.blackberry.com knowledgecentersupport kmsupport supportknowledgebase images DB-00599 3.jpg alt text http : www.blackberry.com knowledgecentersupport kmsupport supportknowledgebase images DB-00599 4.jpg .. . .. . Now in BlackBerry Maps you can register your App menu item and start or update your App with selected location using MapView . See How To - Add an ApplicationMenuItem to BlackBerry Maps http : www.blackberry.com knowledgecenterpublic livelink.exe fetch 2000 348583 800332 800703 How To - Add an ApplicationMenuItem to BlackBerry Map.html nodeid 1371852 vernum 0 .. . .. . UPDATE .. . .. . Use the gmap navigation service for driving directions .. . .. . See J2ME Android BlackBerry - driving directions route between two locations http : stackoverflow.com questions 2023669 j2me-android-blackberry-driving-directions-route-between-two-locations Comment : Thanks Coldice Can u pls tell me which method is good to develop Blackberry GPS application either MapField or BlackberryMap or some other map and Can u pls tell me what is the difference between MapField and Blackberry map . Comment : Actually i have tried all Knowledge base documents and sample applications ya.Both map field and Blackberry map have their own merits and demerits so i don t know which is good for my application.Anyway thanks for ur help its help lot . Comment : Well I mean you can use them both in same app . Youre welcome",
"Question : I m trying to write a simple GPS based application for my BB 8800 with Airtel India . But for some reason my code getLocation timeout always returns with a non-valid location only after timing out . I tried different combinations of criteria parameters with no success . I m pretty sure that the problem is not with my code because even the BlackBerry GPS demo application does not work . However my GPS receiver is working fine because Wayfinder a maps application that came bundled with my BB works fine . To test it further I tried running SpotFinder and Google Maps . But they did not work either . Google Maps could determine location using cell tower info but not GPS . Here are some more details about my environment 1 . Phone Model : BlackBerry 8800 2 . Carrier : AirTel India 3 . Device Version : 4.2.168 Platform 2.3.0.54 .. . .. . Can my carrier block it I spoke with AirTel technical support but they wouldn t budge to help developers .. . .. . Thanks In Advance .. . Answer : Some carriers like Verizon US blocked GPS for third party applications . Others just enabled GPS for a white list of applications mostly their own but deny access to GPS for all others . It seems your provider is doing such things .",
"Question : I wrote a very simple application that asks the LocationProvider for a location and prints it to System.out . This works great in the simulator . However when I run it on my blackberry device the call to getLocation seems to hang indefinitely . I am running the code in a separate thread that simply gets a provider and asks for the location . I tried it with null Criteria which should give me the defaults right as well as a Criteria that should provide Assist then Autonomous . I ve included my code below . When I run this on my device it hangs on the call to getLocation.Here is my code below..plzz tell what i might be doing wrong.. . .. . Answer : the -1 timeout thing should be ok it should just go to the default . The default may be high though of if this isn t happening in the background you might want to set the timeout at something smaller like 15 seconds . The reason this works in the simulator but hangs on an actual device is probably that you don t have a GPS fix on the device where you do the testing.. . I m not kidding have you tried this outside",
"Question : I m trying to write a simple GPS based application for my BB 8800 with Airtel India . But for some reason my code getLocation timeout always returns with a non-valid location only after timing out . I tried different combinations of criteria parameters with no success . I m pretty sure that the problem is not with my code because even the BlackBerry GPS demo application does not work . However my GPS receiver is working fine because Wayfinder a maps application that came bundled with my BB works fine . To test it further I tried running SpotFinder and Google Maps . But they did not work either . Google Maps could determine location using cell tower info but not GPS . Here are some more details about my environment 1 . Phone Model : BlackBerry 8800 2 . Carrier : AirTel India 3 . Device Version : 4.2.168 Platform 2.3.0.54 .. . .. . Can my carrier block it I spoke with AirTel technical support but they wouldn t budge to help developers .. . .. . Thanks In Advance .. . Answer : Can your carrier block it Absolutely I don t know about in India but in the U.S . some carriers can and do restrict applications from accessing the GPS if they are not approved . That seems quite likely given the scenario you described .",
"Question : I want to test my app on the device . Is it possible to hard code the latitude and longitude values somewhere in the device settings so the app reads those instead of the current location I want to test my app for different locations other than my current location . .. . Answer : In the BB simulator you can go to Simulate GPS Location . Click the Add button and enter in a name latitude and longitude . Click save and the simulator will start feeding your new location to the apps . Note that whatever location is displayed in the drop down is the one that will be reported by the simulator . Comment : +1 Adam I havn t read comment s careful as I should",
"Question : I can able to show one location using co ordinates or longtitude and latitude but i dont know how to show more than one location in the blackberry MapField.If is it possible pls share with me how to do this. . .. . Answer : A valid and probably simpler option would be to use this open-source library by Monits http : www.monits.com https : github.com Monits blackberry-commons .. . .. . It contains several common functionality found in BB applications and is compatible for BB 4.6.1+ .. . .. . Among other things it provides a map field with the ability to add and display markers on top of it with and without focus and optionally open them . This makes for an API much more alike that found on other smart phones such as iPhone or Android . The documentation is pretty good and the wiki even has a tutorial on how to achieve it https : github.com Monits blackberry-commons wiki CustomMap",
"Question : I want to get the longitude and latitude of device . I used location api to get the longtitude and latitude the problem now I am facing is that I could not call the getLocation method inside button click event . It throws an error as getLocation method cannot be called from event thread.Can any one tell me how to solve this problem .. . Answer : You simply create another thread and call getLocation from that thread . See the documentation for java.lang.Thread in the API documentation .",
"Question : I want to how to create a GPS program in BlackBerry .. . Answer : Use javax.microedition.location http : www.blackberry.com developers docs 4.5.0api javax microedition location package-summary.html .. . .. . See BB Dev Lab - Introduction to Location-based Services ZIP http : na.blackberry.com developers resources LBS 5FLAB.zip .. . Toni Westbrook - Creating a Blackberry GPS Tracker http : www.toniwestbrook.com archives 126 .. . riccomini - code blackberry gps http : www.riccomini.name Topics Mobile BlackBerry BlackBerryGPS .. . riccomini - code blackberry storm gps http : www.riccomini.name Topics Mobile BlackBerry BlackBerryStormGPS .. . .. . Also see blackberrymapsdemo and gpsdemo samples in 4.5 4.6 Eclipse plugin .. . components samples com rim samples device",
"Question : I can able to show one location using co ordinates or longtitude and latitude but i dont know how to show more than one location in the blackberry MapField.If is it possible pls share with me how to do this. . .. . Answer : Same way as How to show our own icon in BlackBerry Map http : stackoverflow.com questions 1524428 how-to-show-our-own-icon-in-blackberry-map . Pass an array of Coordinates into custom MapField define a bitmap for location point and paint it for each Coordinate in custom MapField paint method . Remember to zoom in out CustomMapField for best fit of all location points . Sample of implementation .. . .. . Lets display Liverpool Sheffield and London with custom bitmap icons yellow circle with black border . Code for custom MapField : .. . .. . Sample of use : Comment : thanks for ur guidance its working coldice Comment : You re welcome Comment : I had to remove the image from your post because ImageShack has deleted it and replaced it with advertising . See meta.stackexchange.com q 263771 215468 http : meta.stackexchange.com q 263771 215468 for more information . If possible it would be great for you to re-upload them . Thanks",
"Question : I have build a jar file and trying to use it in j2me application . I have included the jar in the build path and imported the required classes as well . But when I run my j2me application I am getting NoClassDefFound Error in the line where I am trying to instantiate the class which is present in the jar . I can instantiate the classes of the jar in the java project but not in j2me . Below is the error-log : .. . .. . WARNING - MMA - C : Builds jme-sdk javacall-javame-sdk-305 implementation share jsr135 mmapi ju mmconfig.c line 801 : caps : optional settings missing : SuspendBehavior java.lang.NoClassDefFoundError : com canvasm ida gps LocationUpdater - com.test.ida.HelloIDA . HelloIDA.java : 11 - java.lang.Class.newInstance bci 0 - com.sun.midp.main.CldcMIDletLoader.newInstance bci 46 - com.sun.midp.midlet.MIDletStateHandler.createMIDlet bci 66 - com.sun.midp.midlet.MIDletStateHandler.createAndRegisterMIDlet bci 17 - com.sun.midp.midlet.MIDletStateHandler.startSuite bci 27 - com.sun.midp.main.AbstractMIDletSuiteLoader.startSuite bci 52 - com.sun.midp.main.CldcMIDletSuiteLoader.startSuite bci 8 - com.sun.midp.main.AbstractMIDletSuiteLoader.runMIDletSuite bci 161 - com.sun.midp.main.AppIsolateMIDletSuiteLoader.main bci 26 javacall lifecycle state changed lifecycle : event is JAVACALL LIFECYCLE MIDLET SHUTDOWN status is JAVACALL OK .. . .. . TestApp j2me app : .. . .. . JAR file main class : .. . .. . LocationCanvas class : .. . .. . error-log : .. . .. . Any help would be appreciated . Comment : post your code here . Comment : I test your classes in new project of course with out AppConstants LocationCanvas because I have no them and no error occures .. . Answer : Finally able to solve the issue . The problem was not in the code . It was due to the compilation issue . First of all To solve the NoClassDefFoundError I had to right-click on the project and in the build path- order and export - check the jar that you have added . Later while running I faced classFormatError 56 . The jar file which was created was compiled using 1.6v . And the j2me application was getting compiled with 1.3v . I had to recompile my library-project with 1.3v and create a jar out of it and used it in the j2me application . Here is the link-to guide : Build a Project from the Command Line - Java ME SDK http : docs.oracle.com javame dev-tools jme-sdk-3.0-mac UserGuide-html z400007747176.html"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
api
|
UNK_RELATION
|
storage-access-framework@providers@189
|
storage-access-framework -- the storage-access-framework makes it simple for users to browse and open documents images and other files across all of their their preferred document storage @placeholder on the android platform .
|
{
"confidence": [
69.44429779052734,
68.86206817626953,
66.94307708740234,
64.64867401123047,
64.29248046875,
63.625572204589844,
62.75537109375,
62.61688232421875,
61.478912353515625,
60.13225555419922,
57.660400390625,
57.660400390625,
56.68730926513672,
56.072509765625,
54.841148376464844,
54.45624542236328,
54.45624542236328,
53.6246337890625,
53.04848861694336,
52.579193115234375,
51.01145935058594,
50.47358703613281,
49.519813537597656,
49.287940979003906,
49.08785629272461,
48.24250030517578,
48.24250030517578,
48.24250030517578,
47.71057891845703,
47.53382873535156,
46.377113342285156,
46.157649993896484,
45.79462432861328,
45.79462432861328,
45.79462432861328,
45.08595275878906,
44.964630126953125,
44.759674072265625,
43.877647399902344,
43.428375244140625,
42.558189392089844,
42.41825866699219,
42.334632873535156,
42.32977294921875,
42.32912826538086,
41.51512908935547,
41.30781936645508,
41.157249450683594,
40.571414947509766,
40.458282470703125,
40.458282470703125,
40.458282470703125,
40.197383880615234,
39.55158233642578,
39.43497085571289,
39.22483825683594,
39.223487854003906,
39.14426040649414,
38.506752014160156,
38.506752014160156,
38.484649658203125,
37.80339050292969,
37.80339050292969,
37.113826751708984,
36.630409240722656,
36.630409240722656,
36.630409240722656,
36.630409240722656,
36.630409240722656,
36.35234451293945,
36.058876037597656,
36.058876037597656,
36.01691436767578,
35.74758529663086,
35.42851638793945,
35.39561462402344,
35.28398895263672,
34.86711883544922,
34.7360725402832,
34.22726058959961,
34.22726058959961,
33.97550964355469,
33.97550964355469,
32.632118225097656,
32.5711669921875,
32.46601104736328,
32.206756591796875,
32.03859329223633,
32.03859329223633,
32.0110969543457,
31.52763557434082,
31.52763557434082,
31.45987892150879,
31.327659606933594,
30.554107666015625,
30.399383544921875,
30.399383544921875,
30.399383544921875,
30.297483444213867,
30.297483444213867
],
"content": [
"I use Android Storage Access Framework to access some files on SD card -- no you are using SAF to work with documents .",
"ACTION GET CONTENT is not part of the Storage Access Framework .",
"I m using Android Storage Access Framework SAF .",
"I have managed to open a directory with Storage Access Framework .",
"We can use Storage Access Framework to access .",
"I use Android Storage Access Framework to access some files on SD card .",
"Do all v19+ devices really support the Storage Access Framework",
"I am using android s storage-access-framework SAF to interact with documents .",
"I am using the storage-access-framework to download images to the external sd-card .",
"I m using Android Storage Access Framework and I would like to filter for .opus files .",
"I am using Storage Access Framework SAF in my app .",
"I do this via the Storage Access Framework SAF and the DocumentFile class.. .",
"I am integrating the Document Access Framework with my cloud-storage access app .",
"---------------------------------------------- .. . .. . Android 4.4 : .. . .. . ---------------------------------------------- .. . .. . This device is very specific as it does not yet offer the Storage Access Framework but already limits the access to secondary storages",
"Exception : .. . .. . My code : .. . .. . Qestion : .. . .. . Do all v19+ devices really support the Storage Access Framework",
"I can access application folder or access other folders via Storage Access Framework .. . 3 .",
"I can access application folder or access other folders via Storage Access Framework .",
"Is it possible to gain a random-access to this stream which is returned by SAF Android Storage Access Framework",
"You need to use the Storage Access Framework on android 6 to get write access on the sd-card so you need to use DocumentFile there.. .",
"I am using the Storage Access Framework for android 4.4 and opening the file picker .",
"The user can use the Storage Access Framework to access any provider that the user wants many of which will be cloud-based e.g . Google Drive Dropbox .",
"My point is that this exercise makes the case for using Storage Access Framework very weak .",
"I am using SAF Storage access framework to write files to SD card .",
"I m trying to provide sd-card access inside my app with Storage Access Framework .",
"I m sorry but I don t have an answer for you however I m interested on how to move and copy files using the Storage Access Framework .",
"Are you planning on using the Storage Access Framework to ask the user where to copy things to",
"I m looking for a client application of Android s Storage Access Framework in Google Play a free app please .",
"It s free and it supports both read and write from Android s Storage Access Framework .",
"Unfortunately this is only replacement for access to main external storage .",
"Now the issue is that as the file path provided is that of External SD Card and for Android 5 up SAF Storage Access Framework is required to write a file .",
"I want to get those permissions using the new Storage Access Framework introduced in KitKat without selecting the file using the Documents Provider .",
"Recently I received a crash report from a user who tried to create a backup of a database using the Storage Access Framework https : developer.android.com guide topics providers document-provider.html on a lollipop device .",
"I tried using the view intent for a video URI returned by the file picker from Storage Access Framework .",
"Original answer .. . .. . .. . .. . I would stay away from Storage Access Framework as it is now .",
"Use getShareableUri method below to convert received Storage Access Framework Uri into your own .",
"This is the answer by Paul Burke http : stackoverflow.com questions 20067508 get-real-path-from-uri-android-kitkat-new-storage-access-framework 20559175 20559175 .",
"So according to Storage Access Framework documentation https : developer.android.com guide topics providers document-provider.html I use Persist permissions that gives the user continued access to the files through your app even if the device has been restarted .",
"For non-transient storage there is a corresponding file : and content : document uri for any given entity on storage .",
"The storage provider decides that .",
"I m using the new Kitkat Storage Access Framework SAF as specified here : https : developer.android.com guide topics providers document-provider.html .. . .. . This is the same as the example code but the images filter is not working .",
"I am using the Storage Access Framework SAF : .. . .. . I would like to know if there is an extra to enable the Show SD Card option that user can see in the overflow menu .",
"treeUri is the uri pointing to storage MicroSD .",
"But when opening settings storage usb I can see my sd-card in the emulator.. . And can access it and see the data on it.. .",
"Upon researching the issue I ve come to a conclusion that the app must use the Storage Access Framework https : developer.android.com guide topics providers document-provider.html in order to write to an external SD card .",
"I am trying my hand on Storage Access Framework of android 4.4 .. . .. . I have developed a dummy app which fires an intent on start of the activity .",
"After uninstallation and reinstallation our application cannot write to application folder sdcard Android data applicationpackage files on external storages cannot work with MediaStore provider and cannot access other files on SD card using Storage Access Framework .",
"Installing custom file providers such as alternative file managers is entire point of plugin-friendly Storage Access Framework structure and it will make those solutions fail too .",
"I want to display all storage roots like following : .. . .. . Why",
"I want to copy or move files from the internal-storage to the sd-card .",
"And upon now only storage MicroSD exists .",
"I check that tree uri is in format of external storage .",
"For local-storage it creates a file with n appended to it .",
"I check these similar SO post for kitkat phones : Get real path from URI Android KitKat new storage-access-framework http : stackoverflow.com questions 20067508 get-real-path-from-uri-android-kitkat-new-storage-access-framework .. . .. . Android - Convert URI to file path on lollipop http : stackoverflow.com questions 27879248 android-convert-uri-to-file-path-on-lollipop .. . .. . However the solution to that no longer seems to work in Lollipop devices .",
"I check that tree uri is in format of external storage -- since there is not documented format of external storage and since device manufacturers and custom ROM builders are welcome to change Android your approach is not reliable .",
"If you are confident enough which really means can use try-catch block better then average Android developer use Storage Access Framework yourself but pass to others only good-old file : paths .",
"partially known .. . .. . On the primary storage it works the same way as it did on android 4.4 .",
"@greenapps reformatted the question storage MicroSD MyPictures already exist only Wallpapers directory need to be created under storage MicroSD MyPictures .",
"The Share button you re referring to in other apps probably uses ACTION SEND http : developer.android.com reference android content Intent.html ACTION SEND as the Intent action rather than ACTION CREATE DOCUMENT http : developer.android.com reference android content Intent.html ACTION CREATE DOCUMENT that was introduced with the Storage Access Framework .",
"From Androind 4.4 Kitkat application cannot able to access secondary storage completely .",
"I am using Intent.ACTION OPEN DOCUMENT TREE to grant my application write access to external storage on Lollipop and Marshmallow .",
"The code I have posted works fine with files in Internal Storage .",
"On internal-storage I will use .. . .. . Which will create folder in a fraction of second .",
"I have only tested local-storage and google drive .",
"In the beginning the user can select files with the new Storage Access Framework Assuming the app is API 19 : .. . .. . https : developer.android.com guide topics providers document-provider.html .. . .. . Then I save references to those chosen files by saving the URI s which looks like : .. . .. . in this case the file is from the default downloads dir .",
"grant permission for whole external storage for test purpose",
"Added read-write external storage permissions .",
"unknown .. . .. . On this device only the primary storage will be indexed correct",
"partially known .. . .. . Getting primary storage is possible as before .",
"There is no conversion from a path to a Uri from a storage provider .",
"The user is welcome to choose whatever document tree that the user wants and you have no means of determining reliably whether or not it is the root path of external storage .",
"I was using the file picker provided by the Storage Access Provider to make things easier and avoid using file picker libraries .",
"How are you checking via File.length since you don t have filesystem-access to most of removable storage",
"Letting the user choose the SD card or even the Internal storage SAF root give your application access to the corresponding storage but only through the SAF API not directly via the filesystem .",
"I ve already tried the methods described here http : stackoverflow.com questions 20067508 get-real-path-from-uri-android-kitkat-new-storage-access-framework but I couldn t get the real path using those methods",
"That doesn t change the fact that the user might choose some other storage provider .",
"partially known .. . .. . I m not sure how to distinguish between the available storage correctly.. . Getting the primary storage path is possible via File primaryStorage context.getExternalCacheDir .",
"I am using Saf only to work with files on the SD cards because of specific of app there is only reason to work with with external storage provider .",
"The content uri that s being returned looks something like this : content : com.google.android.apps.docs.storage document acc 3D4 3Bdoc 3D2279 .. . .. . Other questions that are similar but do not have a working solution which allows me to get the filename filesize and contents : .. . .. . Get real path from URI Android KitKat new storage-access-framework http : stackoverflow.com questions 20067508 get-real-path-from-uri-android-kitkat-new-storage-access-framework .. . Android Gallery on KitKat returns different Uri for Intent.ACTION GET CONTENT http : stackoverflow.com questions 19834842 android-gallery-on-kitkat-returns-different-uri-for-intent-action-get-content .. . .. . I ve also looked into Paul Burke s FileChooser https : github.com iPaulPro aFileChooser and this is the most common question on the issue s list .",
"Refer : External storage state https : developer.android.com reference android os Environment.html getExternalStorageState",
"It looks now to me that you want to create the directory storage MicroSD MyPictures Wallpapers .",
"Beyond that AFAIK the decision of whether or not something goes in the recents list is up to the storage provider not the client .",
"It returns a specific folder within that storage the only folder I m allowed to write to .",
"But I would like write to external storage in test application .",
"The manual way is to let the user choose the root directory of the secondary storage sd-card usb stick like following : .. . .. . And afterwards just remember the returned Uri and persist the Uri when getting the result from the Storage Access Framework : .. . .. . I don t know how to find out the type sd-card usb of the directory the user selected though .",
"known .. . .. . For the primary storage it works as before as well just via the File class for the rest you HAVE to use the Uri for the corresponding storage that you got in point 1 .",
"I can always detect if the the file is on external storage or copy it there myself and check that target app has READ EXTERNAL STORAGE to be sure that it will treat my file : Uri pointing to the external storage as nicely as any other .",
"I m sure many people are looking for such an overview.. . .. . .. . Overview .. . .. . Normally you have following storages : .. . .. . a primary storage always directly accessible mostly on the internal-storage but it s up to the phone manufactorer .. . a secondary storage directly accessible for android 4.3 .. . other external storages like USB OTG for example.. . .. . .. . Following questions raise up : .. . .. . 1 .",
"Perhaps the user deleted the file from the provider - it is not possible because I received the tree uri that represents the root path of external storage .",
"I received the tree uri that represents the root path of external storage -- by your own admission you do not know that since you cannot reproduce the problem .",
"For example : .. . .. . File : .. . .. . file : storage sdcard1 WriteTest file.ext .. . .. . Document Version : .. . .. . content : com.android.externalstorage.documents tree 0000-0000 3A WriteTest document 0000-0000 3A WriteTest 2Ffile.ext .. . .. . Permission at root : .. . .. . content : com.android.externalstorage.documents tree 0000-0000 3A WriteTest .. . .. . So the document version is fairly easy to correlate with by comparing treeId to documentId but the critical thing is to correlate storage sdcard1 to 0000-0000 in the file case .",
"Bear in mind that the user does not have to choose removable storage for ACTION OPEN DOCUMENT TREE .",
"This display name does not have to be a directory name or a filename as it depends on the storage provider .",
"So I want following : .. . .. . 1 . check if an sd-card is available .. . 2 . if not do nothing .. . 3 . if an sd-card is available tell the user that my app needs permissions to read the sd-card and ask the user to select the sd cards root directory via the storage-access-framework .. . .. . The same I want to do for the usb stick but there I know how to do it there broadcast receivers exist to get notified when an usb stick is added and I can check if on is already connected as well",
"The relevant Framework code can be found here : http : grepcode.com file repository.grepcode.com java ext com.google.android android 5.1.0 r1 com android documentsui DocumentsActivity.java 255",
"It seems like you can t move copy files from your internel storage to the sd-card without losing the last modified date.. . .. . .. . Reading - Working .. . .. . WRITING - NOT WORKING .. . .. . This fails with a java.lang.UnsupportedOperationException : Update not supported exception.. .",
"As far as I can tell the mounting dir for external storage is very device specific .",
"So I have complete file path Ex : - storage sdcard1 DCIM 100ANDRO ak.jpg for each image in recycler view .",
"Try this .. . .. . Note : .. . .. . you are trying getExternalStorageState and it will Returns the current state of the primary shared external storage media .",
"However the actual id assigned a given SAF root and it s file counterpart at least on non-transient storage would be necessary to relate these uris .",
"And as I mentioned that would require a way to correlate what SAF defines as 0000-0000 and getName replies sdcard1 and the actual storage sdcard1 ."
]
}
|
{
"confidence": [
76.53977966308594,
66.43062591552734,
65.46756744384766,
65.4620132446289,
63.73909378051758,
63.65671920776367,
60.959293365478516,
60.844459533691406,
60.30850601196289,
60.236595153808594,
58.605167388916016,
55.832984924316406,
55.611839294433594,
55.204071044921875,
53.871158599853516,
53.46907043457031,
53.33824920654297,
53.217750549316406,
52.992919921875,
52.816627502441406
],
"content": [
"Question : I use Android Storage Access Framework to access some files on SD card . It is important for me to persists this permissions to be able to edit files after reboot of device . So according to Storage Access Framework documentation https : developer.android.com guide topics providers document-provider.html I use Persist permissions that gives the user continued access to the files through your app even if the device has been restarted . However after some time I noticed that for some users permissions were somehow revoked . Because when I am trying to use SAF for writing I get android.system.ErrnoException : open failed : EACCES Permission denied after that exception I check what permissions do I have using mContext.getContentResolver .getPersistedUriPermissions however it return empty list . I am sure that user provide me with the right permissions and that permissions are for the currently installed Sd card because I track this actions in the database . Currently in this case I am showing document picker so user can provide me one more time with new permissions but asking user to perform same action often is not user friendly . What can cause the revoke of permissions And how I can prevent this revoke I have tested on all my devices multiple reboots of the phone changing time removing inserting sd-card but was not able to lost any of saf permissions . I have next code for obtaining permissions : Comment : I use Android Storage Access Framework to access some files on SD card -- no you are using SAF to work with documents . Whether those documents are stored is up to the user not you . They could be managed by any provider Google Drive Dropbox etc . . I am sure that user provide me with the right permissions and that permissions are for the currently installed Sd card because I track this actions in the database -- the documents that the user chooses do not have to be on an SD card . What can cause the revoke of permissions -- perhaps the user deleted the file from the provider . Comment : I am using Saf only to work with files on the SD cards because of specific of app there is only reason to work with with external storage provider . I check that tree uri is in format of external storage . Comment : Perhaps the user deleted the file from the provider - it is not possible because I received the tree uri that represents the root path of external storage . There is no way to delete it . Also as I mention I was not able to create new files it was throwing android.system.ErrnoException and getContentResolver .getPersistedUriPermissions returned empty list . So user somehow revoked permissions . Comment : I check that tree uri is in format of external storage -- since there is not documented format of external storage and since device manufacturers and custom ROM builders are welcome to change Android your approach is not reliable . I received the tree uri that represents the root path of external storage -- by your own admission you do not know that since you cannot reproduce the problem . The user is welcome to choose whatever document tree that the user wants and you have no means of determining reliably whether or not it is the root path of external storage . Comment : Yes your are right that approach is not relaible but it is the only way how to get access to the SD card after Android 4.3 update . .. . Answer : You need additional flags when requesting ACTION OPEN DOCUMENT TREE . openDocumentTree should look like .. . .. . Review docs for FLAG GRANT PERSISTABLE URI PERMISSION https : developer.android.com reference android content Intent.html FLAG GRANT PERSISTABLE URI PERMISSION and FLAG GRANT PREFIX URI PERMISSION https : developer.android.com reference android content Intent.html FLAG GRANT PREFIX URI PERMISSION",
"Question : null .. . Answer : I call createChooser with ACTION GET CONTENT . How can I make this document appear in the Recents list in the SAF chooser The documentation only mentions the recents list in the context of creating documents . I want files opened in my app created in another app to appear here . Comment : ACTION GET CONTENT is not part of the Storage Access Framework . ACTION OPEN DOCUMENT and ACTION CREATE DOCUMENT are . Beyond that AFAIK the decision of whether or not something goes in the recents list is up to the storage provider not the client . Comment : @CommonsWare Many devices display the SAF chooser with this why is that Comment : If there are no other ACTION GET CONTENT implementations I can see this UI coming up by default . But if there are other ACTION GET CONTENT implementations that otherwise support your Intent e.g . MIME type I would expect a chooser first . Comment : @CommonsWare Ok I will use ACTION OPEN DOCUMENT on Android 4.4 and higher since that s what I most wanted anyway . However the question still remains . Comment : Again AFAIK what you want you control whether the document goes in recents is not possible . The storage provider decides that .",
"Question : Recently I received a crash report from a user who tried to create a backup of a database using the Storage Access Framework https : developer.android.com guide topics providers document-provider.html on a lollipop device . Exception : .. . .. . My code : .. . .. . Qestion : .. . .. . Do all v19+ devices really support the Storage Access Framework How should we handle such cases UPDATE .. . .. . Received 4 additional crash reports from different devices . Comment : Do all v19+ devices really support the Storage Access Framework -- it s part of standard Android AFAIK . Perhaps this device was running some messed-up ROM mod . Comment : @CommonsWare Thank you for your comment Yes it is part of standard Android API . But I have received two more identical crash reports . All reported from different devices . .. . Answer : Perhaps it may be useful for somebody else that had the same problem so here it is how I solved my problem",
"Question : In the beginning the user can select files with the new Storage Access Framework Assuming the app is API 19 : .. . .. . https : developer.android.com guide topics providers document-provider.html .. . .. . Then I save references to those chosen files by saving the URI s which looks like : .. . .. . in this case the file is from the default downloads dir . Later I want let the user to open those files For example they names displayed in UI list and the user selects one . I want to do this with the Android famous intent chooser feature and all I have is the above URI object.. . Thanks Comment : Have you tried something like new Intent Intent.ACTION VIEW uri Comment : I tried using the view intent for a video URI returned by the file picker from Storage Access Framework . It causes an error : Couldn t open fd for content : com.android.providers.media.documents document video : 15026 Comment : That is not going to work . You have rights to use that Uri other apps do not have rights to use that Uri . .. . Answer : Edit : I have revised this answer to include the example code of approach I have initially referred to as writing a specialized ContentProvider . This should fully satisfy requirements of the question . Probably makes the answer too big but it has internal code dependencies now so let s leave it as whole . The main point still holds true : use the ContentPrvder below if you want but try to give file : Uris to apps that support them unless you want to be blamed for someone s app crashing . Original answer .. . .. . .. . .. . I would stay away from Storage Access Framework as it is now . It s insufficiently backed by Google and the support in apps is abysmal making it is hard to tell between bugs in those apps and SAF itself . If you are confident enough which really means can use try-catch block better then average Android developer use Storage Access Framework yourself but pass to others only good-old file : paths . You can use the following trick to get filesystem path from ParcelFileDescriptor you can get it from ContentResolver by calling openFileDescriptor https : developer.android.com reference android content ContentResolver.html openFileDescriptor 28android.net.Uri 20java.lang.String 29 : .. . .. . You must be prepared that the method above will return null the file is a pipe or socket which is perfectly legitimate or an empty path no read access to file s parent directory . If this happens copy the entire stream to some directory you can access . Complete solution .. . .. . .. . .. . If you really want to stick with content provider Uris here you go . Take the code of ContentProvider below . Paste into your app and register it in AndroidManifest . Use getShareableUri method below to convert received Storage Access Framework Uri into your own . Pass that Uri to other apps instead of the original Uri . The code below is insecure you can easily make it secure but explaining that would expand the length of this answer beyond imagination . If you care use file : Uris Linux file systems are widely considered secure enough . Extending the solution below to provide arbitrary file descriptors without corresponding Uri is left as exercise for reader . Comment : Also note that the filesystem path may not be usable as apps using this code may not have read let alone write access to the designated location . Comment : @CommonsWare not really . I can always detect if the the file is on external storage or copy it there myself and check that target app has READ EXTERNAL STORAGE to be sure that it will treat my file : Uri pointing to the external storage as nicely as any other . No such luck with content : . Android system content providers are lucky they generally store files in accessible locations and give it away in path but custom ones are easily screwed . Not everyone has as much influence as Google Drive to let third-party apps blow themselves up .",
"Question : In the beginning the user can select files with the new Storage Access Framework Assuming the app is API 19 : .. . .. . https : developer.android.com guide topics providers document-provider.html .. . .. . Then I save references to those chosen files by saving the URI s which looks like : .. . .. . in this case the file is from the default downloads dir . Later I want let the user to open those files For example they names displayed in UI list and the user selects one . I want to do this with the Android famous intent chooser feature and all I have is the above URI object.. . Thanks Comment : Have you tried something like new Intent Intent.ACTION VIEW uri Comment : I tried using the view intent for a video URI returned by the file picker from Storage Access Framework . It causes an error : Couldn t open fd for content : com.android.providers.media.documents document video : 15026 Comment : That is not going to work . You have rights to use that Uri other apps do not have rights to use that Uri . .. . Answer : Well the solution has already been provided on the SO and you only needed to search for it . This is the answer by Paul Burke http : stackoverflow.com questions 20067508 get-real-path-from-uri-android-kitkat-new-storage-access-framework 20559175 20559175 . He has written a utility class which returns complete file path for such a content path . He says : .. . .. . This will get the file path from the MediaProvider DownloadsProvider and ExternalStorageProvider while falling back to the unofficial ContentProvider method you mention . and .. . .. . These are taken from my open-source library aFileChooser https : github.com iPaulPro aFileChooser . FileUtils.java https : github.com iPaulPro aFileChooser blob master aFileChooser src com ipaulpro afilechooser utils FileUtils.java is the place where Paul Burke has written the method you re looking for . Comment : I have seen that answer but that s a lot of work to let another application handle a file selected by user . I was using the file picker provided by the Storage Access Provider to make things easier and avoid using file picker libraries . Comment : Besides this is another issue with that approach : commonsware.com blog 2014 07 04 uri-not-necessarily-file.html http : commonsware.com blog 2014 07 04 uri-not-necessarily-file.html Comment : Well I didn t recommend a file picker library and that would be off-topic . My answer or in fact Paul Burke s answer is a how-to-get file URI from various URIs . Comment : Yes I appreciate that My point is that this exercise makes the case for using Storage Access Framework very weak . It would probably be better to use a picker that directly provides a file path if getting the actual file path is the only solution to make the ACTION VIEW intent work . Comment : FileUtils hardcode file paths and other solutions for several existing file providers and check for PATH column which is unreliable to say the least see also this answer https : stackoverflow.com a 30283769 1643723 for explanation why . Any new Android version as well as slightest modification by device vendors can break those . Installing custom file providers such as alternative file managers is entire point of plugin-friendly Storage Access Framework structure and it will make those solutions fail too . The code in my answer will always reliably determine the path .",
"Question : I m looking for a client application of Android s Storage Access Framework in Google Play a free app please . Something that allows you to both store files and open files from a documents provider . This could be a simple text-editor that allows saving the file into SAF and then using the SAF picker to load a file . I m developing my own documents provider and I usually use my own test client when demoing it to others . When I say that other apps on the market using SAF are able to use my provider the obvious question is can I see an example . Problem is I haven t been able to find concrete examples of SAF clients . There is MS Word but it only allows opening files not saving . .. . Answer : You can try with QuickEdit Text Editor https : play.google.com store apps details id com.rhmsoft.edit . It s free and it supports both read and write from Android s Storage Access Framework . Comment : Using regular file system we can both read and write . As far as using SAF is concerned it only supports opening the file not saving it afterwards . Comment : Strange I tried with Google Drive it reads and saves a text file without any problem . To save the document you need to press the first icon in the action bar then press Save . Let me know if it works for you . Comment : I was trying to write on a new document and saving it using SAF but all I was getting was the file system browser . However if I open an existing file using SAF it is possible to edit it and save it afterwards . So you re correct thanks . Comment : Unfortunately QuckEdit 0.9.3 does not support a NEW document creation .",
"Question : I am using the storage-access-framework to download images to the external sd-card . The problem is that these images do not appear in the gallery . I ve tried to inform the Android media scanner using an intent by sending the DocumentFile uri but that doesn t seam to work . Here is how I try to inform the media scanner that a new image is added : .. . .. . Is there another way to inform Android that a new image was added I ve already tried the methods described here http : stackoverflow.com questions 20067508 get-real-path-from-uri-android-kitkat-new-storage-access-framework but I couldn t get the real path using those methods .. . Answer : I ve now found a solution . I am using the following method to get the file path from the DocumentFile . When sending this path to the media scanner the file is scanned correctly :",
"Question : Can I somehow find out which storages are currently available WITHOUT starting the document picker and let the user select a directory I want to display all storage roots like following : .. . .. . Why .. . .. . Actually I want to know if an sd-card is available before telling the user that he needs to select the sd cards root directory via the document picker.. . So I want following : .. . .. . 1 . check if an sd-card is available .. . 2 . if not do nothing .. . 3 . if an sd-card is available tell the user that my app needs permissions to read the sd-card and ask the user to select the sd cards root directory via the storage-access-framework .. . .. . The same I want to do for the usb stick but there I know how to do it there broadcast receivers exist to get notified when an usb stick is added and I can check if on is already connected as well .. . Answer : You can do the following : .. . .. . Edit : .. . .. . Go to your .android avd avd name .avd folder and open config.ini Make sure you have Comment : just tried that in the android 6 emulator with an sd-card mounted and it returns false in your if.. . Comment : I tested it on my side android 6 emulator and it goes inside the if loop . Can you post your code Comment : My code is very simple I just try following : public static boolean isSDCardMounted String state Environment.getExternalStorageState if Environment.MEDIA MOUNTED.equals state return true return false Comment : Log the value of state variable before going in the if block . What do you get in it Comment : The state is removed . But when opening settings storage usb I can see my sd-card in the emulator.. . And can access it and see the data on it.. .",
"Question : I am using the Storage Access Framework for android 4.4 and opening the file picker . Everything works except when choosing a file from Google Drive I can only figure out how to open it as an input stream but I would like to get a java File object . The content uri that s being returned looks something like this : content : com.google.android.apps.docs.storage document acc 3D4 3Bdoc 3D2279 .. . .. . Other questions that are similar but do not have a working solution which allows me to get the filename filesize and contents : .. . .. . Get real path from URI Android KitKat new storage-access-framework http : stackoverflow.com questions 20067508 get-real-path-from-uri-android-kitkat-new-storage-access-framework .. . Android Gallery on KitKat returns different Uri for Intent.ACTION GET CONTENT http : stackoverflow.com questions 19834842 android-gallery-on-kitkat-returns-different-uri-for-intent-action-get-content .. . .. . I ve also looked into Paul Burke s FileChooser https : github.com iPaulPro aFileChooser and this is the most common question on the issue s list . How can I get a file from that content uri My current workaround is to write out a temporary file from an inputstream . Thanks .. . Answer : Ok . I found that the right way is to use the input stream from the other posts in conjunction with some data from the contentresolver . For reference here are the hard to find android docs : https : developer.android.com training secure-file-sharing retrieve-info.html .. . .. . The relevant code to get mimetype filename and filesize : .. . .. . And to get the file contents : .. . .. . Hope this helps someone else . Comment : Perfect solution Comment : got same issue stackoverflow.com questions 30206483 http : stackoverflow.com questions 30206483 converting-bitmap-from-uri-is-returning-null 30206736 30206483 Comment : kindly look it out give some solution Comment : Doesn t work null-pointer on getContentResolver .query Comment : Its only getting file name but i want to get the content uri of google drive file",
"Question : null .. . Answer : I m using Android Storage Access Framework and I would like to filter for .opus files . I ve tried using audio opus MIME type as I ve seen at https : en.wikipedia.org wiki Opus audio format but it s not working",
"Question : Users of my app complain that the app can t write to an external SD card . Upon researching the issue I ve come to a conclusion that the app must use the Storage Access Framework https : developer.android.com guide topics providers document-provider.html in order to write to an external SD card . But what if I need to be able to write files from native-code Is there any way to request this permission Is there a way to request a specific folder to be writable from my app Comment : Take a look at my answer here stackoverflow.com questions 28760025 http : stackoverflow.com questions 28760025 android-write-files-to-usb-via-otg-cable 28760222 28760222 .. . Answer : Make sure .. . .. . 1 . WRITE EXTERNAL STORAGE is claimed in AndroidManifest.xml .. . 2 . List item .. . .. . Activity.getExternalFilesDirs to get the dir Comment : That s the problem : I want to write to an arbitrary directory not just to the one returned by getExternalFilesDirs . Comment : May I ask why you need it As far as I can tell the mounting dir for external storage is very device specific . Comment : Yes it is device specific . But my understanding is that getExternalFilesDirs doesn t just return the external storage s root its mounting point . It returns a specific folder within that storage the only folder I m allowed to write to . Did I get that wrong",
"Question : I am using the Storage Access Framework SAF : .. . .. . I would like to know if there is an extra to enable the Show SD Card option that user can see in the overflow menu . enter image description here http : i.stack.imgur.com jIorN.png .. . Answer : Add .. . .. . But be aware that this is not part of the official API . So there is a good chance this will stop working in future Android versions . The relevant Framework code can be found here : http : grepcode.com file repository.grepcode.com java ext com.google.android android 5.1.0 r1 com android documentsui DocumentsActivity.java 255 Comment : Nice tip It seems to be the only way to do it currently",
"Question : null .. . Answer : From Androind 4.4 Kitkat application cannot able to access secondary storage completely . We can use Storage Access Framework to access . If I want to create file I would need to call ACTION CREATE DOCUMENT intent . If I want to create multiple-files simultaneously how can I create it Do I need to call that intent each time",
"Question : Intro .. . .. . Managing primary storage files + secondary storage files local only : I will list all the informations I already have and would like you to extend them or correct me so that this question hopefully becomes a overview that summarises all the main informations someone has to know before starting to work with LOCAL storages . I m sure many people are looking for such an overview.. . .. . .. . Overview .. . .. . Normally you have following storages : .. . .. . a primary storage always directly accessible mostly on the internal-storage but it s up to the phone manufactorer .. . a secondary storage directly accessible for android 4.3 .. . other external storages like USB OTG for example.. . .. . .. . Following questions raise up : .. . .. . 1 . How to find out all available local storages + find out the type primary secondary resp . internal sd-card usb 2 . List all available files on the storages .. . .. . 2.1 Which storages will be indexed via the MediaStore 2.2 How to get all files via the MediaStore 2.3 How to get all files without MediaStore 3 . How to edit files on those storages Most of the things I already know mostly my questions are based on what data is indexed by the media store how to find out which storages are available how to identify a storage.. . So I post an answer that answers most of the parts and that also shows a status for each questions android version pair so that it s easily visible what informations are still missing .. . .. . Status - feel free to extend correct my answers to the questions if you know more or I m wrong .. . .. . Android 4.4 .. . .. . Question 1 - partially known .. . Question 2.1 - unknown .. . Question 2.2 - known .. . Question 2.3 - known .. . Question 3 - known .. . .. . Android 4.4 .. . .. . Question 1 - partially known .. . Question 2.1 - unknown .. . Question 2.2 - known .. . Question 2.3 - partially known .. . Question 3 - partially known .. . .. . Android 5 .. . .. . Question 1 - partially known .. . Question 2.1 - unknown .. . Question 2.2 - known .. . Question 2.3 - known .. . Question 3 - known Comment : Before you get down-voted and close-voted into oblivion you might wish to rework this into Stack Overflow s question-and-answer format see Can I answer my own question in the site documentation https : stackoverflow.com help self-answer . Comment : Edited the question and posted an answer that shows what I already know.. . .. . Answer : ---------------------------------------------- .. . .. . Android 4.4 : .. . .. . ---------------------------------------------- .. . .. . 1 . How to find out all available local storages + find out the type primary secondary resp . internal sd-card usb partially known .. . .. . I m not sure how to distinguish between the available storage correctly.. . Getting the primary storage path is possible via File primaryStorage context.getExternalCacheDir . Or you can get all paths via File dirs ContextCompat.getExternalFilesDirs context null . This will list all available paths not sure if it will return usb storages as well or if it reliable adds sd-card paths.. . I actually don t know how to reliably find out which path is internal whcih one is an sd-card and which one is an usb-drive .. . .. . 2.1 Which storages will be indexed via the MediaStore unknown .. . .. . I ve seen that sometimes external storages are indexed and sometimes not I m not sure what s the default behaviour.. . .. . .. . 2.2 How to get all files via the MediaStore known .. . .. . Just list all files via a query on the ContentProvider with following URI : MediaStore . Audio Video Images File .Media.EXTERNAL CONTENT URI depending on which data you want .. . .. . 2.3 How to get all files without MediaStore known .. . .. . On this android version you only need the android.permission.WRITE EXTERNAL STORAGE then you can directly list all files on the external storages via the File class . All you need to know are the available root paths from point 1 .. . .. . 3 . How to edit files on those storages known .. . .. . Can be done directly via the File class if you have the above mentioned permission in your manifest . ---------------------------------------------- .. . .. . Android 4.4 : .. . .. . ---------------------------------------------- .. . .. . This device is very specific as it does not yet offer the Storage Access Framework but already limits the access to secondary storages 1 . How to find out all available local storages + find out the type primary secondary resp . internal sd-card usb partially known .. . .. . Basically this should be possible in the same way as on android 4.4.. . .. . .. . 2.1 Which storages will be indexed via the MediaStore unknown .. . .. . On this device only the primary storage will be indexed correct 2.2 How to get all files via the MediaStore known .. . .. . Works the same way as it worked on android 4.4.. . .. . .. . 2.3 How to get all files without MediaStore partially known .. . .. . On the primary storage it works the same way as it did on android 4.4 . I don t know how it works on this android version for the other local storages.. . .. . .. . 3 . How to edit files on those storages partially known .. . .. . Primary storages files will be editable via the File class . I don t know how to get reliable write access to other storages.. . .. . .. . ---------------------------------------------- .. . .. . Android 5 : .. . .. . ---------------------------------------------- .. . .. . 1 . How to find out all available local storages + find out the type primary secondary resp . internal sd-card usb partially known .. . .. . Getting primary storage is possible as before . I don t know how to get a list of all other storages though . The manual way is to let the user choose the root directory of the secondary storage sd-card usb stick like following : .. . .. . And afterwards just remember the returned Uri and persist the Uri when getting the result from the Storage Access Framework : .. . .. . I don t know how to find out the type sd-card usb of the directory the user selected though . All files UNDER the root path will be readable and writeable via the DocumentFile class . 2.1 Which storages will be indexed via the MediaStore unknown .. . .. . Only the primary I think . Correct 2.2 How to get all files via the MediaStore known .. . .. . Works as before.. . .. . .. . 2.3 How to get all files without MediaStore known .. . .. . For the primary storage it works as before as well just via the File class for the rest you HAVE to use the Uri for the corresponding storage that you got in point 1 . Then you can use the DocumentFile class to get all files .. . .. . 3 . How to edit files on those storages known .. . .. . Primary storages files will be editable via the File class the rest will be editable via the DocumentFile with the help of the tree Uri from point 1 .",
"Question : null .. . Answer : I have a large file on a extended drive or USB drive to open directly from there and it is around 1GB so I can t use BufferedStream . Is it possible to gain a random-access to this stream which is returned by SAF Android Storage Access Framework Please note that I want to write some bytes in the middle of the stream . I have already written the following Have I done something wrong or it is not possible anyway . I am using Android API Level 21 Lollipop",
"Question : null .. . Answer : I want to copy or move files from the internal-storage to the sd-card . I do this via the Storage Access Framework SAF and the DocumentFile class.. . Copying is stream based and the DocumentFile does not have a function like the File class to set the last modified date . I know that I move copy files to the sd-card so I know that I create a local file . With this information is it somehow possible to update the last modified date of the underlying file of the DocumentFile It seems like you can t move copy files from your internel storage to the sd-card without losing the last modified date.. . .. . .. . Reading - Working .. . .. . WRITING - NOT WORKING .. . .. . This fails with a java.lang.UnsupportedOperationException : Update not supported exception.. . Comment : I m sorry but I don t have an answer for you however I m interested on how to move and copy files using the Storage Access Framework . Can you help me or do you have a link-to a tutorial Comment : The way I do it is via streams . Moving is copying + deleting renaming only works if the folder did not change . You can check my UNDOCUMENTED library if you want to : github.com MFlisar StorageManager blob master lib src main java https : github.com MFlisar StorageManager blob master lib src main java com michaelflisar storagemanager StorageManager.java . Check the initDefaultHandlers there it shows how to copy move files with my wrapper classes.. .",
"Question : null .. . Answer : After uninstallation and reinstallation our application cannot write to application folder sdcard Android data applicationpackage files on external storages cannot work with MediaStore provider and cannot access other files on SD card using Storage Access Framework . The issue occurs randomly but it is quite common and it is easy to reproduce on many devices . It can be reproduced on many Android 5.x devices with SD card : LG G3 VS985 4G 5.1.1 LG G Pad V500 5.0.2 Alcatel Idol 3 Nvidia SHIELD Tablet K1 5.1.1 Verizon SM-G900V 5.0 and other LG Alcatel Asus devices.. . .. . .. . Steps to reproduce : .. . .. . 1 . Install application .. . 2 . Create some files in application folder sdcard Android data applicationpackage files on SD card . The UID of this folder is e.g . 10206 . Application UID is also 10206 . Access to SD card works fine . I can access application folder or access other folders via Storage Access Framework .. . 3 . Uninstall application - application folder on SD card is correctly deleted . 4 . Re-install application It has to be completely uninstalled prior reinstallation . By updating the application you will not reproduce it . Now one of these 3 cases can occur : .. . .. . CASE A NO BUG : UID of application is increased to e.g . 10207 UID of application folder on SD card is the same - 10207 and everything works fine . I can access application folder or access other folders via Storage Access Framework . CASE B BUG : UID of both app and application folder on SD card is not increased and remains 10206 but internally in system the UID of this application package is obviously already different . This causes following exceptions : .. . .. . After repeaing steps 3 . and 4 . case C always occurs . Mostly case C occurs immediately without case B and repeating steps 3 . a 4 . CASE C BUG : UID of app is increased to e.g . 10207 but UID of application folder sdcard Android data applicationpackage files remains 10206 and cannot be accessed from application . This causes following exceptions : .. . .. . Any further uninstallations and reinstallations don t help . UID of application folder remains 10206 and UID of app is correctly changed after each re-installation . The only workaround is reboot of device . After reboot the UID of application folder is updated according application UID . After that everything works fine till next uninstallation . So now I have to force users to reboot device . Note : .. . .. . I obtain application UID by : android.os.Process.myUid .. . I obtain application folder UID by : Os.stat sdcard Android data applicationpackage files .st uid .. . .. . I am facing this issue for a quite a long time and now I am quite sure that it is somehow related to different UIDs . I don t know how to fix or workaround it nicely .",
"Question : Can I somehow find out which storages are currently available WITHOUT starting the document picker and let the user select a directory I want to display all storage roots like following : .. . .. . Why .. . .. . Actually I want to know if an sd-card is available before telling the user that he needs to select the sd cards root directory via the document picker.. . So I want following : .. . .. . 1 . check if an sd-card is available .. . 2 . if not do nothing .. . 3 . if an sd-card is available tell the user that my app needs permissions to read the sd-card and ask the user to select the sd cards root directory via the storage-access-framework .. . .. . The same I want to do for the usb stick but there I know how to do it there broadcast receivers exist to get notified when an usb stick is added and I can check if on is already connected as well .. . Answer : Here s the thing I came up until now :",
"Question : I have managed to open a directory with Storage Access Framework . The SAF returns Uri to the opened directory . When I try to open a file inside that directory I get FileNotFoundException even through that the file does exists I have checked . Obviously I am doing something wrong . This is an example of what I am trying to do : Comment : interesting where-in the documentation you had read that uri returned from this API is a path to a file Comment : what makes you think the uri returned is a File uri more importantly why didn t you check what the content of the uri is Comment : I m voting to close this question as off-topic because the OP can t be bothered to do any amount of debugging before asking the question Comment : The file does exist I have checked really there is a file tree primary : test text.txt on your device Comment : It is an example . I know it is not the correct way . I just do not know hot to get to the uri of a subfile . .. . Answer : When I try to open a file inside that directory I get FileNotFoundException even through that the file does exists I have checked .. . .. . It is not returning to you a directory . It is returning to you a content : Uri that you can use with methods like fromTreeUri https : developer.android.com reference android support v4 provider DocumentFile.html fromTreeUri 28android.content.Context 20android.net.Uri 29 . Comment : Can you please give me an example of how to get an Uri to the any subfile inside returned Uri Comment : @miXo : I have not played with ACTION OPEN DOCUMENT TREE yet . However fromTreeUri will give you a DocumentFile at the root of the tree and DocumentFile has listFiles to traverse downward in the tree . Comment : I have managed to do that . However this is not good enough for me . I need to get to the file in constant-time . Tnx for help anyway . Comment : @miXo : I need to get to the file in constant-time -- I have no idea what that means . Also there is no requirement that there actually be a file . The user can use the Storage Access Framework to access any provider that the user wants many of which will be cloud-based e.g . Google Drive Dropbox . Some of those will elect to stream the contents down in real-time -- that is up to them .",
"Question : null .. . Answer : I m trying to get permissions for reading and writing a file present in SD card . I want to get those permissions using the new Storage Access Framework introduced in KitKat without selecting the file using the Documents Provider . I tried selecting the SD card using the Documents Provider and using takePersistableUriPermission on it for granting permissions but still the files inside the SD card aren t allowed for r w . I tried searching on stackoverflow without no proper direction to what I want to achieve . Comment : takePersistableUriPermission is for a document not a volume . If you only need one document for reading and writing a file have the user select that one file using ACTION OPEN DOCUMENT then use takePersistableUriPermission for that one document . If you need broader scope than that use ACTION OPEN DOCUMENT TREE Android 5.0+ or StorageVolume Android N+ . Comment : @CommonsWare I don t want to select that one file always . I want to have access to all music files of SD card so that I can modify their tags . BTW I ll have a look at StorageVolume Comment : I want to have access to all music files of SD card so that I can modify their tags -- get the music from the MediaStore . Use ContentResolver and openInputStream openOutputStream to read and write the content from the Uri you get from the MediaStore . Comment : @CommonsWare Actually I am using jaudiotagger library and it requires File for writing the tags to the music file . Comment : Then use a different library . Or fork that library and augment it to support streams ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
providers
|
UNK_RELATION
|
memcheck@valgrind@75
|
memcheck -- memcheck is the dynamic memory error detector tool present in @placeholder framework .
|
{
"confidence": [
44.35558319091797,
41.05683135986328,
40.00762176513672,
38.52527618408203,
38.226768493652344,
38.020511627197266,
37.23773193359375,
37.23773193359375,
37.232521057128906,
36.98307418823242,
36.98307418823242,
35.20928192138672,
35.20928192138672,
35.20928192138672,
35.20928192138672,
34.947303771972656,
34.21318817138672,
33.14657211303711,
33.14657211303711,
32.88917922973633,
32.88917922973633,
32.78057861328125,
32.78057861328125,
32.654144287109375,
32.654144287109375,
31.82256317138672,
31.82256317138672,
31.248157501220703,
30.988954544067383,
30.988954544067383,
30.988954544067383,
30.988954544067383,
29.884258270263672,
29.884258270263672,
29.884258270263672,
29.884258270263672,
29.748695373535156,
28.56024932861328,
28.08890724182129,
27.966522216796875,
27.30132484436035,
27.12031364440918,
26.76490020751953,
25.977317810058594,
25.977317810058594,
25.513044357299805,
25.513044357299805,
22.412342071533203,
22.372146606445312,
22.303138732910156,
21.198442459106445,
20.538198471069336,
20.456253051757812,
20.108537673950195,
19.94344139099121,
19.3515567779541,
19.009748458862305,
18.525909423828125,
18.51611328125,
18.201553344726562,
18.201553344726562,
17.83979034423828,
17.83979034423828,
17.721988677978516,
17.350215911865234,
17.20864486694336,
17.06320571899414,
16.850921630859375,
16.850921630859375,
16.850921630859375,
16.850921630859375,
16.624664306640625,
16.57065200805664,
16.53636360168457,
16.371232986450195,
16.371232986450195,
16.371232986450195,
16.302955627441406,
16.245519638061523,
16.174598693847656,
16.174598693847656,
16.174598693847656,
16.174598693847656,
16.174598693847656,
16.097206115722656,
16.04964256286621,
15.769471168518066,
15.746753692626953,
15.746753692626953,
15.746753692626953,
15.746225357055664,
15.746225357055664,
15.746225357055664,
15.746225357055664,
15.611536026000977,
15.580059051513672,
15.555315017700195,
15.43166732788086,
15.393199920654297,
15.393199920654297
],
"content": [
"I recently discovered the racecheck tool of cuda-memcheck available in CUDA 5.0 cuda-memcheck --tool racecheck see the NVIDIA doc http : docs.nvidia.com cuda cuda-memcheck index.html using-racecheck .",
"In the process of testing all kinds of dynamic memory-related errors using Valgrind http : en.wikipedia.org wiki Valgrind or to be specific Memcheck https : en.wikipedia.org wiki Valgrind Memcheck I came accross a situation where I m creating the memory overlap intentionally but there is no error report from Valgrind memcheck .",
"I am running memcheck using valgrind .",
"docs.nvidia.com cuda cuda-memcheck stack-backtraces http : docs.nvidia.com cuda cuda-memcheck stack-backtraces",
"The issue looks like a memcheck bug .",
"Note that valgrind memcheck only discovers when you abandon memory .",
"Similarly memcheck can give you stack-trace .",
"I cannot use memcheck since that is linux specific .",
"The racecheck tool isn t supported in SM 1.x or 3.5 docs.nvidia.com cuda cuda-memcheck index.html supported-devices http : docs.nvidia.com cuda cuda-memcheck index.html supported-devices",
"How can i attach the memcheck to that library that I could detect memory-leaks in it",
"As memcheck displays the memory-leaks after the end of the program but as my program has infinite-loop it will never end .",
"I m running valgrind memcheck on a program that spawns thousands of other threads .",
"Please post the valgrind memcheck options you have tried .",
"As with the illegal read-write errors Memcheck attempts to make sense of the address freed .",
"So if this is the case and it works why does Memcheck tell me that it s uninitialized",
"is there any way to get Valgrind up and running on ARMv5 or even only the vgdb or Memcheck tool included in Valgrind",
"I m starting out in C++ and using memcheck to check my programs for memory-leaks .",
"When I do memcheck with Valgrind I get the following error : .. . .. . I don t understand what value to be initialized here .",
"I wrote a small program that seems to work fine but valgrind give me a weird error when I run memcheck .",
"I successfully used cuda-memcheck to get errors about wrong memory accesses .",
"First I ran the application through Valgrind w memcheck and fixed some random memory-leaks here and there .",
"This is a little test to help demonstrate and review the ouput of valgrind s memcheck .",
"There was something that seemed odd in the memcheck output that I would like help understanding .",
"Have a look at the client requests http : valgrind.org docs manual mc-manual.html mc-manual.clientreqs feature of memcheck .",
"I have one application it only start by these way : .. . .. . I want to use valgrind to do memcheck .",
"The problem is that when i debug it with memcheck on i get error : .. . .. . Program received signal CUDA EXCEPTION 1 Lane Illegal Address .",
"I just tested your code and it gives me the same error from memcheck .",
"The error from Memcheck is below : .. . .. . I ve narrowed down the problem to the following two lines 10 errors on write and 10 on read : .. . .. . Any insight would be appreciated",
"So I am running Valgrind memcheck on a program but the program crashes when doing so .",
"I encountered a problem that Memcheck reports uninitialized values and I think these are perfectly legal .",
"I would like to know if Memcheck is really wrong and what can be done about it .",
"I have noticed however that the function at the top of the stack-trace Memcheck shows me is a virtual function could this be something to do with it",
"-g on linux then cuda-memcheck can show function names for the host functions in the host backtrace .",
"Additional usage information is available in the documentation http : docs.nvidia.com cuda cuda-memcheck stack-backtraces .",
"If memcheck knows a call to new has been made how is it that it can t tell where this has come from",
"Thus I want to use memcheck which requires to have a .bat file which invokes my Java program .",
"I typed in valgrind . myprogramname --tools-memcheck --leak-check yes .. . .. . But the summary of the memory-leaks and errors are not printing out when the program ends .",
"Is it feasible to record a program state and declare it as untainted and then later restore that state in Valgrind memcheck or DrMemory",
"As @talonmies indicated I suspect he will not mind if I post a CW answer the cuda-memcheck tool provides additional stack back tracing capability which can be enabled with the --show-backtrace switch added to the command-line .",
"So when your program exits cuda-memcheck checks for chunks of memory that were allocated but not freed and gives you the address of the chunk of memory but it has no way to tie that back to when it was allocated .",
"I m running to cuda-memcheck to debug my code and the output is as follows .. . .. . Is it possible to tell from the line Host Frame : . nmt 0x53526 where is broken in the code",
"test.cu .. . .. . Compilation : .. . .. . nvcc test.cu --ptxas-options -v -o test .. . .. . If we run the kernel : .. . .. . cuda-memcheck --tool racecheck test .. . .. . kernel test 32 32 32 : 32 blocks 32 threads does not lead to any apparent racecheck error .",
"TL DR .. . .. . According to Valgrind s memcheck tool if I allocate a large local variable in a function and launch that function using multiprocessing.Pool .apply async the heap size for both the subprocess and the main process increases .",
"That takes up a rather long time and therefore creates an overhead when running Valgrind memcheck http : valgrind.org DrMemory http : www.drmemory.org .",
"To do this I ran my script under Valgrind using memcheck with the technique described in this SO answer http : stackoverflow.com a 6037350 2615940 .",
"This is from the documentation Invalid free : .. . .. . Memcheck keeps track of the blocks allocated by your program with malloc new so it can know exactly whether or not the argument to free delete is legitimate or not .",
"I m using valgrind s memcheck on my soft But I have problems in this : for some reason we will transform the malloced pointer before store and transform back when use.Just like this :",
"If I comment out the free cur and free cur- lock from the remove node section then memcheck tells me I have a memory leak but if I keep them there then I am doing an invalid read at the top of the loop .",
"If you ve used Memcheck from Valgrind you ll probably be familiar with this message.. . .. . .. . Conditional jump or move depends on uninitialized value s .. . .. . s I ve read about this and it simply occurs when you use an uninitialized value . s .. . .. . This will work because s is automatically initialized.. .",
"This tool can detect race conditions with shared-memory in a CUDA kernel .",
"There is a valgrind tool massif that measures how much heap-memory an application uses .",
"I tool it the wrong way. .",
"EDIT .. . .. . You may also want to check out this page which gives hints on how to decipher this particular valgrind error .. . .. . https : computing.llnl.gov code memcheck deciphering4 .. . .. . Addendum .. . .. . Another common cause for this I ve just found is when you pass over some integer constants to a variadic function which are put on the stack as ints but when the callee gets it as longs you ve got a problem on 64-bit machines .",
"Valgrind is extremely helpful with dynamic memory I m almost sure it guarantees that it will find every illegal memory operation here but with stack it isn t so obvious .",
"Switching focus to CUDA kernel 0 grid 1 block 0 0 0 thread 0 0 0 device 0 sm 7 warp 0 lane 0 0x0000000000977608 in foo st 0x3fffc38 at test.cu : 15 15 st- m tx 99 .. . .. . If I debug it without memcheck on it works fine and gives expected results .",
"I m trying to run memcheck on it with this command in an attempt to avoid profiling the java child-process while profiling all of the other child processes : .. . .. . However among other problems I see the following in the LOGFILE : .. . .. . I tried --trace-children-skip java as well which didn t cause the No match error but it failed entirely to prevent valgrind from stepping into the java subprocesses .",
"I am using CPython 2.7.6 on Red Hat Linux and running memcheck like this : .. . .. . valgrind --tool memcheck --suppressions . valgrind-python.supp python test.py .. . .. . Code and Output .. . .. . Heap Summaries one per process : .. . .. . total heap usage : 45 193 allocs 32 392 frees 7 221 910 bytes allocated .. . total heap usage : 44 832 allocs 22 006 frees 7 181 635 bytes allocated .. . .. . If I change the tmp a 1 line to tmp a 10000000 I get these summaries : .. . .. . total heap usage : 44 835 allocs 22 009 frees 27 181 763 bytes allocated .. . total heap usage : 45 195 allocs 32 394 frees 17 221 998 bytes allocated .. . .. . The Question .. . .. . Why do the heap sizes of both processes increase",
"This is what I get : .. . .. . I m not sure why I m not seeing a similar memory leak error here .",
"By maintaining a start-pointer to the start of the memory block .. . 2 .",
"What I guess there is 204 bytes memory loss .. . .. . but what it meant by .. . .. . and how to know how many time this memory leak happened by same function",
"Expecially for memory-leaks in dll s IIS Web application I am using Eurekalog which also handels Memory leaks and shows where they occur",
"I am not sure is it one time memory leak or every time it is leaking .",
"It might be a random junk value in memory entirely unrelated just a coincidence .",
"What s the memory situation",
"But long will take 8 bytes in memory .",
"I m trying to figure out Valgrind usage so I made a simple program but it seems Valgrind gives a strange error when I do dynamic mem allocation in class .",
"In debug mode this tool does not detect anything which is apparently normal .",
"@Sorakun : I doubt this solves the memory-leaks .",
"Am I doing something wrong with shared-memory",
"Can valgrind see this is the case and handle this memory differently",
"Usually int takes 4 bytes in memory .",
"Memory leak detection Valgrind user-manual .. . .. . SO in a rather long winded way we come to the same conclusion as fbafelipe that is assuming you are using the API correctly either sqlite is leaking a little memory or it is engaging in one of the valid cases above .",
"So calling these libraries from ctypes creates the possibility of memory errors as in c-style memory errors : use of unallocated memory uninitialized memory use after free .",
"Basically this kernel uses SIZE X SIZE Y NTHREADS sizeof float B of shared-memory and I can use 48KB of shared-memory per SM .",
"Memory leak detection Valgrind user-manual .. . .. . It turns out that the warning Possibly lost covers cases 5-8 for the BBB block above .",
"This could just be a random value in memory that happens to point into a block and so you shouldn t consider this ok unless you know you have interior-pointers .",
"If you are using sqlite API right that means that either sqlite is doing something with pointers that is confusing valgrind or you found a memory leak in sqlite .",
"Even though it could use dynamic translation that is the host and target processors are from different architectures it doesn t .",
"The memory was probably allocated by the C library .",
"The reason malloc fails is likely that you are leaking memory elsewhere .",
"I mean if the program crashes I can assume that there will be memory left unhandled .",
"I do get some reports of Definitly lost memory for example .",
"I am trying to debug a memory leak using valgrind on CentOS .",
"When I run this : .. . .. . the program runs just fine except for memory-leaks .",
"While trying to check my small program I m getting this error : .. . .. . This kind of errors are AFAIK due to an incorrect memory access .",
"Lots of goggling + trial and error .",
"Still I am getting the error .",
"Miscellaneous Valgrind FAQ .. . .. . The Valgrind user-manual talks about how it keeps track of all heap blocks allocated with malloc new and describes two ways you can keep track of memory : .. . .. . 1 .",
"From Valgrind faq http : valgrind.org docs manual faq.html faq.deflost : possibly lost means your program is leaking memory unless you re doing funny things with pointers .",
"I recommend this : check in the stack of the leak the function from sqlite that you actualy called then check the documentation if you should call another function to release the memory when done .",
"I usually rely on valgrind for debugging memory issues .",
"How can I do memory test for such things",
"However I have freed all malloc ed memory .",
"It s actually memory unfreed that is still reachable .",
"It can be seen as a virtual-machine : .. . .. . Valgrind is in essence a virtual-machine using just-in-time JIT compilation techniques including dynamic recompilation .",
"The library is trying to access a memory area which is not mapped in its memory space .",
"@unwind just FYI this code is a snippet from a larger code base where all the possible dynamic memory related problem scenarios are there including the mismatch between C C++ allocator-deallocator .",
"One way to tell the difference is to see if different runs always leak the same memory or you leak more memory are test runs with larger inputs .",
"What you are looking at is a stack-overflow error .",
"Perhaps I misunderstood where the error was directing me ."
]
}
|
{
"confidence": [
47.8820686340332,
46.81545639038086,
46.74778366088867,
45.660587310791016,
43.66084289550781,
43.58564376831055,
42.70475769042969,
42.446998596191406,
41.68321228027344,
40.74555969238281,
40.455848693847656,
40.454559326171875,
40.450172424316406,
40.444454193115234,
40.08795166015625,
39.83196258544922,
39.79122543334961,
38.42833709716797,
38.351768493652344,
38.22712326049805
],
"content": [
"Question : I m running to cuda-memcheck to debug my code and the output is as follows .. . .. . Is it possible to tell from the line Host Frame : . nmt 0x53526 where is broken in the code If so how can I do that Thanks . Comment : docs.nvidia.com cuda cuda-memcheck stack-backtraces http : docs.nvidia.com cuda cuda-memcheck stack-backtraces Comment : That s a great resource . Thank you @talonmies Comment : Yeah when in doubt read the documentation .. . Answer : As @talonmies indicated I suspect he will not mind if I post a CW answer the cuda-memcheck tool provides additional stack back tracing capability which can be enabled with the --show-backtrace switch added to the command-line . The back trace may consist of both host and device functions i.e . host and device back traces . If the application has been also compiled with host debug symbol information e.g . -g on linux then cuda-memcheck can show function names for the host functions in the host backtrace . Additional usage information is available in the documentation http : docs.nvidia.com cuda cuda-memcheck stack-backtraces .",
"Question : In the process of testing all kinds of dynamic memory-related errors using Valgrind http : en.wikipedia.org wiki Valgrind or to be specific Memcheck https : en.wikipedia.org wiki Valgrind Memcheck I came accross a situation where I m creating the memory overlap intentionally but there is no error report from Valgrind memcheck . Below are the codes used . Please share what I m missing . Compilation .. . .. . Sample run and output .. . .. . There is actually no information about the memory region overlap . As per the Valgrind manual it should have showwn something like : .. . .. . What is the missing part in my case System information : Comment : Works for me compiled with gcc 4.7.3 valgrind 3.8.1 . Could the compiler have inlined the memcpy with a builtin perhaps you could try compiling with -fno-builtin and see if this changes . Comment : Using Valgrind valgrind-3.6.0.SVN-Debian and gcc Debian 4.4.5-8 4.4.5 I also get the expected Valgrind message . Comment : @unwind just FYI this code is a snippet from a larger code base where all the possible dynamic memory related problem scenarios are there including the mismatch between C C++ allocator-deallocator . To comply with g++ casting is there . Anyway thanks for the i p . : - Comment : @Hasturkun . . TY for the information . Answer added . .. . Answer : Thanks to @Hasturkun the issue was with the compiler inlining memcpy with a builtin . So valgrind was not able to hook the memcpy and catch the error . Modified compilation .. . .. . Modified Output",
"Question : If you ve used Memcheck from Valgrind you ll probably be familiar with this message.. . .. . .. . Conditional jump or move depends on uninitialized value s .. . .. . s I ve read about this and it simply occurs when you use an uninitialized value . s .. . .. . This will work because s is automatically initialized.. . So if this is the case and it works why does Memcheck tell me that it s uninitialized Should the message be ignored Perhaps I misunderstood where the error was directing me . From the Valgrind manual the actual erroneous snippet is.. . However in my code I can t see anything like that . I have noticed however that the function at the top of the stack-trace Memcheck shows me is a virtual function could this be something to do with it Update 1 : .. . .. . I took a look at GlutApplication.cpp : 120 and it looks like the uninitialized variable was being passed in to a function on that line . Simple Comment : Does MyClass have a constructor Comment : Hmm I think I assumed too much here I have put a line through that as I don t think it s whats causing the issue.. . It s the FinishRender function I think .. . .. . Answer : In 64-bits machine . Usually int takes 4 bytes in memory . But long will take 8 bytes in memory . So simply refer an int value as long format will cause totally incorrect result . An convert is needed in this situation .",
"Question : I am using valgrind on a program which runs an infinite-loop . As memcheck displays the memory-leaks after the end of the program but as my program has infinite-loop it will never end . So is there any way i can forcefully dump the data from valgrind time to time . Thanks Comment : If you found my answer below solved your problem it is polite to accept the answer . Comment : thats not what i want . I want to get output on demand and this VALGRIND DO LEAK CHECK does not do that. . Comment : It does for me . I ll update my answer below with an example . .. . Answer : Have a look at the client requests http : valgrind.org docs manual mc-manual.html mc-manual.clientreqs feature of memcheck . You can probably use VALGRIND DO LEAK CHECK or similar . EDIT : .. . .. . In response to the statement above that this doesn t work . Here is an example program which loops forever : .. . .. . When I run this in valgrind I get an endless output of new leaks : .. . .. . The program does not terminate . Comment : Thanks. . I tool it the wrong way. .",
"Question : If you ve used Memcheck from Valgrind you ll probably be familiar with this message.. . .. . .. . Conditional jump or move depends on uninitialized value s .. . .. . s I ve read about this and it simply occurs when you use an uninitialized value . s .. . .. . This will work because s is automatically initialized.. . So if this is the case and it works why does Memcheck tell me that it s uninitialized Should the message be ignored Perhaps I misunderstood where the error was directing me . From the Valgrind manual the actual erroneous snippet is.. . However in my code I can t see anything like that . I have noticed however that the function at the top of the stack-trace Memcheck shows me is a virtual function could this be something to do with it Update 1 : .. . .. . I took a look at GlutApplication.cpp : 120 and it looks like the uninitialized variable was being passed in to a function on that line . Simple Comment : Does MyClass have a constructor Comment : Hmm I think I assumed too much here I have put a line through that as I don t think it s whats causing the issue.. . It s the FinishRender function I think .. . .. . Answer : If Valgrind states that a value is not initialised then in 99.5 it is really not initialised . Normally when compiler reports use of an uninitialised value -Wuninitialized in GCC you check for inline unrolls as your uninitialised value can be declared and not initialised for example 10 levels of inline function-calls or template unrolls higher than actual GCC report . Valgrind does the same but in runtime . So you should check whole path in which uninitialised value travelled from place of being declared and not initialised to the place where it s actually used . The path can be for example : cascade of function-calls where each function passes its arguments and possibly uninitialised value to next function . Valgrind will report in last function when the value is actually used . .. . .. . Generally you should not ignore what Valgrind states . Valgrind is not a simple trace program . It can be seen as a virtual-machine : .. . .. . Valgrind is in essence a virtual-machine using just-in-time JIT compilation techniques including dynamic recompilation . Nothing from the original program ever gets run directly on the host processor . Instead Valgrind first translates the program into a temporary simpler form called Intermediate Representation IR which is a processor-neutral SSA-based form . After the conversion a tool see below is free to do whatever transformations it would like on the IR before Valgrind translates the IR back into machine code and lets the host processor run it . Even though it could use dynamic translation that is the host and target processors are from different architectures it doesn t . Valgrind recompiles binary code to run on host and target or simulated CPUs of the same architecture . Wikipedia",
"Question : I recently discovered the racecheck tool of cuda-memcheck available in CUDA 5.0 cuda-memcheck --tool racecheck see the NVIDIA doc http : docs.nvidia.com cuda cuda-memcheck index.html using-racecheck . This tool can detect race conditions with shared-memory in a CUDA kernel . In debug mode this tool does not detect anything which is apparently normal . However in release-mode -O3 I get errors depending on the parameters of the problem . Here is an error example initialization of shared-memory on line 22 assignment on line 119 : .. . .. . ERROR : Potential WAW hazard detected at shared 0x0 in block 35 0 0 : Write Thread 32 0 0 at 0x00000890 in ....h : 119 : void kernel test3 Data Write Thread 0 0 0 at 0x00000048 in ....h : 22 : void kernel test3 Data .. . Current Value : 13 Incoming Value : 0 .. . .. . 1 . The first thing that surprised me is the thread ids . When I first encountered the error each block contained 32 threads ids 0 to 31 . So why is there a problem with the thread id 32 I even added an extra check on threadIdx.x but this changed nothing . 2 . I use shared-memory as a temporary buffer and each thread deals with its own parameters of a multidimensional-array e.g . shared float arr SIZE 1 SIZE 2 NB THREADS PER BLOCK . I do not really understand how there could be any race conditions since each thread deals with its own part of shared-memory . 3 . Reducing the grid size from 64 blocks to 32 blocks seemed to solve the issue with 32 threads per block . I do not understand why . In order to understand what was happening I tested with some simpler kernels . Let me show you an example of a kernel that creates that kind of error . Basically this kernel uses SIZE X SIZE Y NTHREADS sizeof float B of shared-memory and I can use 48KB of shared-memory per SM . test.cu .. . .. . Compilation : .. . .. . nvcc test.cu --ptxas-options -v -o test .. . .. . If we run the kernel : .. . .. . cuda-memcheck --tool racecheck test .. . .. . kernel test 32 32 32 : 32 blocks 32 threads does not lead to any apparent racecheck error . kernel test 32 64 32 : 64 blocks 32 threads leads to WAW hazards threadId.x 32 and errors . ERROR : Potential WAW hazard detected at shared 0x6 in block 57 0 0 : .. . Write Thread 0 0 0 at 0x00000048 in ....h : 403 : void kernel test void .. . Write Thread 1 0 0 at 0x00000048 in ....h : 403 : void kernel test void .. . Current Value : 0 Incoming Value : 128 .. . .. . INFO : Identical data being written Potential WAW hazard detected at shared 0x0 in block 47 0 0 : .. . Write Thread 32 0 0 at 0x00000048 in ....h : 403 : void kernel test void .. . Write Thread 0 0 0 at 0x00000048 in ....h : 403 : void kernel test void .. . Current Value : 0 Incoming Value : 0 .. . .. . So what am I missing here Am I doing something wrong with shared-memory I am still a beginner with this .. . .. . UPDATE .. . .. . The problem seems to be coming from cudaDeviceSynchronize when NBLOCKS 32 . Why is this happening Comment : Hi BenC could you post a complete repro case Also what GPU are you running this on and what are the CUDA driver and toolkit versions Comment : Hi Vyas normally the minimal code I provided is enough to reproduce the problem . What information are you missing I have a Geforce GT 650M CUDA 5.0 CC 3.0 and drivers 304.64 . Comment : Hi BenC could you post the entire host code as well as the device code and the exact build line you used . It makes it much easier to reproduce the problem . Comment : What value of NTHREADS Comment : @marina.k : NTHREADS is the number of threads per block here it was 32 . .. . Answer : This was apparently a bug in NVIDIA drivers for Linux . The bug disappeared after the 313.18 release .",
"Question : I recently discovered the racecheck tool of cuda-memcheck available in CUDA 5.0 cuda-memcheck --tool racecheck see the NVIDIA doc http : docs.nvidia.com cuda cuda-memcheck index.html using-racecheck . This tool can detect race conditions with shared-memory in a CUDA kernel . In debug mode this tool does not detect anything which is apparently normal . However in release-mode -O3 I get errors depending on the parameters of the problem . Here is an error example initialization of shared-memory on line 22 assignment on line 119 : .. . .. . ERROR : Potential WAW hazard detected at shared 0x0 in block 35 0 0 : Write Thread 32 0 0 at 0x00000890 in ....h : 119 : void kernel test3 Data Write Thread 0 0 0 at 0x00000048 in ....h : 22 : void kernel test3 Data .. . Current Value : 13 Incoming Value : 0 .. . .. . 1 . The first thing that surprised me is the thread ids . When I first encountered the error each block contained 32 threads ids 0 to 31 . So why is there a problem with the thread id 32 I even added an extra check on threadIdx.x but this changed nothing . 2 . I use shared-memory as a temporary buffer and each thread deals with its own parameters of a multidimensional-array e.g . shared float arr SIZE 1 SIZE 2 NB THREADS PER BLOCK . I do not really understand how there could be any race conditions since each thread deals with its own part of shared-memory . 3 . Reducing the grid size from 64 blocks to 32 blocks seemed to solve the issue with 32 threads per block . I do not understand why . In order to understand what was happening I tested with some simpler kernels . Let me show you an example of a kernel that creates that kind of error . Basically this kernel uses SIZE X SIZE Y NTHREADS sizeof float B of shared-memory and I can use 48KB of shared-memory per SM . test.cu .. . .. . Compilation : .. . .. . nvcc test.cu --ptxas-options -v -o test .. . .. . If we run the kernel : .. . .. . cuda-memcheck --tool racecheck test .. . .. . kernel test 32 32 32 : 32 blocks 32 threads does not lead to any apparent racecheck error . kernel test 32 64 32 : 64 blocks 32 threads leads to WAW hazards threadId.x 32 and errors . ERROR : Potential WAW hazard detected at shared 0x6 in block 57 0 0 : .. . Write Thread 0 0 0 at 0x00000048 in ....h : 403 : void kernel test void .. . Write Thread 1 0 0 at 0x00000048 in ....h : 403 : void kernel test void .. . Current Value : 0 Incoming Value : 128 .. . .. . INFO : Identical data being written Potential WAW hazard detected at shared 0x0 in block 47 0 0 : .. . Write Thread 32 0 0 at 0x00000048 in ....h : 403 : void kernel test void .. . Write Thread 0 0 0 at 0x00000048 in ....h : 403 : void kernel test void .. . Current Value : 0 Incoming Value : 0 .. . .. . So what am I missing here Am I doing something wrong with shared-memory I am still a beginner with this .. . .. . UPDATE .. . .. . The problem seems to be coming from cudaDeviceSynchronize when NBLOCKS 32 . Why is this happening Comment : Hi BenC could you post a complete repro case Also what GPU are you running this on and what are the CUDA driver and toolkit versions Comment : Hi Vyas normally the minimal code I provided is enough to reproduce the problem . What information are you missing I have a Geforce GT 650M CUDA 5.0 CC 3.0 and drivers 304.64 . Comment : Hi BenC could you post the entire host code as well as the device code and the exact build line you used . It makes it much easier to reproduce the problem . Comment : What value of NTHREADS Comment : @marina.k : NTHREADS is the number of threads per block here it was 32 . .. . Answer : For starters the cudaDeviceSynchronize isn t the cause your kernel is the cause but it s an asynchronous call so the error is caught on your call to cudaDeviceSynchronize . As for kernel your shared-memory is of size SIZE X SIZE Y NTHREADS which in the example translates to 512 elements per block . In your nested loops you index into it using i blockDim.x SIZE Y + j blockDim.x + threadIdx.x -- this is where your problem is . To be more specific your i and j values will range from 0 4 your threadIdx.x from 0 32 and your SIZE X Y values are 4 . When blockDim.x is 64 your maximum index used in the loop will be 991 from 3 64 4 + 3 64 + 31 . When your blockDim.x is 32 your maximum index will be 511 . Based on your code you should get errors whenever your NBLOCKS exceeds your NTHREADS .. . .. . NOTE : I originally posted this to https : devtalk.nvidia.com default topic 527292 cuda-programming-and-performance cuda-racecheck-shared-memory-array-and-cudadevicesynchronize- Comment : I updated the code accordingly . This was indeed an error since I pasted the wrong repro code . The problem still happens with the fix though . Comment : @BenC well that s a bit more perplexing . How are you compilling your code The racecheck tool isn t supported in SM 1.x or 3.5 docs.nvidia.com cuda cuda-memcheck index.html supported-devices http : docs.nvidia.com cuda cuda-memcheck index.html supported-devices Comment : I am using a GT 650M hence SM 3.0 . However I tried again with the latest NVIDIA drivers for Linux 313.18 as vyas said on the NVIDIA forums and the errors apparently disappeared .",
"Question : If you ve used Memcheck from Valgrind you ll probably be familiar with this message.. . .. . .. . Conditional jump or move depends on uninitialized value s .. . .. . s I ve read about this and it simply occurs when you use an uninitialized value . s .. . .. . This will work because s is automatically initialized.. . So if this is the case and it works why does Memcheck tell me that it s uninitialized Should the message be ignored Perhaps I misunderstood where the error was directing me . From the Valgrind manual the actual erroneous snippet is.. . However in my code I can t see anything like that . I have noticed however that the function at the top of the stack-trace Memcheck shows me is a virtual function could this be something to do with it Update 1 : .. . .. . I took a look at GlutApplication.cpp : 120 and it looks like the uninitialized variable was being passed in to a function on that line . Simple Comment : Does MyClass have a constructor Comment : Hmm I think I assumed too much here I have put a line through that as I don t think it s whats causing the issue.. . It s the FinishRender function I think .. . .. . Answer : You can add the flag --track-origins yes to valgrind and it will give you information on the sources of uninitialised data . It runs slower but can be helpful . Source : Valgrind User Manual http : valgrind.org docs manual mc-manual.html mc-manual.uninitvals",
"Question : I have a problem with passing a pointer to the struct to the device function . I want to create a struct in local memory i know it s slow it s just an example and pass it to the other function by pointer . The problem is that when i debug it with memcheck on i get error : .. . .. . Program received signal CUDA EXCEPTION 1 Lane Illegal Address . Switching focus to CUDA kernel 0 grid 1 block 0 0 0 thread 0 0 0 device 0 sm 7 warp 0 lane 0 0x0000000000977608 in foo st 0x3fffc38 at test.cu : 15 15 st- m tx 99 .. . .. . If I debug it without memcheck on it works fine and gives expected results . My OS is RedHat 6.3 64-bits with Kernel 2.6.32-220 . I use GTX680 CUDA 5.0 and compile the program with sm 30 . Code I used for testing this is below : .. . .. . Any suggestions Thanks for any help . Comment : Your device code won t survive dead-code removal because nothing contributes to a write to global memory . I would be surprised if you are looking at anything other than a null kernel in this example . Comment : I assume by CUDA 5.0 you mean the CUDA 5.0 release candidate and not the earlier preview .. . Answer : Your example code is completely optimised away by the compiler because none of the code contributes to a global memory write . This is easily proved by compiling the kernel to a cubin file and disassembling the result with cuobjdump : .. . .. . ie . the kernel is completely empty . The debugger can t debug the code you want to investigate because it does not exist in what the compiler assembler emitted . If we take a few liberties with your code : .. . .. . and repeat the same compilation and disassembly steps things look somewhat different : .. . .. . we get actual code in the assembler output . You might have more luck in the debugger with that . Comment : I just tested your code and it gives me the same error from memcheck .",
"Question : If you ve used Memcheck from Valgrind you ll probably be familiar with this message.. . .. . .. . Conditional jump or move depends on uninitialized value s .. . .. . s I ve read about this and it simply occurs when you use an uninitialized value . s .. . .. . This will work because s is automatically initialized.. . So if this is the case and it works why does Memcheck tell me that it s uninitialized Should the message be ignored Perhaps I misunderstood where the error was directing me . From the Valgrind manual the actual erroneous snippet is.. . However in my code I can t see anything like that . I have noticed however that the function at the top of the stack-trace Memcheck shows me is a virtual function could this be something to do with it Update 1 : .. . .. . I took a look at GlutApplication.cpp : 120 and it looks like the uninitialized variable was being passed in to a function on that line . Simple Comment : Does MyClass have a constructor Comment : Hmm I think I assumed too much here I have put a line through that as I don t think it s whats causing the issue.. . It s the FinishRender function I think .. . .. . Answer : Can you post a more complete sample It s hard to see how there would be that particular error with out some form of goto or flow changing statement . I most commonly see this error in code like the following .. . .. . This code is fundamentally incorrect . The reason why is that even though s2 has a constructor it s not executed if someCondition is true . The goto statement will jump over the initialization and at the last line of the program s2 will be uninitialized and essentially point to garbage . EDIT .. . .. . You may also want to check out this page which gives hints on how to decipher this particular valgrind error .. . .. . https : computing.llnl.gov code memcheck deciphering4 .. . .. . Addendum .. . .. . Another common cause for this I ve just found is when you pass over some integer constants to a variadic function which are put on the stack as ints but when the callee gets it as longs you ve got a problem on 64-bit machines . I was almost about to give up and just consider valgrind being stupid then I ve realised that simply casting it to long fixes it . So my upshot is : take this messages seriously . Comment : Agreed it is incorrect to the extent that it is not legal C++ . The compiler should chuck this out before valgrind gets its paws on it . Comment : ...assuming MyClass has a user-defined constructor of course . Comment : It may be legal C++ - if MyClass is a POD type then it s legal C++ even if it s bad form . Comment : @michael - yes you are right it s PODness that is the issue rather than what I said about a constructor",
"Question : I have a problem with passing a pointer to the struct to the device function . I want to create a struct in local memory i know it s slow it s just an example and pass it to the other function by pointer . The problem is that when i debug it with memcheck on i get error : .. . .. . Program received signal CUDA EXCEPTION 1 Lane Illegal Address . Switching focus to CUDA kernel 0 grid 1 block 0 0 0 thread 0 0 0 device 0 sm 7 warp 0 lane 0 0x0000000000977608 in foo st 0x3fffc38 at test.cu : 15 15 st- m tx 99 .. . .. . If I debug it without memcheck on it works fine and gives expected results . My OS is RedHat 6.3 64-bits with Kernel 2.6.32-220 . I use GTX680 CUDA 5.0 and compile the program with sm 30 . Code I used for testing this is below : .. . .. . Any suggestions Thanks for any help . Comment : Your device code won t survive dead-code removal because nothing contributes to a write to global memory . I would be surprised if you are looking at anything other than a null kernel in this example . Comment : I assume by CUDA 5.0 you mean the CUDA 5.0 release candidate and not the earlier preview .. . Answer : I am from the CUDA developer tools team . When compiled for device side debug i.e . -G the original code will not be optimized out . The issue looks like a memcheck bug . Thank you for finding this . We will look into it . Comment : The problem might be platform specific as I am unable to reproduce it locally I compiled the code with -g -G .",
"Question : I am working on a embedded system . We have limited stack and heap in our embedded system typically 64k ram . I am trying to use polar-ssl library calls . Is there any tools which tells how much stack and heap-memory is used by a C function Is there any option is in valgrind which prints the following : .. . .. . 1 . Stack and heap usage of a function . 2 . Call trace of functions which calls internally malloc with no of bytes . Comment : why dont u read Valgrind s document Comment : massif gives heap analysis quite a lot of it but usable . Comment : use man valgrind . .. . Answer : There is a valgrind tool massif that measures how much heap-memory an application uses . Similarly memcheck can give you stack-trace . More explanation here .. . .. . http : wiki.eclipse.org Linux Tools Project Valgrind User Guide Analyzing Memcheck Profile Results",
"Question : I m starting out in C++ and using memcheck to check my programs for memory-leaks . If when.. . there are leaks I get the Unfreed memory allocations remaining output which the uses of new malloc etc which haven t been freed . These are typically accompanied by the source file and line number of the allocation which makes it easy to fix . Sometimes though the source module is listed as unknown line : 0 for calls to new in my case . If memcheck knows a call to new has been made how is it that it can t tell where this has come from I m just trying to get my head around this so I can have some idea where these leaks might be coming from . .. . Answer : I would suppose that it just couldn t resolve stack-trace correctly . It happens with such tools VLD Deleaker etc . when either they try to resolve stack-trace in fast mode e.g . reading EBP ESP on x86 and frame pointers missed or when they try to resolve stack-trace using debugging information and this information is incorrect or just absent . In most cases stack-trace can be resolved correctly . Sometimes - not .",
"Question : If you ve used Memcheck from Valgrind you ll probably be familiar with this message.. . .. . .. . Conditional jump or move depends on uninitialized value s .. . .. . s I ve read about this and it simply occurs when you use an uninitialized value . s .. . .. . This will work because s is automatically initialized.. . So if this is the case and it works why does Memcheck tell me that it s uninitialized Should the message be ignored Perhaps I misunderstood where the error was directing me . From the Valgrind manual the actual erroneous snippet is.. . However in my code I can t see anything like that . I have noticed however that the function at the top of the stack-trace Memcheck shows me is a virtual function could this be something to do with it Update 1 : .. . .. . I took a look at GlutApplication.cpp : 120 and it looks like the uninitialized variable was being passed in to a function on that line . Simple Comment : Does MyClass have a constructor Comment : Hmm I think I assumed too much here I have put a line through that as I don t think it s whats causing the issue.. . It s the FinishRender function I think .. . .. . Answer : The error does not seem to come from your code but a library you are using . Valgrind comes with some default error suppression but that probably does not cover the library you are using . The error-checking tools detect numerous problems in the base libraries such as the GNU C library and the X11 client libraries which come pre-installed on your GNU Linux system . You can t easily fix these but you don t want to see these errors and yes there are many So Valgrind reads a list of errors to suppress at startup . A default suppression file is created by the . configure script when the system is built . You can create your own error suppressions http : valgrind.org docs manual manual-core.html manual-core.suppress that you know are irrelevant to your code . See the similar SO question http : stackoverflow.com questions 766303 why-does-valgrind-not-like-my-usage-of-glutcreatewindow",
"Question : If you ve used Memcheck from Valgrind you ll probably be familiar with this message.. . .. . .. . Conditional jump or move depends on uninitialized value s .. . .. . s I ve read about this and it simply occurs when you use an uninitialized value . s .. . .. . This will work because s is automatically initialized.. . So if this is the case and it works why does Memcheck tell me that it s uninitialized Should the message be ignored Perhaps I misunderstood where the error was directing me . From the Valgrind manual the actual erroneous snippet is.. . However in my code I can t see anything like that . I have noticed however that the function at the top of the stack-trace Memcheck shows me is a virtual function could this be something to do with it Update 1 : .. . .. . I took a look at GlutApplication.cpp : 120 and it looks like the uninitialized variable was being passed in to a function on that line . Simple Comment : Does MyClass have a constructor Comment : Hmm I think I assumed too much here I have put a line through that as I don t think it s whats causing the issue.. . It s the FinishRender function I think .. . .. . Answer : It would be very helpful if you can post more code especially from the part where valgrind thinks the error is . If this happens every time you instantiate the class you probably forgot to initialize one of the members in the constructor . And yes : You should worry about this error those guys can really bite you .",
"Question : I have d7 and dll library . How can i attach the memcheck to that library that I could detect memory-leaks in it Comment : Personally I use FastMM to do this . Comment : How to make fastmm detect leaks in a dll not in the app that uses it Comment : Just include it in your DLL and configure it to report leaks Comment : Well i cannot make it work . I have compiled both the dll and the client app with fastmm4 unit also with the options I think are revelant define ShareMM ShareMMIfLibrary AttemptToUseSharedMM FullDebugMode and it reports only the client leaks .. . Comment : If you use ShareMM it s hard to separate client and DLL leaks . .. . Answer : Expecially for memory-leaks in dll s IIS Web application I am using Eurekalog which also handels Memory leaks and shows where they occur",
"Question : null .. . Answer : I have code which does c-style memory manipulations . Using ctypes necessarily bypasses the python memory system becuase c native libraries will use raw pointers . So calling these libraries from ctypes creates the possibility of memory errors as in c-style memory errors : use of unallocated memory uninitialized memory use after free . I cannot use memcheck since that is linux specific . Additionally it may be difficult since there may be spurious warnings from other parts of the python executable . How can I do memory test for such things",
"Question : I have this strange error found by valgrind on a stupid authentication module which makes some on heap allocations . From what I understand he says I do three invalid free on lines 109-110-111 . The error should be that I try to free up more space than is actually allocated but I can not decide how much space deallocate . Also I do not understand why then it refers to line 108 which is also a free . This is from the documentation Invalid free : .. . .. . Memcheck keeps track of the blocks allocated by your program with malloc new so it can know exactly whether or not the argument to free delete is legitimate or not . Here this test program has freed the same block twice . As with the illegal read-write errors Memcheck attempts to make sense of the address freed . If as here the address is one which has previously been freed you wil be told that -- making duplicate frees of the same block easy to spot . .. . You will also get this message if you try to free a pointer that doesn t point to the start of a heap block . I can not really imagine how be in one of these cases . The header file : Comment : Edited with line numbers .. . Answer : You are overwriting your pointer to your malloc ed memory thereby leaking it with a pointer elsewhere . Then you are trying to free that pointer you received from elsewhere which is as valgrind says invalid . Comment : Well done beat me to it",
"Question : I ve been playing around with the following code for several hours this evening and I am just scratching my head with it . I keep getting Invalid write of size 8 and Invalid read of size 8 when using a function to populate an array from stdin . Any help would be appreciated.. . I know there are a lot of these errors on Stack Overflow but most of them are unique to the situation . The error from Memcheck is below : .. . .. . I ve narrowed down the problem to the following two lines 10 errors on write and 10 on read : .. . .. . Any insight would be appreciated Comment : plz provide either main input parameters or both if possible . .. . Answer : 1 . Check if you have assigned enough memory to the arrays rawScores scores weights studentInfo before you pass to this function . 2 . check the user input should be in the range of arrays . it Would surly solve your problem",
"Question : I am using valgrind on a program which runs an infinite-loop . As memcheck displays the memory-leaks after the end of the program but as my program has infinite-loop it will never end . So is there any way i can forcefully dump the data from valgrind time to time . Thanks Comment : If you found my answer below solved your problem it is polite to accept the answer . Comment : thats not what i want . I want to get output on demand and this VALGRIND DO LEAK CHECK does not do that. . Comment : It does for me . I ll update my answer below with an example . .. . Answer : with valgrind 3.7.0 you can trigger a.o . leak search from the shell using vgdb . See e.g . http : www.valgrind.org docs manual mc-manual.html mc-manual.monitor-commands you can do these monitor commands from gdb or from a shell command-line using vgdb ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
valgrind
|
UNK_RELATION
|
stripe-payments@api@64
|
stripe-payments -- stripe-payments refers to the libraries and @placeholder produced by the stripe company for payment-processing .
|
{
"confidence": [
73.33149719238281,
71.8489990234375,
69.71669006347656,
69.4654541015625,
69.13078308105469,
67.3516845703125,
67.224365234375,
67.224365234375,
66.28559875488281,
65.44525146484375,
65.44525146484375,
63.312950134277344,
62.05791091918945,
61.56816864013672,
61.56816864013672,
60.895809173583984,
60.814327239990234,
60.72957229614258,
60.70210266113281,
60.64118957519531,
60.544036865234375,
60.11735534667969,
59.92560577392578,
59.7890625,
59.7890625,
59.7890625,
59.22484588623047,
58.980079650878906,
58.980079650878906,
58.82357406616211,
58.82357406616211,
58.67698287963867,
58.358333587646484,
58.358333587646484,
58.358333587646484,
58.358333587646484,
58.358333587646484,
58.358333587646484,
58.358333587646484,
58.358333587646484,
57.65675735473633,
57.65675735473633,
57.65675735473633,
57.338645935058594,
57.15284729003906,
57.15284729003906,
57.04446792602539,
57.04446792602539,
57.04446792602539,
56.81945037841797,
56.54385757446289,
56.54385757446289,
56.543067932128906,
56.543067932128906,
56.543067932128906,
56.295021057128906,
56.13325881958008,
55.373741149902344,
55.373741149902344,
55.373741149902344,
55.373741149902344,
54.98691177368164,
54.98691177368164,
54.98691177368164,
54.98691177368164,
54.98691177368164,
54.98691177368164,
54.98691177368164,
54.98691177368164,
54.98691177368164,
54.93680191040039,
54.91216278076172,
54.91216278076172,
54.91216278076172,
54.78417205810547,
54.76475143432617,
54.76396179199219,
54.76396179199219,
54.76396179199219,
54.76396179199219,
54.75981903076172,
54.6871452331543,
54.6871452331543,
54.6871452331543,
54.13641357421875,
54.027645111083984,
53.6972541809082,
53.6972541809082,
53.6972541809082,
53.53679656982422,
53.31937789916992,
53.31937789916992,
53.31937789916992,
53.24143600463867,
53.24143600463867,
53.24143600463867,
53.24143600463867,
53.24143600463867,
53.24143600463867,
53.24143600463867
],
"content": [
"the tutorial from here seems helpful though 7shifts.com integrating-stripe-for-monthly-payments https : 7shifts.com integrating-stripe-for-monthly-payments",
"you cannot make payments between Stripe accounts .",
"I m testing failing recurrent payments with Stripe Api .",
"How much time does it take for pending Stripe payments to be converted into the Stripe balance",
"My web app uses Stripe for payment-processing .",
"I ve recently switched payment-processing to Stripe .",
"As I have saved stripe customer id s in my db for later payments .",
"Background .. . .. . I m trying to integrate stripe-payments into my site .",
"The backend code can be in the language of your choice -- Stripe has official libraries for Ruby https : github.com stripe stripe-ruby stripe-ruby-bindings- Python https : github.com stripe stripe-python stripe-python-bindings- PHP https : github.com stripe stripe-php stripe-php-bindings Java https : github.com stripe stripe-java stripe-java-bindings- Node.js https : github.com stripe stripe-node stripe-nodejs-bindings- and Go https : github.com stripe stripe-go go-stripe-- but you can use any language as long as it can communicate with Stripe s API i.e .",
"Has anyone used the ActiveMerchant Stripe gateway to process recurring subscription payments",
"Stripe implementation at ActiveMerchant doesn t support recurring subscription payments .",
"I am attempting to use Cartalyst a comprehensive PHP Library for Stripe payments .",
"We can create payments and charge an application fee with Stripe connect in NodeJS as follows https : stripe.com docs connect payments-fees : .. . .. . The source can be obtained using the Stripe native checkout handler https : stripe.com checkout .",
"We use stripe for our payment-gateway .",
"I am integrating stripe payment-gateway .",
"I am processing payments using Stripe Connect and the client ID that is meant to receive payments from my application is returning the error No such merchant : ca 8xxx .",
"Stripe for 2.65-- http : www.nopcommerce.com p 638 stripe-payment-plugin.aspx .. . .. . So I went and downloaded the Stripe plugin for Nopcommerce v2.65 .",
"Wouldn t the class actually be Stripe Stripe",
"Version 1.18.0 of the Stripe PHP bindings https : github.com stripe stripe-php stripe-php-bindings will be able to use some Connect features but not all .",
"Is it possible in stripe payment .. . .. . First we will validate credit-card using stripe then we generate token and create customers .",
"I need to implement Stripe Connect for my company .",
"If you can try importing this certificate bundle from the official Stripe Ruby bindings : raw.githubusercontent.com stripe stripe-ruby master lib data https : raw.githubusercontent.com stripe stripe-ruby master lib data ca-certificates.crt",
"I found a service that allows you to process Stripe payments without setting up the server-side yourself : Noodlio Pay https : market.mashape.com noodlio noodlio-pay-smooth-payments-with-stripe .",
"The support of Stripe recurring payment is not added to Payum .",
"I have used stripe as the payment in my system .",
"For payment through Stripe there are two steps : .. . .. . 1 .",
"Trying to engineer a payment system with stripe that will bill the customer on a weekly basis .",
"From the docs https : stripe.com docs subscriptions failed-payments .. . .. . Stripe makes handling failed payments easy .",
"We ve gotten Stripe working for subscriptions payments in our rails 4 app using the Mastering Modern Payments approach .",
"Dose Stripe connect is functional with Stripe API version 1.18.0",
"I need to create a stripe user using my private stripe key .",
"Ok using gem stripe : git github.com stripe stripe-ruby https : github.com stripe stripe-ruby instead of just gem stripe seems to solve the problem .",
"Stripe is called Stripe Connect and Braintree is called Marketplaces .",
"Launch Stripe Connect page in Stripe Dialog .",
"I m using Stripe Accounts not Stripe Customers .",
".. . php : 5.5.9 .. . stripe stripe-php : 3 .",
"The stripe stripe-php folder exists in the vendor folder",
"Or the stripe stripe-php key exists in the composer.lock file",
"Use namespace.Try : Stripe Stripe : : setApiKey my key",
"Parse s stripe Api is not complete for all stripe capabilities .",
"The payment solutions I am considering are Stripe and Braintree .",
"I have to implement a Stripe payment with Drupal Webforms .",
"I tested out the stripe payment in admin and it works .",
"Problem with Stripe mocking libraries was that their implementation was not correct incomplete .",
"Wrote to Stripe as well .",
"Im new at Stripe and PHP .",
"I m currently using stripe and ask customer to register the card via stripe .",
"components.xamarin.com gettingstarted stripe https : components.xamarin.com gettingstarted stripe - Look at point 2 .",
"I have followed Stripe manual to implement Stripe in iOS project .",
"I am using Laravel Cashier to add stripe-payments subscriptions for the premium version of my web app .",
"since you mention Stripe you want to read support.stripe.com questions apple-and-stripe-tos-and-fees https : support.stripe.com questions apple-and-stripe-tos-and-fees",
"I install angular-stripe using npm-install angular-stripe but for some reason in console it says : Module angular-stripe is not available",
"When the 30 days are up the Stripe will take a payment and issue a customer.subscription.updated webhook .",
"I m new to PCI and would like to use Stripe as my payment-gateway .",
"I am using Stripe in a 2 part payment process .",
"I m using Stripe Checkout to create a payment form on my website that needs to use 3 separate Stripe accounts based on a dropdown selection in a single form .",
"gem stripe .",
"For the calculation of Stripe Fee .",
"Get Stripe token .. . 2 .",
"Note : I work at Stripe .",
"https : components.xamarin.com view stripe",
"Is this possible to configure in a existing Stripe plan",
"Create a customer in Stripe with the card token .",
"How we can calculate the Stripe .",
"There are a few solutions mentioned in stripe guidelines .",
"Stripe triggers the form s submit function .",
"It ll require your stripe publishable key .",
"Is it possible to do this using stripe SDK",
"why doesn t Stripe need to be passed",
"Im running Stripe in test mode .",
"Simply add stripe stripe-php to in composer.json file : https : stripe.com docs libraries php-library",
"The stripe-connect platform lets me create a Stripe Account for users .",
"@Tacsiazuma Yes The stripe stripe-php folder exists in the vendor folder .",
"I have autoloaded the Stripe Cartalyst library and the Stripe library .",
"When I try to execute my first project in localhost I take this message : .. . .. . Fatal error : Class Stripe Stripe not found in C : xampp htdocs laravel stripe public elda.php on line 21 .. . .. . To include the stripe libraries I inserted inside the composer.json file the code from the API library for PHP .",
"I d recommend using github.com matthewarkin stripe-parse https : github.com matthewarkin stripe-parse which is based on the latest version of the Stripe Node.js module",
"I want to charge user using Android Pay and stripe as a payment processor .",
"I would like to integrate stripe payment system to my octopress blog .",
"But come to dealing with payment I want to use stamplay to connect with Stripe .",
"Only a customer with a credit-card would make a payment to a Stripe account",
"In this example our stripe customer id is cus 00000000000000 .. . 3 .",
"A walk though of how to get django-stripe-payments workings because the requirements page is not enough so far .",
"I ve created a bare essentials version needed for the stock version django-stripe-payments to work and the problem still persists .",
"I created a virtualenv and pip installed django then django-stripe-payments and django-forms-bootstrap .",
"Problem 1 .. . .. . .. . - Conclusion : don t install payum stripe 0.14.0 .. . - Conclusion : don t install payum stripe 0.13.0 .. . - Conclusion : don t install payum stripe 0.12.0 .. . - Conclusion : don t install payum stripe 0.11.0 .. . - Installation request for payum stripe @stable - satisfiable by payum stripe 0.10.0 0.11.0 0.12.0 0.13.0 0.14.0 .",
"Stripe for 3.40 -- http : www.nopcommerce.com p 1512 stripe-payment-plugin.aspx .. . .. . So I noticed that when I download the Stripe plugin off the Nopcommerce.com site that the Stripe plugin for Nopcommerce v3.4 does not contain a project file .csproj to add the project to Visual studio .",
"Possible duplicate of Cant receive an access token in Stripe http : stackoverflow.com questions 38444332 cant-receive-an-access-token-in-stripe",
"When the user chooses to pay using stripe I redirect them to the prepareAction in the PaymentController as described by stripe documentation .",
"It means that Stripe.customers is a submodule of the Stripe API exposing customers-related funcs and as such these funcs this context is Stripe.customers not Stripe .",
"I changed line var Stripe require stripe to var Stripe require cloud stripe.js kStripePrivateKey and commented both lines var Stripe require stripe and Stripe.initialize kStripePrivateKey And now I get error Result : TypeError : Cannot call method create of undefined at main.js : 218 : 37",
"Stripe Connect https : stripe.com docs connect is Stripe s API that lets you process payments on behalf of third-parties and optionally take a cut out of the transaction .",
"You ll need to make sure that you don t keep creating and overwriting your customer ID for a user because this is your tie-in to the Stripe payments system for that user .",
"Stripe has an ACH guide https : stripe.com docs ach explaining what you need to do in order to process ACH payments .",
"I m integrating Stripe in PHP .",
"Stripe doesn t call anything that",
"I m new at Stripe integration .",
"Disclaimer : I work for Stripe .",
"Is there any method for it in Omnipay-Stripe",
"Errors from Stripe .",
"You mean the Stripe script"
]
}
|
{
"confidence": [
87.0041732788086,
84.9894027709961,
84.51258850097656,
83.98350524902344,
83.49162292480469,
83.25251007080078,
83.24243927001953,
81.05459594726562,
80.18646240234375,
78.921630859375,
78.8606185913086,
77.48008728027344,
77.33723449707031,
76.9989013671875,
76.85391998291016,
75.89077758789062,
75.85319519042969,
74.92850494384766,
74.45856475830078,
74.43498229980469
],
"content": [
"Question : I m building an app in ruby-on-rails within which the merchant provides his bank account info and his payments are supposed to be processes monthly . I d like to achieve this using stripe . How do i add create a bank account associated with a stripe customer .. . Answer : First we need to find the stripe customer and after that we can add a new bank account in that customer account . You can refer this code for more details .. . .. . account holder type can be company or individual .. . .. . In order to start the payment process you need to verify https : stripe.com docs ach verifying new bank account",
"Question : I am trying to hook up Dwolla or Stripe API to accept ACH deposits on my website and am having trouble going through the instructions on API connections . What programming language do you need to be able to do this .. . Answer : Stripe has an ACH guide https : stripe.com docs ach explaining what you need to do in order to process ACH payments . You will need to write some frontend JavaScript code as well as some backend code . The backend code can be in the language of your choice -- Stripe has official libraries for Ruby https : github.com stripe stripe-ruby stripe-ruby-bindings- Python https : github.com stripe stripe-python stripe-python-bindings- PHP https : github.com stripe stripe-php stripe-php-bindings Java https : github.com stripe stripe-java stripe-java-bindings- Node.js https : github.com stripe stripe-node stripe-nodejs-bindings- and Go https : github.com stripe stripe-go go-stripe-- but you can use any language as long as it can communicate with Stripe s API i.e . as long as you can send HTTPS requests and decode JSON .",
"Question : Has anyone used the ActiveMerchant Stripe gateway to process recurring subscription payments If so I d love to see a code example . There are a few references to recurring in the gateway s source - https : github.com Shopify active merchant blob master lib active merchant billing gateways stripe.rb but I haven t been able to successfully supply a plan as described at https : stripe.com docs subscriptions . Stripe has a Ruby gem but I d prefer to use ActiveMerchant b c my Rails app is already using several other payment gateways . Any help is much appreciated .. . Answer : Stripe implementation at ActiveMerchant doesn t support recurring subscription payments . In fact most of the ActiveMerchant gateways integrations are with Shopify in mind . And 99.99 of Shopify transactions are one time transactions . Take a look at the PayPal recurring solution at ActiveMerchant and you ll realize AM hasn t been focused at all on subscriptions . Disclaimer : I work at MONEI . http : monei.net",
"Question : So I m having a similar problem to Django AJAX JSON response appears as raw text in browser http : stackoverflow.com questions 23494604 django-ajax-json-response-appears-as-raw-text-in-browser or Django-stripe-paymants and eldarion-ajax subscribe JSON response http : stackoverflow.com questions 21774731 django-stripe-paymants-and-eldarion-ajax-subscribe-json-response rq 1 but I can t find this second reference to jQuery and I ve also tried multiple versions of jQuery . Their payment is processed and the web hooks look good just like them . I haven t gotten any help so far but I could probably solve my problem with any of the following : .. . .. . 1 . other reference repositories of people using django-stripe-payments .. . 2 . A walk though of how to get django-stripe-payments workings because the requirements page is not enough so far . I ve created a bare essentials version needed for the stock version django-stripe-payments to work and the problem still persists . I created a virtualenv and pip installed django then django-stripe-payments and django-forms-bootstrap . Those installs included both django-jsonfield and stripe . So pip shows I have the following .. . .. . My site base.html is .. . .. . when I try and change a payment plan I get the proper GET but on the post I believe it isn t linking with jQuery Comment : I m pretty sure now that it has something to do with the django-admin docs.djangoproject.com en dev ref contrib admin https : docs.djangoproject.com en dev ref contrib admin it says To avoid conflicts with user-supplied scripts or libraries Django s jQuery version 1.9.1 is namespaced as django.jQuery . If you want to use jQuery in your own admin JavaScript without including a second copy you can use the django.jQuery object on changelist and add edit views . Which would explain why someone had a conflict when using jqueery 1.11.1 instead of 1.9.1 . But I can t find out how to make the fix knowing this information . .. . Answer : This is because it s designed to work with http : github.com eldarion eldarion-ajax or your own AJAX handling .",
"Question : Regarding Stripe fee calculation is there is any way to get the Stripe fee according to the amount provided . We have to implement this in such away that we have to pay x amount to one dealer and y amount to another . 1st case : .. . .. . Let say we have 100 to pay to Stripe . .. . According to our needs we want to calculate the Stripe fee first and then add that fee to the 100 amount . .. . e.g : .. . .. . Amount to be Paid is 100 + 3 Stripe fee 103 Total you need to cut from the customers account . 2nd Case : .. . .. . We need to pay 95 to the dealer and the 5 left we want to keep in our account excluding the Stripe fee . If this is possible how do we implement this Comment : What has this to do with SilverStripe PHP Framework Comment : @wmk probably he is using the module.. . sher what you want is split payments and it s not all too common I can advise a payment-gateway if that is the answer you d like but I don t think stripe do .. . Answer : Currently Stripe s API does not have a way of computing the fees before creating the charge . You d need to do this yourself . If you want to pass the fees to the paying customer the following support article will be very helpful : https : support.stripe.com questions can-i-charge-my-stripe-fees-to-my-customers .. . .. . To process payments on behalf of another account and optionally take a cut out of the transactions you need to use Stripe Connect https : stripe.com connect . You can read more in the documentation : https : stripe.com docs connect . Comment : I am using this formula to calcualte Stripe Fee . Say amaount 100 100 0.029 + 0.30 103.20 But On stripe it is displaying 103.29 instead of 103.20 . Dont know what s going on",
"Question : null .. . Answer : I have to pay 100 from my strip account to other stripe account with 1 application fees of amount 100 using php platform or any other form if available there but my server-side is php .. . .. . So how can i do this please describe me i am getting stuck to choose which method i use for this scenario . Comment : you cannot make payments between Stripe accounts . Only a customer with a credit-card would make a payment to a Stripe account",
"Question : Regarding Stripe fee calculation is there is any way to get the Stripe fee according to the amount provided . We have to implement this in such away that we have to pay x amount to one dealer and y amount to another . 1st case : .. . .. . Let say we have 100 to pay to Stripe . .. . According to our needs we want to calculate the Stripe fee first and then add that fee to the 100 amount . .. . e.g : .. . .. . Amount to be Paid is 100 + 3 Stripe fee 103 Total you need to cut from the customers account . 2nd Case : .. . .. . We need to pay 95 to the dealer and the 5 left we want to keep in our account excluding the Stripe fee . If this is possible how do we implement this Comment : What has this to do with SilverStripe PHP Framework Comment : @wmk probably he is using the module.. . sher what you want is split payments and it s not all too common I can advise a payment-gateway if that is the answer you d like but I don t think stripe do .. . Answer : With managed account Finally I am able to implement the above scenario . For the calculation of Stripe Fee . stripe fixed fee 0.30 cent stripe charge 0.029 cent .. . .. . You can refer this link http : www.blackdog.ie stripe https : support.stripe.com questions can-i-charge-my-stripe-fees-to-my-customers .. . .. . Thanks",
"Question : Are there any Payment APIs preferably in Javascript Angular that can be directly used on the client-side and thus require no server-side implementation The best example is Stripe . It both requires setting up the client-side Checkout and retrieval of StripeToken and then actually processing the payment on the server Charge . Comment : Probably not since you would have to expose your account keys in the browser . Using Stripe example the public-key can t cause any account damage it simply allows creating a token that is then used in conjunction with secret server-side key to actually process a charge Comment : You can checkout commencepayments.com my side project it allows you to create customers charges subscriptions client-side on top of Stripe -- right now it just uses a custom button but no reason why it couldn t support direct api calls . You wouldn t necessarily want to allow refunds to be issued client-side since that could be maliciously done . .. . Answer : I found a service that allows you to process Stripe payments without setting up the server-side yourself : Noodlio Pay https : market.mashape.com noodlio noodlio-pay-smooth-payments-with-stripe . You simply send HTTP requests to the API hosted on Mashape . Here is an example of a request in cURL : Comment : This may theoretically answer the question but it would be best to include the essential parts of the answer here for future users and provide the link for reference . Link-dominated answers meta.stackexchange.com questions 8231 can become invalid through link rot en.wikipedia.org wiki Link rot . Comment : I have added an example with cURL . I really dont know how to extend the answer further . Perhaps my question was invalid I asked whether there are such services and after now a few months found one .",
"Question : I have the following python code to create a charge in stripe . This succeeds I think because it shows up in my dashboard with a charge id . But then immediately after in the code the following fails : .. . .. . With error : No such charge : somelongstringhere .. . .. . However somelongstringhere is indeed the ID under charge details on my stripe dashboard . So how come Stripe can t retrieve this charge Is this not the correct id .. . Answer : The code you re using here is creating a charge directly on a connected Stripe account . This is covered in Stripe s documentation here https : stripe.com docs connect payments-fees charging-directly . Since the charge is on a connected account it doesn t exist on your own Stripe account and it s expected you can t retrieve it directly . To do this you need to pass the Stripe-Account header again as documented here https : stripe.com docs connect authentication authentication-via-the-stripe-account-header . Your code should instead be",
"Question : I am having a problem adding invoice item on subscription and currently banging my head on the wall . I ve created an Invoice Item on stripe and I d like the Invoice Item to be included on the recurring payment .. . .. . Here s my code it adds an invoice item on first invoice but not on the next invoice . On my current set-up . I have additional custom charges based on customer selection upon subscription thats way I need to add additional charges on recurring payment . Its something like this .. . .. . Plan .. . .. . Additional Charges - Invoice Items .. . .. . I hope someone could help . Thanks so much .. . .. . Cheers Kenn Comment : I m also working on something similar - I have an open support ticket with them to clarify this process . Will answer this question whenever i get a response .. . Answer : I have a support question open with Stripe so will update as-if necessary . However I have just re-read the documentation on metered billing https : support.stripe.com questions metered-subscription-billing .. . .. . The account balance and invoice items are simply one-time adjustments to your customer s account so they won t be automatically applied each month . If your service uses metered billing or needs to add custom amounts for taxes or other dynamic costs then you will need to create invoice items every month . It continues ... . .. . .. . To get started just use webhooks to listen for the invoice.created event . Whenever an invoice is open for modification your webhook endpoint can create an invoice item that references the existing invoice s ID . We ll automatically pull this amount into the invoice total before charging your customer . So it seems we ll need to create a web hook handler in order to re-add these invoice items each month . According to the documentation on invoices https : stripe.com docs api invoices .. . .. . Once an invoice is created payment is automatically attempted . Note that the payment while automatic does not happen exactly at the time of invoice creation . If you have configured webhooks the invoice will wait until one hour after the last webhook is successfully sent or the last webhook times out after failing . That allows us to create a web hook in order to modify the invoice prior to payment being attempted . My suggested InvoiceCreatedWebhook process .. . .. . 1 . Listen for the body of the invoice.created event - the full body looks like this http : pastebin.com TyCPEDZg .. . 2 . Retrieve your customer from your database . In this example our stripe customer id is cus 00000000000000 .. . 3 . Assuming you have somehow recorded the additional items against your customer create invoice items and apply them to the invoice by setting the invoice property - in this example id in 00000000000000 Comment : I have no success with this till now and still looking for a piece of code . the tutorial from here seems helpful though 7shifts.com integrating-stripe-for-monthly-payments https : 7shifts.com integrating-stripe-for-monthly-payments Comment : I think adding the invoice items from your webhook event-handling code is the best general solution . If you only have a few plans variants you could also create all possible permutations as separate plans in Stripe . E.g . you d have the 1 Cookie w Ice Cream plan the 2 Cookies w Ice Cream plan etc . That could get ugly quick if you increase your number of plans and options though .",
"Question : Is it possible in stripe payment .. . .. . First we will validate credit-card using stripe then we generate token and create customers . we will save token instead of credit-card information in database and later we will make payments from customers on basis of token or customer instead of credit-card information . In javscript file how do we handle stripeResponseHandler and function stripeResponseHandler status response because we have already generate token using .. . .. . in payment step how we call stripeResponseHandler .. . .. . Please understand the requirement .. . .. . 1- Save the Token by verifying credit-card information in this case no payment is involve . amount price will zero 0 . 2- Save this Token in your database but this token is use once not many time.If use this Token later it will not work . 3- Create customer will create a customer at stripe.com and we can also save in our database but the reason is that we will not recharge from our site we have to login at stripe.com and recharge from that site . when we recharge from that site we are unable to save records of that in our database.Also at time of creating customer we have to create a recharge for latter . we also need credit-card again if we use this client . so this is the main issue . 4- we can make own function stripeResponseHandler because through stripeResponseHandler verification of cards can be done at stripe.js at stripe server . Comment : Each time we need a new token for payment through credit-card information This example stripe.com docs tutorials https : stripe.com docs tutorials charges saving-credit-card-details-for-later will just create a customer in stripe.com and we use this user id.. . This need amount but in our case first we verify credit-card and save token and later after 1 day 1 month or any time make payment from that user account . .. . Answer : In Stripe in order to save a card or bank account to charge later you have to create a customer then add payment sources card or bank account to that customer . Once you create a customer with a payment source or sources you have 3 options to create a charge . 1 . Charge the customer using default source : Stripe : : Charge.create amount : 1000 currency : usd customer : cus xxxx .. . .. . 2 . Charge the customer using a credit-card : Stripe : : Charge.create amount : 5000 currency : usd customer : cus xxxx card : card xxxx .. . .. . 3 . Charge the customer using a bank account : Stripe : : Charge.create amount : 8000 currency : usd customer : cus xxxx bank account : ba xxxx",
"Question : So I went through the trouble of implementing a Stripe payment system in my app and submitted the app for review a few days ago . My app got rejected and Apple notified me that you have to use the In-App Purchase API for any payment system . This just doesn t seem right - why does Stripe even have an iOS SDK in that case Comment : I m voting to close this question because app-store submission policy is off-topic for Stack Overflow https : meta.stackoverflow.com q 272165 65839 and better addressed by Apple support . .. . Answer : You can use Stripe in an iOS app . Apple accepts it when the customer can buy something which is not digital . for example your Instagram pictures printed on a mug a computer and so on . But if you use Stripe for something like a subscription like a gold access to a revue or to buy credits for a game Apple will refuse the app and force you to use In-app purchase . take a look here : .. . .. . There are a couple different ways to integrate payments into your iOS app : Apple Pay and In-App Purchases . It s important to understand when each option should be used . .. . You can use Apple Pay to sell physical goods such as groceries clothing and appliances . Also use Apple Pay for services such as club memberships hotel reservations and tickets for events . These transactions will be processed through Stripe and you ll only need to pay Stripe s processing fee . You can read more about Apple Pay here . .. . You are required to use Apple s In-App Purchase API to sell virtual goods such as premium content for your app and subscriptions for digital content . Specifically Apple s developer terms require that the In-App Purchase API must be used for digital content functionality or services such as premium features or credits . If you use the In-App Purchase API the transactions will be processed by Apple which will charge a fee of 30 of the total transaction . https : support.stripe.com questions apple-and-stripe-tos-and-fees hope it helps",
"Question : As I have saved stripe customer id s in my db for later payments . here customer will have multiple cards where I would like to check validate customer card with existed cards from that particular customer . Suppose same card details storing multiple times as multiple cards . In this process I want check with token whether this card already existed or not . will use it If already there If not will create new card . .. . Answer : For people reading this in 2016 : Sahil Dhankhar answer is still correct although Stripe have apparently changed their API syntax https : stripe.com blog unifying-payment-types-in-the-api : .. . .. . is now : .. . .. . So correct syntax would now be : .. . .. . Hope this helps someone",
"Question : I need to find the best solution for automated payments into bank accounts . My scenario is that we have funds in a bank account which can be registered a provider account like paypal or stripe if needed . When a user submits a request for money i need to automatically send that amount to their bank account from our bank account or payment provider account . Is there a way to automate it needs to be able to support most european bank accounts . .. . Answer : Through PayPal there is not a way to do that with the request money feature . The request money feature is there for the specific purpose of requesting money from a particular user . If you were able to do that then there wouldn t be stopping someone from constantly requesting money from you and you just pay them whatever that amount is . I would assume this is also not possible with Stripe because having this capability is a HUGE risk on the merchant and payment processor end . A better way to do it is by using Mass Payments https : developer.paypal.com docs classic mass-pay integration-guide MassPayOverview mark mass 20payment through PayPal to schedule payments to a mass number of users . This does require approval from PayPal so you will need to contact them to get it enabled . Comment : i believe that the Paypal Mass Payment requires the receiving users to also have paypal which in my case they might not . Comment : Stripe offer a beta for UK users called Managed Accounts which kind of covers what i m trying to do only problem is its a beta at this moment . Comment : Yes that s correct the Mass Pay does require receivers to have a paypal account . All the transactions in paypal have to hit their account first before it can be withdrawn . Comment : Did i understand that correctly You want it to where if a buyer just requests money from you you automatically pay them I cant imagine that you would want something like that . I mean technically you could have a script to scan your email and then make an API call to pay that buyer . Comment : I don t want to be bound to the user having a paypal account because we receive payments from multiple sources bank transfer stripe and paypal . Ideally a system which offers an automated way to make bank transfers is what i am looking for",
"Question : Background .. . .. . I m trying to integrate stripe-payments into my site . I need to create a stripe user using my private stripe key . I m storing this key on my server and calling a server method to create the user . Maybe there s another way of accomplishing this Here s the stripe api copied below for convenience : https : stripe.com docs api node create customer .. . .. . My attempts and results .. . .. . I ve been using the same client code with different server code . All attempts immediately give undefined on the client s console.log .. . but give the proper response on the server console.log .. . : .. . .. . I ve also tried both without Meteor.wrapAsync . EDIT - I m also using this package : https : atmospherejs.com mrgalaxy stripe Comment : oh hey googled this question and it s nearly identical to my code .. . Answer : Since you are going to need almost every function to be wraped in Async what you should do is use this package https : atmospherejs.com copleykj stripe-sync it prewraps all stripe functions with WrapAsync making your life easier and code cleaner . Comment : life easier and code cleaner . . you shouldn t assume he has a dirty life : p Comment : lol thanks I ve just updated my post",
"Question : I ve a list of customers on Stripe Account . Now the customers have done the monthly payments also I want the list of the payments of particular customer . I ve used this : .. . .. . But customerInfo doesn t displays the list of his payments that he has done so far . Comment : you probably need to use StripeChargeService class Comment : StripeInvoiceService worked for me . But will try your idea also . thanks for the suggestion Comment : @HemantBhagat Post your own answer as Answer if you have resolved it . That might help others in need . Comment : @Rohit Arora please check . I ve answered the question now .. . Answer : As the payments are made invoices are generated . So i simply get the info using Invoice Service of Stripe like mentioned below : .. . .. . now invoicesOfCustomer will have a list of all the payments that he has done . If you have invoiceId then you can use this for single invoice info . Thanks :",
"Question : How much time does it take for pending Stripe payments to be converted into the Stripe balance I am trying to transfer some money from Stripe to Bank account and I am getting Insufficient funds in Stripe account . Can I solve this somehow or I have to wait until balance appear on my account .. . .. . enter image description here http : i.stack.imgur.com tz8dj.png Comment : The delay before funds become available for transfers varies by country -- it s 7 days in most countries and 2 days in the US and Australia . You should write to Stripe s support directly if you have more questions about this : support.stripe.com email https : support.stripe.com email . Comment : Uf that is some time . Wrote to Stripe as well . Thanks so much for the hint .. . Answer : Balance was not pending anymore after 6 days . Stripe support says that it takes about a week just the first time . After that it takes about 2 days .",
"Question : I am processing payments using Stripe Connect and the client ID that is meant to receive payments from my application is returning the error No such merchant : ca 8xxx . My code is : .. . Answer : When charging through the platform https : stripe.com docs connect payments-fees charging-through-the-platform the destination parameter should be set to the ID of the connected account on behalf of which you re processing the charge . Account IDs look like acct .. . . Right now it looks like you re passing your platform s client id . The client id is used when connecting users https : stripe.com docs connect standalone-accounts connecting-users with the OAuth flow .",
"Question : My web app uses Stripe for payment-processing . I have a webhook in Stripe calling mysite.com callback . When I try to test the webhook it times out . Orders process successfully through my charge route and show up in Stripe . What is wrong with my callback route It doesn t update the data in the DB . Here is the callback route : .. . Answer : That looks like Laravel and it looks like that function doesn t return anything so Stripe is not getting a response . I suspect you want to do something like this in there : .. . .. . Note : Partly stolen from this answer.. . http : stackoverflow.com questions 30764150",
"Question : We are Making a App in which We Take Payments from Customers and Give Them Points same like Customer can give Points to Us and Take Payment . This is a Game is there any payment Gate Way That Directly Paid Customer in his her Credit Card we want Payments Direct Credit Cards To Credit Cards we will take customer credit cards when he will signup or later when he will give us points for Payment Any Suggestion will be Appreciated .. . Answer : For PayPal look at the following . DoReferenceTransaction https : developer.paypal.com webapps developer docs classic api merchant DoReferenceTransaction API Operation NVP - This will allow you to hit somebody s credit-card to process an amount without authentication so long as you ve done a prior Authorization or Sale using the same credit-card . So you could have people run an Authorization on their card just to ensure it s good and get a transaction ID that you can use in future DRT requests . DoNonReferencedCredit https : developer.paypal.com webapps developer docs classic api merchant DoNonReferencedCredit API Operation NVP - This will allow you to load funds onto a credit-card without referencing any previous transaction so it s different than a refund . Keep in mind that when you send somebody money this way you won t get refunded fees like you would if you used the actual RefundTransaction https : developer.paypal.com webapps developer docs classic api merchant RefundTransaction API Operation NVP API so you may want to consider that . You ll want to go through the detailed documentation for Reference Transactions https : developer.paypal.com docs classic express-checkout integration-guide ECReferenceTxns of course to get a good understanding of it . You ll also need a Payments Pro https : www.paypal.com us webapps mpp referral paypal-payments-pro partner id UHALZ2245EDV6 account to be able to process credit cards directly and utilize these features . If you happen to be working with PHP I d recommend using my class-library for PayPal http : www.angelleye.com product php-class-library-paypal . It ll make the API calls very simple for you . Comment : Nice Thanks .what about Stripe Comment : Stripe makes you wait 7 - 10 days or more for your money . That could cause issues with what you re explaining you re trying to do I would think . Comment : i read from stripe doc they transfer fund only in USA any other cool payment gate way that allow me to transfer funds through CC to CC Comment : are you sure we can transfer funds to customer DoNonReferencedCredit have nothing param to transfer Comment : DNRC allows you to push funds to a credit-card from your PayPal account ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
api
|
UNK_RELATION
|
internet-explorer-6@internet-explorer@69
|
internet-explorer-6 -- internet-explorer-6 ie6 is an old version of @placeholder .
|
{
"confidence": [
63.591285705566406,
59.736106872558594,
59.05801773071289,
58.465362548828125,
57.85776901245117,
57.85776901245117,
57.650108337402344,
56.8333625793457,
54.51404571533203,
54.51404571533203,
54.27945327758789,
54.27945327758789,
53.592552185058594,
53.592552185058594,
53.0183219909668,
52.716129302978516,
52.4913444519043,
52.193458557128906,
52.193458557128906,
51.850669860839844,
51.493141174316406,
51.493141174316406,
49.057395935058594,
48.35288619995117,
48.35288619995117,
47.69797134399414,
47.47996520996094,
47.47996520996094,
47.47996520996094,
47.47996520996094,
46.430843353271484,
46.313087463378906,
45.78855895996094,
45.60586166381836,
45.4367561340332,
45.4367561340332,
45.42909240722656,
45.03591537475586,
44.91358947753906,
43.17584228515625,
43.174957275390625,
42.62549591064453,
42.62549591064453,
42.62549591064453,
42.565391540527344,
42.358036041259766,
42.023311614990234,
42.023311614990234,
41.98085021972656,
41.98085021972656,
41.91178894042969,
41.896217346191406,
41.822750091552734,
41.42357635498047,
40.8564338684082,
40.059120178222656,
39.84611511230469,
39.84611511230469,
38.84954071044922,
38.353187561035156,
37.988037109375,
37.71830368041992,
37.658329010009766,
37.658329010009766,
37.658329010009766,
37.658329010009766,
37.658329010009766,
37.658329010009766,
37.568199157714844,
37.16884231567383,
37.16884231567383,
37.16884231567383,
37.16884231567383,
37.16884231567383,
36.14501190185547,
36.035789489746094,
35.96692657470703,
35.96692657470703,
35.39690399169922,
35.22657012939453,
35.091957092285156,
35.091957092285156,
35.091957092285156,
34.77106475830078,
34.75642395019531,
34.6735954284668,
34.618316650390625,
34.618316650390625,
34.618316650390625,
34.618316650390625,
33.867164611816406,
33.467708587646484,
33.40117645263672,
33.38665771484375,
33.2091178894043,
32.89653396606445,
32.89653396606445,
32.751976013183594,
32.69089889526367
],
"content": [
"I mean internet-explorer-6",
"You can try this on Internet Explorer 6 or 5 .",
"One with Internet Explorer 6 and one with Internet Explorer 7 .",
"Possible Duplicate : .. . Running Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine http : stackoverflow.com questions 574463 .. . .. . I am looking for a tool that can allow me to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 if possible on my machine .",
"The question is : how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine .",
"How to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine",
"I m doing this : .. . .. . This work fine in internet-explorer-11 but I need to do this for internet-explorer-6 .",
"Possible Duplicate : .. . Running Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine http : stackoverflow.com questions 574463 running-internet-explorer-6-internet-explorer-7-and-internet-explorer-8-on-the .. . .. . I need recommendations on a good Internet Explorer standalone for Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 .",
"Internet Explorer 6 has LOTS and LOTS of CSS bugs",
"My site uses an HTML5shiv for the benefit of Internet Explorer 6 users .",
"It supports Internet Explorer 5.5 6 7 and 8RC1 .",
"Solution for Internet Explorer 6 7 8 .",
"I also tried the Internet Explorer Collection from Edskes but Internet Explorer 6 and Internet Explorer 7 refuse to let me type in a text box .",
"When you upgrade from Internet Explorer 6 to Internet Explorer 7 or Internet Explorer 8 you re actually replacing some system DLLs .",
"Possible Duplicate : .. . Running Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine http : stackoverflow.com questions 574463 .. . .. . Is there a way to have Internet Explorer 8 and Internet Explorer 6 side-by-side without virtualizing",
"Further reading : http : www.virtuosimedia.com dev css ultimate-ie6-cheatsheet-how-to-fix-25-internet-explorer-6-bugs",
"Running Internet Explorer 7 wouldn t matter so much as Internet Explorer 8 can use the Internet Explorer 7 rendering engine but we still need Internet Explorer 6 .",
"This is the reason why you get Internet Explorer 6 when you uninstall Internet Explorer 7 .",
"Like everyone else I need to test my code on Internet Explorer 6 and Internet Explorer 7 .",
"So far with Internet Explorer 6 and Internet Explorer 7 I ve been using Multiple IE http : tredosoft.com Multiple IE page 6 .",
"I work on a website and I got a javascript function that doesn t work in Internet Explorer 6 .",
"I m new to jquery and was wondering : is a simple way to detect whether a browser is Internet Explorer 6 or below",
"It will need to work on Internet Explorer 6 7 8 and Firefox .",
"Expression Web http : en.wikipedia.org wiki Microsoft Expression Web 3 which will include SuperPreview will allow comparison between any combination of Internet Explorer 6 Internet Explorer 7 Internet Explorer 8 and Firefox 3 .",
"For example you can see how your page looks in Internet Explorer 6 Internet Explorer 7 Internet Explorer 8 Firefox and Safari even if you don t have those browsers installed .",
"But people have reported see comments on the page linked in the previous sentence issue with Internet Explorer 6 after installing Internet Explorer 8 .",
"This code only works for Internet Explorer 6 I don t know how to make it work for Firefox .",
"Internet Explorer 6 I had to read that line two times to check whether I was reading that right .",
"The problem that in Internet Explorer 6 which unfortunately I still have to support is not obeying the filename being set in the header .",
"What is the definitive way to mimic the CSS property min-width in Internet Explorer 6",
"I ve written a step-by-step blog post http : blog.donavon.com 2009 08 run-ie6-ie7-and-ie8-side-by-side-on.html showing how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 as virtual applications on Windows 7 Ultimate .",
"I installed it started Internet Explorer and it crashed .",
"The Internet Explorer 6 standalone version work on Windows XP it does t work on Windows Vista .",
"By upgrading your Internet Explorer .",
"For detecting a specific version of Internet Explorer only Aamir s approach is almost perfect in my opinion .",
"i always used this solution .. . .. . http : sinfinity.pl blog 2012 02 12 detect-internet-explorer-and-browser-version-in-jquery",
"I know .. . .. . only work in Internet Explorer 8+ http : www.w3schools.com jsref met document queryselector.asp .. . .. . What could I do to make it work in IE6",
"On a Windows box the IF Internet Explorer statements will resolve to Internet Explorer 7 even in Internet Explorer 5 which means even more weird bugs .",
"Can anyone tell me how to make it work in Internet Explorer 6 and 7 .",
"The stand-alone files are still available see Quick browser testing : Internet explorer version 6 7 and 8 http : stackoverflow.com q 4227959 938089 quick-browser-testing-internet-explorer-version-6-7-and-8 .",
"I want to print HTML page with background colors and rounded-corners using internet-explorer-6 .. . .. . Everything works fine before printing .",
"Internet Explorer counts down these images from 900 until they are all loaded .",
"Go to Advanced Default Java for Browsers and check Microsoft Internet Explorer .",
"Every element in Internet Explorer now has a hasLayout property .",
".. . .. . For an example of a specific bug that zoom : 1 and so hasLayout helps to fix : .. . .. . Inline block doesn t work in internet-explorer-7 6 http : stackoverflow.com questions 5838454 inline-block-doesnt-work-in-internet-explorer-7-6 5838575 5838575",
"If you try to do a multi install of Internet Explorer you will break conditional-comments on pages which will make testing difficult anyway For example With Internet Explorer 5 6 and 7 .",
"In the screenshot on his blog you ll see Firefox 3 as the base browser left side and Internet Explorer 6 as the comparison browser .",
"Firefox has an add-in that will render a webpage the same as-if it was in Internet Explorer 5.5 6 7 8 beta 2 .",
"I tried using Tredosoft s Internet Explorer 7 standalone http : tredosoft.com IE7 standalone and MultiIE for Internet Explorer 6 but select elements were being blocked as pop-ups even when the pop-up blocker was turned off in all Internet Explorer browsers 6 7 8 .",
"I used Multiple IEs http : tredosoft.com Multiple IE which works fine with Internet Explorer 7 but since I installed Internet Explorer 8 beta 2 Internet Explorer 6 started behaving oddly that is more than usual .",
"But I write only from the explicit point of view that I only care about 1 Microsoft Internet Explorer and 2 what version it is if detected .",
"Also note - from netmarketshare is.gd fc5MC http : is.gd fc5MC Share of the nearly decade-old Internet Explorer 6 fell below 5 in Europe and is nearing 5 in many developed markets such as U.S . UK and France .",
"The current list of virtual disk images available from the above link are : .. . .. . Internet Explorer 6 on Windows XP SP3 .. . Internet Explorer 7 on Windows XP SP3 .. . Internet Explorer 8 on Windows XP SP3 .. . Internet Explorer 7 on Windows Vista .. . Internet Explorer 8 on Windows Vista .. . .. . List is current as of October 11 2009 .",
"Little confused with your question but Here is the javascript code to detect the version of Internet Explorer .",
"Very good option is update to Internet Explorer 10 .",
"This provides an internal property known as hasLayout in Internet Explorer versions 7 and lower .",
"My firm has warnings that the Intranet site is only compatible with Internet Explorer but work fine well no worse in Firefox",
"IE7.js is a JavaScript library to make Microsoft Internet Explorer behave like a standards-compliant browser .",
"Try the Internet Explorer Developer Toolbar http : www.microsoft.com download en details.aspx id 18359 which you can install for IE6 7 .",
"For the transparent border you could use this trick - martinivanov.net 2008 08 24 http : martinivanov.net 2008 08 24 emulating-border-color-transparent-in-internet-explorer-6",
"del Only virtualization can provide the full DLL stack for definitive testing . del .. . .. . Edit : .. . .. . On March 18 2009 the Microsoft Expression Web team released SuperPreview http : blogs.msdn.com xweb archive 2009 03 18 Microsoft-Expression-Web-SuperPreview-for-Windows-Internet-Explorer.aspx a free stand-alone application that allows cross-browser side-by-side and onionskin comparison between Internet Explorer 8 Internet Explorer 8 - Internet Explorer7 compatibility-mode and Internet Explorer 6 .",
"When I use png jpg image as background of an element of my html document it s not compatible with Internet Explorer 6 7 and 8 .",
"I have done my research : .. . .. . Anyone have ideas for solving the n items remaining problem on Internet Explorer",
"IE is also changing.. . IE7 lets you show Add-ons that have been used by Internet Explorer .",
"To do this go to Control Panel Java Advanced Default Java for Browsers and uncheck Microsoft Internet Explorer .",
"According to W3C : The getElementsByClassName method is not supported in Internet Explorer 8 and earlier versions . .. . .. . I m pretty sure that s right .",
"You can actually use conditional-comments to hide things from Internet Explorer contrary to the answer from deceze .",
"Some internal web apps might rely on ActiveX which only works in Internet Explorer as far as I know .",
"w3schools.com http : www.w3schools.com browsers browsers stats.asp It s well known that most installations of IE6 are coming from companies that have internal software systems that absolutely require the use of Internet Explorer 6 and have the browser installed on most if not all machines at said institution .",
"Microsoft does not support multiple versions of Internet Explorer on one operating-system .",
"The reason is that the operating-system and Internet Explorer share certain DLLs .",
"Microsoft has asked us to remove Internet Explorer from this service .",
"A colleague of mine recommended Internet Explorer Collection http : finalbuilds.edskes.com iecollection.htm .",
"More details on their Internet Explorer Compatibility page https : docs.angularjs.org guide ie",
"Microsoft provides Virtual PC http : www.microsoft.com windows virtual-pc default.aspx disk images with Internet Explorer 6 7 and 8 at the Internet Explorer Application Compatibility VPC Image http : www.microsoft.com downloads details.aspx FamilyID 21eabb90-958f-4b64-b5f1-73d0a413c8ef displaylang en download page .",
"I have my site working perfectly in IE 6+ but it looks weird in IE 6 or IE 5.5 as I can t ignore the users with IE6 because still around 6 of traffic occur from this version .",
"My recommendation would be to create multiple VMs in VMware and install a different version of Internet Explorer on each .",
"I still need VMs to debug JavaScript or to use the Developer Toolbar with a specific Internet Explorer version .",
"Sadly we still need to support IE6 in most cases as it still represents a significant portion of the internet surfing users .",
"you re aware that no one uses it anymore even Internet Explorer 7 isnt worth your time of day see here http : www.w3counter.com globalstats.php for global statistics .",
"As you know in legacy and unpatched Internet Explorer you have to click on active content like Flash to start it .",
"Which is the best choice for running multiple Internet Explorer instances from the point of view of a web-developer",
"If an illegal identifier name is used in-place of important Internet Explorer 7 and below will handle the property normally instead of failing .",
"These are different from comments used to show things to internet-explorer which are more common those are known as Downlevel hidden conditional-comments .. . .. . However if you already using a downlevel hidden conditional comment to show a IE6 stylesheet just to IE6 then you might be best off just hiding it with CSS .",
"Edit : .. . .. . I found this info very informative for me .. . .. . Because Internet Explorer is so old as it was one of the first browsers available it hasn t had the luxury of starting anew as current browser do .",
"Hell I don t think anything on the internet supports IE6 anymore .",
"However when the Ajax call is initiated in Internet Explorer it can take upwards of 3 seconds to populate a listbox with a small list of IP addresses returned .",
"So writing the following code as part of a css of an object puts the image in the src to the background of the element : .. . .. . That way you can easily display transparency in the Internet Explorer .",
"In JRE 7.25 control panel under Default Java for Browsers Microsoft Internet Explorer is checked and also greyed out so I can t change it .",
"Taken from Detecting Internet Explorer More Effectively http : msdn.microsoft.com en-us library ms537509 28VS.85 29.aspx .",
"Here is a decent summary of IE 6 PNG issues : .. . .. . http : 24ways.org 2007 supersleight-transparent-png-in-ie6",
"Is this a known issue with IE 6",
"The comments in this post http : ryanpricemedia.com 2008 03 19 jquery-broken-in-internet-explorer-put-your-documentready-at-the-bottom are incredibly helpful Where I first read about doing it this way",
"Do they have the latest version of IE6",
"IE6 s market share is closer to 17 using a web design page as a source isn t necessarily representative of the general internet .",
"The following code : .. . .. . gives me an error message in Internet Explorer 6 7 and 8 : .. . .. . Object does not support this method .. . .. . How can I select elements by their class in these browsers",
"jQuery 2.0 has just been released and completely dropped support for Internet Explorer 6 7 and 8 more.. . http : blog.jquery.com 2013 04 18 jquery-2-0-released .",
"With a quick search I found this workaround : .. . .. . http : acidmartin.wordpress.com 2008 08 24 emulating-border-color-transparent-in-internet-explorer-6 .. . .. . To put it to work with IE6 we will create another rule that is visible only in version 6 the html hack with just two lines-of-code : .. . .. . .. . html .testDiv .. . border-color : pink .. . filter : chroma color pink .. . .. . .. . .. . And voila",
"I solved in this way for the grab cursor in Internet Explorer : .. . .. . In Internet Explorer for Windows up to and including version 8 if a relative URI value is specified in an external style sheet file the base URI is considered to be the URI of the document containing the element and not the URI of the style sheet in which the declaration appears ."
]
}
|
{
"confidence": [
63.79109191894531,
63.692874908447266,
63.692874908447266,
63.692874908447266,
63.00510025024414,
62.510780334472656,
62.25930404663086,
62.132293701171875,
61.94105911254883,
61.771541595458984,
61.50636672973633,
61.40958786010742,
61.217044830322266,
61.03312683105469,
60.935569763183594,
60.893341064453125,
60.883880615234375,
60.8687858581543,
60.7707405090332,
60.65824890136719
],
"content": [
"Question : Like everyone else I need to test my code on Internet Explorer 6 and Internet Explorer 7 . Now Internet Explorer 8 has some great tools for developer which I d like to use . I d also like to start testing my code with Internet Explorer 8 as it will soon be released . The question is : how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine . So far with Internet Explorer 6 and Internet Explorer 7 I ve been using Multiple IE http : tredosoft.com Multiple IE page 6 . But people have reported see comments on the page linked in the previous sentence issue with Internet Explorer 6 after installing Internet Explorer 8 . Those errors are related to focus in form fields . Running Internet Explorer 7 wouldn t matter so much as Internet Explorer 8 can use the Internet Explorer 7 rendering engine but we still need Internet Explorer 6 . How to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine Comment : IE8 Compatibility does not do the same as IE7 . I Have run into many cases where they were different . Comment : @corymatthews that s true but the standalones ARE the real thing and can be installed side-by-side . IE8 normal IE7 standalone and IE6 standalone . Comment : See meta.stackexchange.com questions 9686 http : meta.stackexchange.com questions 9686 what-is-the-most-rampant-duplicate-on-stack-exchange-sites 73989 73989 for a small list of duplicates . Comment : I think simply changing the rendering engine in IE 8 to earlier versions will be sufficient for testing . Comment : see IECollection http : utilu.com IECollection : Runs under many versions of Windows OS . But best under 32-bit version of Microsoft Windows XP Service Pack 3 whether or not in a virtual-machine . Hence best to install a MS Windows XP SP3 Virtual Machine run IECollection inside it . see coding.smashingmagazine.com 2011 09 02 http : coding.smashingmagazine.com 2011 09 02 reliable-cross-browser-testing-part-1-internet-explorer .. . Answer : Try http : finalbuilds.edskes.net iecollection.htm . Comment : I have . It did not work on Windows 7 where I tried . Comment : I use this with a Win XP VirtualBox instance . I ve only noticed one thing not consistent with a standalone IE6 experience : occasionally it will not let me enter focus on form fields and when I try it on a real machine running only IE6 there is no problem . Comment : That looks really good . Does anyone have any feedback on it Comment : I use it when I have to test old IEs IE6+ in native mode not the IE8 compatibility-mode but it is buggy under Seven . When I work on a Win7 computer I use a VirtualBox virtual-machine with a Windows XP on it with IE collection . Comment : For windows Xp this is the best answer Been using it for a long time already and it is very nice .",
"Question : Like everyone else I need to test my code on Internet Explorer 6 and Internet Explorer 7 . Now Internet Explorer 8 has some great tools for developer which I d like to use . I d also like to start testing my code with Internet Explorer 8 as it will soon be released . The question is : how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine . So far with Internet Explorer 6 and Internet Explorer 7 I ve been using Multiple IE http : tredosoft.com Multiple IE page 6 . But people have reported see comments on the page linked in the previous sentence issue with Internet Explorer 6 after installing Internet Explorer 8 . Those errors are related to focus in form fields . Running Internet Explorer 7 wouldn t matter so much as Internet Explorer 8 can use the Internet Explorer 7 rendering engine but we still need Internet Explorer 6 . How to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine Comment : IE8 Compatibility does not do the same as IE7 . I Have run into many cases where they were different . Comment : @corymatthews that s true but the standalones ARE the real thing and can be installed side-by-side . IE8 normal IE7 standalone and IE6 standalone . Comment : See meta.stackexchange.com questions 9686 http : meta.stackexchange.com questions 9686 what-is-the-most-rampant-duplicate-on-stack-exchange-sites 73989 73989 for a small list of duplicates . Comment : I think simply changing the rendering engine in IE 8 to earlier versions will be sufficient for testing . Comment : see IECollection http : utilu.com IECollection : Runs under many versions of Windows OS . But best under 32-bit version of Microsoft Windows XP Service Pack 3 whether or not in a virtual-machine . Hence best to install a MS Windows XP SP3 Virtual Machine run IECollection inside it . see coding.smashingmagazine.com 2011 09 02 http : coding.smashingmagazine.com 2011 09 02 reliable-cross-browser-testing-part-1-internet-explorer .. . Answer : There is one elegant way to run IE6 IE7 and IE8 on the same machine called virtual PC . First download virtual PC from Microsoft website here : http : www.microsoft.com downloadS details.aspx FamilyID 04d26402-3199-48a3-afa2-2dc0b40a73b6 displaylang en http : www.microsoft.com downloadS details.aspx FamilyID 04d26402-3199-48a3-afa2-2dc0b40a73b6 displaylang en .. . .. . Then download 3 EXE files with IE6 IE7 and IE8 here : http : www.microsoft.com downloads details.aspx FamilyId 21EABB90-958F-4B64-B5F1-73D0A413C8EF displaylang en .. . .. . Install them on your PC and test your web-applications . Saved me days of looking for similar solutions .",
"Question : Like everyone else I need to test my code on Internet Explorer 6 and Internet Explorer 7 . Now Internet Explorer 8 has some great tools for developer which I d like to use . I d also like to start testing my code with Internet Explorer 8 as it will soon be released . The question is : how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine . So far with Internet Explorer 6 and Internet Explorer 7 I ve been using Multiple IE http : tredosoft.com Multiple IE page 6 . But people have reported see comments on the page linked in the previous sentence issue with Internet Explorer 6 after installing Internet Explorer 8 . Those errors are related to focus in form fields . Running Internet Explorer 7 wouldn t matter so much as Internet Explorer 8 can use the Internet Explorer 7 rendering engine but we still need Internet Explorer 6 . How to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine Comment : IE8 Compatibility does not do the same as IE7 . I Have run into many cases where they were different . Comment : @corymatthews that s true but the standalones ARE the real thing and can be installed side-by-side . IE8 normal IE7 standalone and IE6 standalone . Comment : See meta.stackexchange.com questions 9686 http : meta.stackexchange.com questions 9686 what-is-the-most-rampant-duplicate-on-stack-exchange-sites 73989 73989 for a small list of duplicates . Comment : I think simply changing the rendering engine in IE 8 to earlier versions will be sufficient for testing . Comment : see IECollection http : utilu.com IECollection : Runs under many versions of Windows OS . But best under 32-bit version of Microsoft Windows XP Service Pack 3 whether or not in a virtual-machine . Hence best to install a MS Windows XP SP3 Virtual Machine run IECollection inside it . see coding.smashingmagazine.com 2011 09 02 http : coding.smashingmagazine.com 2011 09 02 reliable-cross-browser-testing-part-1-internet-explorer .. . Answer : I use Virtual PC to run an instance of windows where I have IE6 installed . It s a bit clumsier than having different versions in the same computer but it s a 100 working IE6 . Multiple IE works fine for most testing but it s lacking that last few percents . Don t work too much to get the page looking right in IE8 it still has some glitches that most likely will be fixed in the final release .",
"Question : Like everyone else I need to test my code on Internet Explorer 6 and Internet Explorer 7 . Now Internet Explorer 8 has some great tools for developer which I d like to use . I d also like to start testing my code with Internet Explorer 8 as it will soon be released . The question is : how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine . So far with Internet Explorer 6 and Internet Explorer 7 I ve been using Multiple IE http : tredosoft.com Multiple IE page 6 . But people have reported see comments on the page linked in the previous sentence issue with Internet Explorer 6 after installing Internet Explorer 8 . Those errors are related to focus in form fields . Running Internet Explorer 7 wouldn t matter so much as Internet Explorer 8 can use the Internet Explorer 7 rendering engine but we still need Internet Explorer 6 . How to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine Comment : IE8 Compatibility does not do the same as IE7 . I Have run into many cases where they were different . Comment : @corymatthews that s true but the standalones ARE the real thing and can be installed side-by-side . IE8 normal IE7 standalone and IE6 standalone . Comment : See meta.stackexchange.com questions 9686 http : meta.stackexchange.com questions 9686 what-is-the-most-rampant-duplicate-on-stack-exchange-sites 73989 73989 for a small list of duplicates . Comment : I think simply changing the rendering engine in IE 8 to earlier versions will be sufficient for testing . Comment : see IECollection http : utilu.com IECollection : Runs under many versions of Windows OS . But best under 32-bit version of Microsoft Windows XP Service Pack 3 whether or not in a virtual-machine . Hence best to install a MS Windows XP SP3 Virtual Machine run IECollection inside it . see coding.smashingmagazine.com 2011 09 02 http : coding.smashingmagazine.com 2011 09 02 reliable-cross-browser-testing-part-1-internet-explorer .. . Answer : Run IE6 IE7 and IE8 on the Same Machine Using Windows 7 XP Mode .. . .. . http : articles.sitepoint.com article ie6-ie7-ie8-win7-xp-mode",
"Question : Like everyone else I need to test my code on Internet Explorer 6 and Internet Explorer 7 . Now Internet Explorer 8 has some great tools for developer which I d like to use . I d also like to start testing my code with Internet Explorer 8 as it will soon be released . The question is : how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine . So far with Internet Explorer 6 and Internet Explorer 7 I ve been using Multiple IE http : tredosoft.com Multiple IE page 6 . But people have reported see comments on the page linked in the previous sentence issue with Internet Explorer 6 after installing Internet Explorer 8 . Those errors are related to focus in form fields . Running Internet Explorer 7 wouldn t matter so much as Internet Explorer 8 can use the Internet Explorer 7 rendering engine but we still need Internet Explorer 6 . How to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine Comment : IE8 Compatibility does not do the same as IE7 . I Have run into many cases where they were different . Comment : @corymatthews that s true but the standalones ARE the real thing and can be installed side-by-side . IE8 normal IE7 standalone and IE6 standalone . Comment : See meta.stackexchange.com questions 9686 http : meta.stackexchange.com questions 9686 what-is-the-most-rampant-duplicate-on-stack-exchange-sites 73989 73989 for a small list of duplicates . Comment : I think simply changing the rendering engine in IE 8 to earlier versions will be sufficient for testing . Comment : see IECollection http : utilu.com IECollection : Runs under many versions of Windows OS . But best under 32-bit version of Microsoft Windows XP Service Pack 3 whether or not in a virtual-machine . Hence best to install a MS Windows XP SP3 Virtual Machine run IECollection inside it . see coding.smashingmagazine.com 2011 09 02 http : coding.smashingmagazine.com 2011 09 02 reliable-cross-browser-testing-part-1-internet-explorer .. . Answer : .02 USD more.. . I ve written a step-by-step blog post http : blog.donavon.com 2009 08 run-ie6-ie7-and-ie8-side-by-side-on.html showing how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 as virtual applications on Windows 7 Ultimate .",
"Question : Possible Duplicate : .. . Running Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine http : stackoverflow.com questions 574463 .. . .. . Is there a way to have Internet Explorer 8 and Internet Explorer 6 side-by-side without virtualizing I used Multiple IEs http : tredosoft.com Multiple IE which works fine with Internet Explorer 7 but since I installed Internet Explorer 8 beta 2 Internet Explorer 6 started behaving oddly that is more than usual . Comment : Just FYI - When you download IE8 you can press f12 to get the debug tool up which has options at the top to switch between IE8 and IE7 rendering in both quirks and standards modes . Using mydebugbar suggested by Tom for IE6 has worked well enough though I use VMs now . .. . Answer : I use a utility called Sandboxie free for personal use 29 for commercial to provide application sandboxing . One useful side-effect of this is that you can install applications even OS-modifying ones such as IE into the sandbox and the parent OS is completely unaware allowing you to have different versions of the parent OS s IE and the sandboxed IE - and both running simultaneously . The two scenarios I ve used so far : .. . .. . Internet Explorer 7 in the parent OS and uninstalled IE7 in the sandbox to make IE6 available .. . Internet Explorer 6 in the parent os and upgraded to IE8 in the sandbox .. . .. . Caveats : .. . .. . If you need more than one additional version of IE available simultaneously then you will need to purchase the full version as you can only have one version of IE in a sandbox and the free version supports only one active sandbox at a time .. . Installing a version of IE into the sandbox can take a little trial and error - IE8 was particularly tricky . Some warnings that occur during installation or uninstallation are trivial though .",
"Question : Like everyone else I need to test my code on Internet Explorer 6 and Internet Explorer 7 . Now Internet Explorer 8 has some great tools for developer which I d like to use . I d also like to start testing my code with Internet Explorer 8 as it will soon be released . The question is : how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine . So far with Internet Explorer 6 and Internet Explorer 7 I ve been using Multiple IE http : tredosoft.com Multiple IE page 6 . But people have reported see comments on the page linked in the previous sentence issue with Internet Explorer 6 after installing Internet Explorer 8 . Those errors are related to focus in form fields . Running Internet Explorer 7 wouldn t matter so much as Internet Explorer 8 can use the Internet Explorer 7 rendering engine but we still need Internet Explorer 6 . How to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine Comment : IE8 Compatibility does not do the same as IE7 . I Have run into many cases where they were different . Comment : @corymatthews that s true but the standalones ARE the real thing and can be installed side-by-side . IE8 normal IE7 standalone and IE6 standalone . Comment : See meta.stackexchange.com questions 9686 http : meta.stackexchange.com questions 9686 what-is-the-most-rampant-duplicate-on-stack-exchange-sites 73989 73989 for a small list of duplicates . Comment : I think simply changing the rendering engine in IE 8 to earlier versions will be sufficient for testing . Comment : see IECollection http : utilu.com IECollection : Runs under many versions of Windows OS . But best under 32-bit version of Microsoft Windows XP Service Pack 3 whether or not in a virtual-machine . Hence best to install a MS Windows XP SP3 Virtual Machine run IECollection inside it . see coding.smashingmagazine.com 2011 09 02 http : coding.smashingmagazine.com 2011 09 02 reliable-cross-browser-testing-part-1-internet-explorer .. . Answer : This blog post worked for me : http : aarfing.dk p 120 How to run IE6 IE7 and IE8 side-by-side .",
"Question : Possible Duplicate : .. . Running Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine http : stackoverflow.com questions 574463 .. . .. . Is there a way to have Internet Explorer 8 and Internet Explorer 6 side-by-side without virtualizing I used Multiple IEs http : tredosoft.com Multiple IE which works fine with Internet Explorer 7 but since I installed Internet Explorer 8 beta 2 Internet Explorer 6 started behaving oddly that is more than usual . Comment : Just FYI - When you download IE8 you can press f12 to get the debug tool up which has options at the top to switch between IE8 and IE7 rendering in both quirks and standards modes . Using mydebugbar suggested by Tom for IE6 has worked well enough though I use VMs now . .. . Answer : I ve written a step-by-step blog post http : blog.donavon.com 2009 08 run-ie6-ie7-and-ie8-side-by-side-on.html showing how to run IE6 IE7 and IE8 as virtual applications on Windows 7 Ultimate .",
"Question : Like everyone else I need to test my code on Internet Explorer 6 and Internet Explorer 7 . Now Internet Explorer 8 has some great tools for developer which I d like to use . I d also like to start testing my code with Internet Explorer 8 as it will soon be released . The question is : how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine . So far with Internet Explorer 6 and Internet Explorer 7 I ve been using Multiple IE http : tredosoft.com Multiple IE page 6 . But people have reported see comments on the page linked in the previous sentence issue with Internet Explorer 6 after installing Internet Explorer 8 . Those errors are related to focus in form fields . Running Internet Explorer 7 wouldn t matter so much as Internet Explorer 8 can use the Internet Explorer 7 rendering engine but we still need Internet Explorer 6 . How to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine Comment : IE8 Compatibility does not do the same as IE7 . I Have run into many cases where they were different . Comment : @corymatthews that s true but the standalones ARE the real thing and can be installed side-by-side . IE8 normal IE7 standalone and IE6 standalone . Comment : See meta.stackexchange.com questions 9686 http : meta.stackexchange.com questions 9686 what-is-the-most-rampant-duplicate-on-stack-exchange-sites 73989 73989 for a small list of duplicates . Comment : I think simply changing the rendering engine in IE 8 to earlier versions will be sufficient for testing . Comment : see IECollection http : utilu.com IECollection : Runs under many versions of Windows OS . But best under 32-bit version of Microsoft Windows XP Service Pack 3 whether or not in a virtual-machine . Hence best to install a MS Windows XP SP3 Virtual Machine run IECollection inside it . see coding.smashingmagazine.com 2011 09 02 http : coding.smashingmagazine.com 2011 09 02 reliable-cross-browser-testing-part-1-internet-explorer .. . Answer : I use http : www.spoon.net browsers Windows-only . You can run IE8 IE7 IE6 Firefox 3.5 Firefox 3 Firefox 2 Safari 4 Safari 3 Opera 10 Opera 9 Chrome . You just need to install a plugin and then click on the corresponding icon . It will download and run the files needed to run each of the above mentioned browsers . Comment : Microsoft has asked us to remove Internet Explorer from this service . Comment : As of 2011-01-24 there is no IE support : Come back soon for more information on how to use Internet Explorer on Spoon.net Comment : The stand-alone files are still available see Quick browser testing : Internet explorer version 6 7 and 8 http : stackoverflow.com q 4227959 938089 quick-browser-testing-internet-explorer-version-6-7-and-8 . This does not work for Windows 7 though . Comment : @DenilsonS : The Service is back Comment : There is a similar service that does not require plugins and should work on Mac Linux Windows : crossbrowsertesting.com http : crossbrowsertesting.com",
"Question : Possible Duplicate : .. . Running Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine http : stackoverflow.com questions 574463 .. . .. . Is there a way to have Internet Explorer 8 and Internet Explorer 6 side-by-side without virtualizing I used Multiple IEs http : tredosoft.com Multiple IE which works fine with Internet Explorer 7 but since I installed Internet Explorer 8 beta 2 Internet Explorer 6 started behaving oddly that is more than usual . Comment : Just FYI - When you download IE8 you can press f12 to get the debug tool up which has options at the top to switch between IE8 and IE7 rendering in both quirks and standards modes . Using mydebugbar suggested by Tom for IE6 has worked well enough though I use VMs now . .. . Answer : A very light-weight and just released way to do this is to use Expression Web SuperPreview http : www.microsoft.com downloads details.aspx FamilyID 8e6ac106-525d-45d0-84db-dccff3fae677 displaylang en . It allows you to compare IE6 and IE7 or IE6 and IE8+IE7-compatibility-mode side-by-side . It s currently just a preview but I ve used it with good results . They re going to release a commercial version that enables side-by-side comparison of more browsers but they say the IE-specific one will remain free forever . Comment : I wonder how they ve implemented it . Are they using a compatibility-mode thing or are they actually shipping the IE6 modules Comment : Mighty good question . I think they re using compatibility-mode for IE7 rendering but I they must be doing something else for IE6 . mshtml.dll SxS Comment : The only problem is that it doesn t support automatic Forms authentication . Without this you cannot test secure pages without having a special build setup without forms-authentication enabled or else bypassed .",
"Question : Possible Duplicate : .. . Running Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine http : stackoverflow.com questions 574463 running-internet-explorer-6-internet-explorer-7-and-internet-explorer-8-on-the .. . .. . I need recommendations on a good Internet Explorer standalone for Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 . I tried using Tredosoft s Internet Explorer 7 standalone http : tredosoft.com IE7 standalone and MultiIE for Internet Explorer 6 but select elements were being blocked as pop-ups even when the pop-up blocker was turned off in all Internet Explorer browsers 6 7 8 . I also tried the Internet Explorer Collection from Edskes but Internet Explorer 6 and Internet Explorer 7 refuse to let me type in a text box . If someone can provide me with either a solution or an alternative that d be brilliant . Also I m using VMware Fusion http : en.wikipedia.org wiki VMware Fusion to run Windows XP on my Mac . Comment : You ll first have to tell some of us what an IE standalone is . Comment : I suspect he means an IE that isn t tied into Windows . Comment : OK the end result-of what I m trying to do is be able to run IE6 IE7 and IE8 on the same installation of Windows and have them behave as they normally would . I can t use browser shots as I need to be able to test functionality not just layout . I think I might try the Xenocode ones for the short term but I m looking for something that I can run locally . Comment : I won t be going for the Microsoft option as I m hoping for something that continues to work and that I don t have to deal with every three months . It sounds like far too much of an issue . I m going to look into using multiple snapshots or multiple virtual machines unless someone has a better option . .. . Answer : For testing purposes I ve used the browsers archive at http : browsers.evolt.org . The Internet Explorer 6 standalone version work on Windows XP it does t work on Windows Vista . Comment : What is the specific problem with this answer I hate it when people downvote and don t comment . Do the browsers at that link not work Are they full of malware Or are they fine and Bo just wrote his original answer unclearly I wish people would respect the community and share what they know.. . Comment : I don t know if this is the reason but I just went to this site as I m looking for standalones myself and they appear to only have IE6 which means this wouldn t answer the question asked . But then again the tredosoft link above appears to have the same problem so who knows .",
"Question : I m new to jquery and was wondering : is a simple way to detect whether a browser is Internet Explorer 6 or below Comment : .browser has been deprecated . Refer stackoverflow.com questions 1944169 detecting-ie-using-jquery http : stackoverflow.com questions 1944169 detecting-ie-using-jquery more details .. . Answer : Also another good point is that with JQuery you are not supposed to worry about the version . That doesn t help if you re using jquery to fix an IE6 css rendering bug though .",
"Question : null .. . Answer : I need to show two background images . I m doing this : .. . .. . This work fine in internet-explorer-11 but I need to do this for internet-explorer-6 . How can I resolve it Thank you very much Comment : I m sorry to hear you still support IE6 Comment : You could try the suggestion in stackoverflow.com questions 7106048 http : stackoverflow.com questions 7106048 multiple-background-images-in-ie-using-css-to-create-multiple-background-images Comment : Do you really need to do this for IE 6 Comment : Because you really need to support the 0.66 of internet users on IE6.. . netmarketshare.com https : www.netmarketshare.com browser-market-share.aspx qprid 2 qpcustomd 0 Comment : Slap your client and get them to install a modern web browser .",
"Question : Like everyone else I need to test my code on Internet Explorer 6 and Internet Explorer 7 . Now Internet Explorer 8 has some great tools for developer which I d like to use . I d also like to start testing my code with Internet Explorer 8 as it will soon be released . The question is : how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine . So far with Internet Explorer 6 and Internet Explorer 7 I ve been using Multiple IE http : tredosoft.com Multiple IE page 6 . But people have reported see comments on the page linked in the previous sentence issue with Internet Explorer 6 after installing Internet Explorer 8 . Those errors are related to focus in form fields . Running Internet Explorer 7 wouldn t matter so much as Internet Explorer 8 can use the Internet Explorer 7 rendering engine but we still need Internet Explorer 6 . How to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine Comment : IE8 Compatibility does not do the same as IE7 . I Have run into many cases where they were different . Comment : @corymatthews that s true but the standalones ARE the real thing and can be installed side-by-side . IE8 normal IE7 standalone and IE6 standalone . Comment : See meta.stackexchange.com questions 9686 http : meta.stackexchange.com questions 9686 what-is-the-most-rampant-duplicate-on-stack-exchange-sites 73989 73989 for a small list of duplicates . Comment : I think simply changing the rendering engine in IE 8 to earlier versions will be sufficient for testing . Comment : see IECollection http : utilu.com IECollection : Runs under many versions of Windows OS . But best under 32-bit version of Microsoft Windows XP Service Pack 3 whether or not in a virtual-machine . Hence best to install a MS Windows XP SP3 Virtual Machine run IECollection inside it . see coding.smashingmagazine.com 2011 09 02 http : coding.smashingmagazine.com 2011 09 02 reliable-cross-browser-testing-part-1-internet-explorer .. . Answer : Backing up the other users you will need to run Virtual PC instances on your Windows box . If you try to do a multi install of Internet Explorer you will break conditional-comments on pages which will make testing difficult anyway For example With Internet Explorer 5 6 and 7 . On a Windows box the IF Internet Explorer statements will resolve to Internet Explorer 7 even in Internet Explorer 5 which means even more weird bugs . More information and a link-to download and run a Internet Explorer 6 Virtual Image : http : blogs.msdn.com ie archive 2007 04 17 ie7-virtual-pc-image-and-ie6-virtual-pc-image-refresh.aspx .. . .. . If you have Virtual PC already here is the image : http : www.microsoft.com Downloads details.aspx FamilyID 21eabb90-958f-4b64-b5f1-73d0a413c8ef displaylang en http : www.microsoft.com Downloads details.aspx FamilyID 21eabb90-958f-4b64-b5f1-73d0a413c8ef displaylang en Comment : @superroach Interesting conditional-comments being broken makes it one more reason to use virtual machines .",
"Question : Possible Duplicate : .. . Running Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine http : stackoverflow.com questions 574463 .. . .. . Is there a way to have Internet Explorer 8 and Internet Explorer 6 side-by-side without virtualizing I used Multiple IEs http : tredosoft.com Multiple IE which works fine with Internet Explorer 7 but since I installed Internet Explorer 8 beta 2 Internet Explorer 6 started behaving oddly that is more than usual . Comment : Just FYI - When you download IE8 you can press f12 to get the debug tool up which has options at the top to switch between IE8 and IE7 rendering in both quirks and standards modes . Using mydebugbar suggested by Tom for IE6 has worked well enough though I use VMs now . .. . Answer : There s also IE7 standalone http : tredosoft.com IE7 standalone",
"Question : Possible Duplicate : .. . Running Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine http : stackoverflow.com questions 574463 .. . .. . Is there a way to have Internet Explorer 8 and Internet Explorer 6 side-by-side without virtualizing I used Multiple IEs http : tredosoft.com Multiple IE which works fine with Internet Explorer 7 but since I installed Internet Explorer 8 beta 2 Internet Explorer 6 started behaving oddly that is more than usual . Comment : Just FYI - When you download IE8 you can press f12 to get the debug tool up which has options at the top to switch between IE8 and IE7 rendering in both quirks and standards modes . Using mydebugbar suggested by Tom for IE6 has worked well enough though I use VMs now . .. . Answer : Microsoft does not support multiple versions of Internet Explorer on one operating-system . The reason is that the operating-system and Internet Explorer share certain DLLs . When you upgrade from Internet Explorer 6 to Internet Explorer 7 or Internet Explorer 8 you re actually replacing some system DLLs . This is the reason why you get Internet Explorer 6 when you uninstall Internet Explorer 7 . Chris Wilson Internet Explorer architect addressed this issue in a blog post Multiple IEs on one machine http : blogs.msdn.com cwilso archive 2006 02 01 522281.aspx . Chris states that on-the-fly replacement of mshtml.dll might work for CSS rendering ...but it s not the same as having a full set of new Internet Explorer system DLLs installed and would certainly not be considered a definitive solution . del Only virtualization can provide the full DLL stack for definitive testing . del .. . .. . Edit : .. . .. . On March 18 2009 the Microsoft Expression Web team released SuperPreview http : blogs.msdn.com xweb archive 2009 03 18 Microsoft-Expression-Web-SuperPreview-for-Windows-Internet-Explorer.aspx a free stand-alone application that allows cross-browser side-by-side and onionskin comparison between Internet Explorer 8 Internet Explorer 8 - Internet Explorer7 compatibility-mode and Internet Explorer 6 . Additional browsers and an on-demand service is planned to render pages in realtime on other operating systems . Edit in response to Zac comment .. . .. . Thanks for the comment . Expression Web http : en.wikipedia.org wiki Microsoft Expression Web 3 which will include SuperPreview will allow comparison between any combination of Internet Explorer 6 Internet Explorer 7 Internet Explorer 8 and Firefox 3 . This is according to Somasgear s blog entry Expresion Web 3 http : blogs.msdn.com somasegar archive 2009 06 05 expression-web-3.aspx posted on June 5 2009 . In the screenshot on his blog you ll see Firefox 3 as the base browser left side and Internet Explorer 6 as the comparison browser . Any browser can be placed on either side of the comparison window . Comment : I believe with SuperPreview you can have IE6 and IE7 or IE6 and IE8 not all three . Comment : I ve updated my response with the latest information .",
"Question : Possible Duplicate : .. . Running Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine http : stackoverflow.com questions 574463 .. . .. . Is there a way to have Internet Explorer 8 and Internet Explorer 6 side-by-side without virtualizing I used Multiple IEs http : tredosoft.com Multiple IE which works fine with Internet Explorer 7 but since I installed Internet Explorer 8 beta 2 Internet Explorer 6 started behaving oddly that is more than usual . Comment : Just FYI - When you download IE8 you can press f12 to get the debug tool up which has options at the top to switch between IE8 and IE7 rendering in both quirks and standards modes . Using mydebugbar suggested by Tom for IE6 has worked well enough though I use VMs now . .. . Answer : What I do is use VMware with other OS with IE6 . Not perfect but it helps .",
"Question : Like everyone else I need to test my code on Internet Explorer 6 and Internet Explorer 7 . Now Internet Explorer 8 has some great tools for developer which I d like to use . I d also like to start testing my code with Internet Explorer 8 as it will soon be released . The question is : how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine . So far with Internet Explorer 6 and Internet Explorer 7 I ve been using Multiple IE http : tredosoft.com Multiple IE page 6 . But people have reported see comments on the page linked in the previous sentence issue with Internet Explorer 6 after installing Internet Explorer 8 . Those errors are related to focus in form fields . Running Internet Explorer 7 wouldn t matter so much as Internet Explorer 8 can use the Internet Explorer 7 rendering engine but we still need Internet Explorer 6 . How to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine Comment : IE8 Compatibility does not do the same as IE7 . I Have run into many cases where they were different . Comment : @corymatthews that s true but the standalones ARE the real thing and can be installed side-by-side . IE8 normal IE7 standalone and IE6 standalone . Comment : See meta.stackexchange.com questions 9686 http : meta.stackexchange.com questions 9686 what-is-the-most-rampant-duplicate-on-stack-exchange-sites 73989 73989 for a small list of duplicates . Comment : I think simply changing the rendering engine in IE 8 to earlier versions will be sufficient for testing . Comment : see IECollection http : utilu.com IECollection : Runs under many versions of Windows OS . But best under 32-bit version of Microsoft Windows XP Service Pack 3 whether or not in a virtual-machine . Hence best to install a MS Windows XP SP3 Virtual Machine run IECollection inside it . see coding.smashingmagazine.com 2011 09 02 http : coding.smashingmagazine.com 2011 09 02 reliable-cross-browser-testing-part-1-internet-explorer .. . Answer : Nobody mentioned this but IETester http : www.my-debugbar.com wiki IETester HomePage is a great tool . It supports Internet Explorer 5.5 6 7 and 8RC1 . The rendering matches the corresponding browsers . At least I haven t found any discrepancies yet . I normally use it to do a basic check of the layout . I still need VMs to debug JavaScript or to use the Developer Toolbar with a specific Internet Explorer version . IETester 0.3 http : i.stack.imgur.com kcinP.png Comment : @Tsvetomir Tsonev thank you for the link . In this case I ll need to debug JS code so I guess I won t escape installing a VM but for layout issues IETester is a good pick . Comment : This is a nice idea but actually not licensed . Microsoft s IE licenses expressly forbid redistribution and while they are unlikely to come down on this sort of application if your organisation is audited it technically counts as pirated . Comment : IETester has occasional bugs which is pretty nasty when you don t expectit . For example with cookies set from javacript . Comment : The site I m working with has popups and this seems to break this tool . Didn t work for me . Comment : Unfortunately IETester is quite buggy - quite often behaviour for native installation of say IE6 differ from IETester",
"Question : Like everyone else I need to test my code on Internet Explorer 6 and Internet Explorer 7 . Now Internet Explorer 8 has some great tools for developer which I d like to use . I d also like to start testing my code with Internet Explorer 8 as it will soon be released . The question is : how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine . So far with Internet Explorer 6 and Internet Explorer 7 I ve been using Multiple IE http : tredosoft.com Multiple IE page 6 . But people have reported see comments on the page linked in the previous sentence issue with Internet Explorer 6 after installing Internet Explorer 8 . Those errors are related to focus in form fields . Running Internet Explorer 7 wouldn t matter so much as Internet Explorer 8 can use the Internet Explorer 7 rendering engine but we still need Internet Explorer 6 . How to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine Comment : IE8 Compatibility does not do the same as IE7 . I Have run into many cases where they were different . Comment : @corymatthews that s true but the standalones ARE the real thing and can be installed side-by-side . IE8 normal IE7 standalone and IE6 standalone . Comment : See meta.stackexchange.com questions 9686 http : meta.stackexchange.com questions 9686 what-is-the-most-rampant-duplicate-on-stack-exchange-sites 73989 73989 for a small list of duplicates . Comment : I think simply changing the rendering engine in IE 8 to earlier versions will be sufficient for testing . Comment : see IECollection http : utilu.com IECollection : Runs under many versions of Windows OS . But best under 32-bit version of Microsoft Windows XP Service Pack 3 whether or not in a virtual-machine . Hence best to install a MS Windows XP SP3 Virtual Machine run IECollection inside it . see coding.smashingmagazine.com 2011 09 02 http : coding.smashingmagazine.com 2011 09 02 reliable-cross-browser-testing-part-1-internet-explorer .. . Answer : You can use the new MS Expression Web SuperPreview http : blogs.msdn.com xweb archive 2009 03 18 Microsoft-Expression-Web-SuperPreview-for-Windows-Internet-Explorer.aspx .. . .. . alt text http : www.istartedsomething.com wp-content uploads 2009 03 superpreview1.jpg .. . .. . If you do not want to spend money on MS Expression Web you can download Microsoft Expression Web SuperPreview for Windows Internet Explorer http : www.microsoft.com en-us download details.aspx id 2020 completely free . The only restriction is that after the trial expires you can t compare to non IE browsers . Comment : How does this work with IE8 I don t it on my computer now so if I download it will it show me 6 7 and 8 Comment : I m using it as part of MS Expression not the IE attached version and works very well . A bit slow in my case but I do not have a super-machine Comment : @Martin : Yes if you have IE8 you can view IE7 via compatibility view IE6 and IE8 of course . Comment : Am I right in saying that it just renders the page but you can t actually interact with it as in press buttons enter text etc . That makes it less useful as I thought because you can t actually browse the site as a user would do . Comment : Its not really that super a product to be honest slow very very very very slow and also no interaction .",
"Question : Like everyone else I need to test my code on Internet Explorer 6 and Internet Explorer 7 . Now Internet Explorer 8 has some great tools for developer which I d like to use . I d also like to start testing my code with Internet Explorer 8 as it will soon be released . The question is : how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine . So far with Internet Explorer 6 and Internet Explorer 7 I ve been using Multiple IE http : tredosoft.com Multiple IE page 6 . But people have reported see comments on the page linked in the previous sentence issue with Internet Explorer 6 after installing Internet Explorer 8 . Those errors are related to focus in form fields . Running Internet Explorer 7 wouldn t matter so much as Internet Explorer 8 can use the Internet Explorer 7 rendering engine but we still need Internet Explorer 6 . How to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine Comment : IE8 Compatibility does not do the same as IE7 . I Have run into many cases where they were different . Comment : @corymatthews that s true but the standalones ARE the real thing and can be installed side-by-side . IE8 normal IE7 standalone and IE6 standalone . Comment : See meta.stackexchange.com questions 9686 http : meta.stackexchange.com questions 9686 what-is-the-most-rampant-duplicate-on-stack-exchange-sites 73989 73989 for a small list of duplicates . Comment : I think simply changing the rendering engine in IE 8 to earlier versions will be sufficient for testing . Comment : see IECollection http : utilu.com IECollection : Runs under many versions of Windows OS . But best under 32-bit version of Microsoft Windows XP Service Pack 3 whether or not in a virtual-machine . Hence best to install a MS Windows XP SP3 Virtual Machine run IECollection inside it . see coding.smashingmagazine.com 2011 09 02 http : coding.smashingmagazine.com 2011 09 02 reliable-cross-browser-testing-part-1-internet-explorer .. . Answer : As Eduardo mentioned the recently announced Microsoft SuperPreview http : blogs.msdn.com xweb archive 2009 03 18 Microsoft-Expression-Web-SuperPreview-for-Windows-Internet-Explorer.aspx is a tool that lets you view how web pages are rendered in many different browsers even if they aren t installed locally . For example you can see how your page looks in Internet Explorer 6 Internet Explorer 7 Internet Explorer 8 Firefox and Safari even if you don t have those browsers installed ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
internet-explorer
|
UNK_RELATION
|
apache-karaf@implementation@97
|
apache-karaf -- karaf is an enterprise grade osgi runtime container with configurable framework @placeholder equinox felix .
|
{
"confidence": [
65.69091033935547,
65.02743530273438,
57.84365463256836,
57.569602966308594,
57.216426849365234,
56.35422134399414,
54.95412063598633,
53.29841995239258,
52.3132209777832,
51.55178451538086,
50.54431915283203,
50.348602294921875,
50.31391143798828,
50.2180290222168,
50.08063507080078,
48.62574005126953,
48.546566009521484,
48.500789642333984,
48.500789642333984,
48.40538787841797,
48.17261505126953,
47.82201385498047,
47.39659118652344,
47.29372787475586,
47.109413146972656,
46.89027786254883,
46.88542175292969,
46.59284210205078,
46.58430099487305,
46.57285690307617,
46.361602783203125,
46.3264274597168,
45.82558822631836,
45.77313232421875,
45.707550048828125,
45.43414306640625,
45.347740173339844,
45.296836853027344,
45.296836853027344,
44.97871017456055,
44.87786865234375,
44.78506088256836,
44.78506088256836,
44.71637725830078,
44.66261291503906,
44.605384826660156,
44.25022888183594,
43.92675018310547,
43.543128967285156,
43.53038787841797,
43.49517822265625,
43.381507873535156,
43.247955322265625,
43.205291748046875,
43.148067474365234,
43.148067474365234,
43.04987335205078,
42.973453521728516,
42.748382568359375,
42.68367004394531,
42.68367004394531,
42.640419006347656,
42.58699035644531,
42.503597259521484,
42.503597259521484,
42.503597259521484,
42.503597259521484,
42.503597259521484,
42.503597259521484,
42.503597259521484,
42.336246490478516,
42.336246490478516,
42.336246490478516,
42.13145446777344,
42.13145446777344,
42.13145446777344,
42.08152770996094,
41.983238220214844,
41.80474853515625,
41.80474853515625,
41.80474853515625,
41.80474853515625,
41.80474853515625,
41.79765319824219,
41.6348762512207,
41.6348762512207,
41.616600036621094,
41.58110809326172,
41.58110809326172,
41.58110809326172,
41.58110809326172,
41.58110809326172,
41.45866012573242,
41.45866012573242,
41.45866012573242,
41.401432037353516,
41.383079528808594,
41.2268180847168,
40.768104553222656,
40.751502990722656
],
"content": [
"Apache Karaf can also use Equinox or another OSGi runtime .",
"Now let s talk about what OSGI Apache Felix Equinox is and what Apache Karaf is : .. . .. . OSGI is very simple .",
"In this diagram of the Karaf architecture Felix or other OSGi implementation - currently Equinox http : www.eclipse.org equinox is also supported is the OSGi box the other boxes are the features added by Karaf : .. . .. .",
"Latest check of Equinox website also seems to indicate that it is lagging Felix+Karaf a bit in terms of adopting the latest OSGi Enterprise specs .",
"Some one suggested me to use Equinox instead of Felix inside Karaf .",
"Apache Karaf can use Apache Felix .",
"The lightweight OSGi container label is contrasting Karaf http : karaf.apache.org with more feature rich OSGi containers not with Felix http : felix.apache.org .",
"Apache Karaf http : karaf.apache.org is a sub project of Apache Felix http : felix.apache.org .",
"We are looking to use Apache Karaf as our OSGI runtime .",
"By default the Apache Karaf standard download does come with Apache Felix .",
"I am new to apache-karaf .",
"karaf karaf .. . .. . 4 .",
"I m using OSGi with karaf .",
"I am getting uses constraint violation as below while installing a feature in Apache Karaf karaf framework is felix and version is 4.2.1 .. . .. . could not be resolved .",
"Because Apache Karaf is just built on standard OSGI it can in theory run on any OSGI runtime .",
"You can use Apache Karaf Cellar and Apache Karaf Cave for this scenario .",
"The difficult thing when doing this approach in karaf is recreating an environment in the pure OSGi framework that resembles karaf enough to be useful .",
"For anything OSGi on the serverside we re using Karaf .",
".. . Regards JB .. . .. . Telling that Karaf ships osgi compendium .",
"Karaf provides all of the features you d expect and need for a production environment see the apache-karaf tag s info http : stackoverflow.com tags apache-karaf info .",
"Which plugin will help for Karaf with OSGi",
"Since karaf OSGi container accepts deployment of same bundle with different versions .",
"Related question stackoverflow.com questions 1612120 http : stackoverflow.com questions 1612120 osgi-what-are-the-differences-between-apache-felix-and-apache-karaf",
"Do you suggest Karaf OSGI framework startup with each application run",
"Bundle is deployed in Apache Karaf .",
"In Apache Karaf 4.0.4 this has changed .",
"I am trying to configure the jetty to work with SSL in Apache Karaf OSGI container .",
"Apache Karaf is a swiss army knife to run OSGi stuff and non OSGi things bundled as OSGi .",
"Can you say that Apache Karaf includes amongst other things : .. . .. . Apache Felix which is an implementation of the OSGi 4.2 framework .. . Apache Aries which is an implementation of the Blueprint standard",
".. . .. . Some setup details : I tested this in Karaf 2.3.2 and 2.3.3 with Equinox or Felix enabled respectively .",
"See github.com apache-karaf blob master webconsole console src main https : github.com apache-karaf blob master webconsole console src main java org apache-felix webconsole internal servlet JaasSecurityProvider.java",
"I installed apache-karaf with karaf cave and i know how it works .",
"Apache Karaf Cellar brings farming to Karaf in this scenario you can configure multiple karaf instances within one group .",
"Tomcat or Using OSGI Bundle of Application Container Jetty or Tomcat within KARAF .",
"Environment : - .. . .. . Karaf 3.0.5 .. . Apache Serviemix 6.1.0",
"Karaf 4 has a version of Equinox which should work .",
"karaf 4.0.5 in karaf 3.0.6 all was worked fine .",
"Fuse ESB uses karaf server with OSGi .",
"I wanted to deploy my OSGI bundles in Karaf .",
"I know Apache Felix comes with some as well through OBR but Apache Karaf comes much more batteries-included .",
"karaf",
"Started working on a new project and We are using Apache Karaf for running OSGi bundles .",
"I want to be able to easily debug an OSGi bundle running in Apache Karaf from Eclipse .",
"As soon as I deployed the above blueprint in karaf container2 i am seeing the following exception in the karaf container 1 .",
"Also my question text explicitly states that I am looking for something that will work in ANY OSGi container not just Karaf",
"I am looking into ways to deploy and update an OSGI Karaf specifically application .",
"The transactions will then work like in older Apache Karaf versions .",
"i am new to Maven and OSGI can anyone please help me knowing how to deploy Microsoft Azure API jar on karaf OSGI container",
"Today I recommend using Felix since a good number of the Karaf ServiceMix committers also have the ability to make changes to Felix without having to wait for Equinox to make upstream changes .",
"One is to use The OSGi Bundle Repository OBR another is to use Features in Karaf and the third is to use Karaf Cave http : karaf.apache.org index subprojects cave.html .",
"I followed the example on Karaf Cellar as given under http : blog.nanthrax.net 2011 11 apache-karaf-cellar-and-dosgi .. . .. . I created 3 OSGi bundles namely service Bundle1 service-implementation Bundle2 and client Bundle3 .",
"See this code from karaf decanter https : github.com apache karaf-decanter tree master collector log as an example .",
"The artifact is built as an OSGi bundle and deployed in Karaf 3.0.2 .",
"I am trying to use pax-exam-container-karaf for testing an OSGi bundle .",
"I am trying to use Jersey through OSGi Karaf specifically .",
"I am making an osgi application running on karaf 4.0.4 .",
"Apache Felix which is an implementation of the OSGi 4.2 framework .. . .. . Sort of .",
"We are upgrading to apache ActiveMQ 5.10.2 with apache-karaf 3.0.3 on java-8 .",
"here the source code of 3.0.0 version : github.com apache-karaf blob karaf-3.0.0 assemblies features https : github.com apache-karaf blob karaf-3.0.0 assemblies features framework src main filtered-resources resources bin client .",
"In Karaf 3 you have to use the Felix Gogo services ie the CommandProcessor .",
"Why did you re-install the felix file install bundle in Karaf",
"The configuration for felix file-install is also explained in the documentation http : karaf.apache.org manual latest of Apache Karaf .",
"Depending on what you want to achieve it might be even easier to simply use apache-karaf decanter https : github.com apache karaf-decanter .",
"Please come to the Apache Karaf Mailinglist for such questions .",
"I have an annoying problem in Apache Karaf 3.0.2 .",
"So is it possible to use Metro in Apache Karaf",
"It is now working fine with the Apache karaf version 2.3.10 .",
"TLDR : Apache Karaf is much more batteries-included .",
"It s already provided out-of-the-box with Apache Karaf .",
"The logging bundle is deployed into Apache Karaf and running .",
"There is no need to do explicit configuration for the Karaf container .",
"One important point is we are using a Karaf container .",
"I am deploying this in a blueprint container in karaf .",
"Can somebody please tell me how to achieve this in apache-karaf",
"I have installed Apache Karaf 4.0.2 and Hawtio 1.456 .",
"Can you guide me How to enable TLS 1.1 in apache Karaf .",
"I have deployed a org.apache.felix.fileinstall-3.5.0.jar file in karaf and I have the felix framework installed .",
"Currently ServiceMix is really a set of bundles that are deployed into a Karaf container .",
"Karaf does NOT come with CXF .",
"can not resolve bundle in karaf .",
"This allows karaf to decide if it is needed .",
"Karaf is easy to use with features .",
"It works in Karaf 4.0.3 .",
"If you want a more robust integration environment the environment of choice today in the Apache Felix world at least is Karaf Camel and a few bundles from Servicemix .",
"Apache Karaf Cave is a central Repository which can be used to provide all required Bundles to Karaf instances .",
"Apache Karaf version : 3.0 pax logging 1.7.1 which is packaged with karaf from build .",
"As discussed in Karaf User Forum http : karaf.922171.n3.nabble.com Getting-a-bundle-state-via-script-from-Karaf-3-0-5-td4045740.html I am able to achieve it using the karaf client : -",
"I am a new in the world of OSGi and using Apache Karaf 4.0.4 for my application .",
"I am modernising an existing application to run inside the Apache Karaf OSGI system .",
"It is not OSGi compliant and I am trying to work at it in order to deploy the application in Apache Karaf .",
"I have a core library that has an interface that I want to expose as an OSGI service in Fuse ESB Apache ServiceMix and Karaf .",
"I m trying to send a soap request in apache-camel running on an osgi enviroment karaf .",
"The features is in our karaf feature file but you can use the bundles from the given maven origin in any OSGi container .",
"Just to add everything works perfectly fine if I run this as a normal jar outside Karaf OSGi container .",
"We are trying to connect with the HDFS using kerberos from Karaf container by OSGI bundle .",
"Still we are in karaf 2.3.10 which uses OSGi rev 4.2 .",
"I have 2 karaf containers running on different machines with Bundle1 and Bundle2 deployed on one karaf instance and Bundle1 and Bundle3 on other karaf instance .",
"The standard download of Apache Karaf does come with Apache Aries by default .",
"If you don t need an ESB JCA BPEL etc but want a solid tunable OSGi container then Karaf on it s own is more than adequate .",
"According to the discussion on the Karaf users mailing list http : karaf.922171.n3.nabble.com How-to-secure-Karaf-td4047127.html concerning this stack-overflow question : .. . .. . By default bin client tries in this order to use : .. . .. . 1 ."
]
}
|
{
"confidence": [
97.85386657714844,
96.8325424194336,
95.08397674560547,
89.36344909667969,
82.91664123535156,
82.27032470703125,
79.38440704345703,
77.68529510498047,
71.18705749511719,
70.55966186523438,
70.2623062133789,
69.38753509521484,
66.98299407958984,
66.37271881103516,
65.27528381347656,
65.19287109375,
65.14766693115234,
65.00875854492188,
64.53761291503906,
63.08600616455078
],
"content": [
"Question : I am a little bit confused about what Apache Karaf exactly is . Can you say that Apache Karaf includes amongst other things : .. . .. . Apache Felix which is an implementation of the OSGi 4.2 framework .. . Apache Aries which is an implementation of the Blueprint standard Comment : I ve been working with OSGi for nearly ten years and I also don t get the point of Karaf - Comment : Related question stackoverflow.com questions 1612120 http : stackoverflow.com questions 1612120 osgi-what-are-the-differences-between-apache-felix-and-apache-karaf .. . Answer : TLDR : Apache Karaf is much more batteries-included . It can also run on any OSGI runtime . Apache Felix which is an implementation of the OSGi 4.2 framework .. . .. . Sort of . Apache Karaf can use Apache Felix . Apache Karaf can also use Equinox or another OSGi runtime . By default the Apache Karaf standard download does come with Apache Felix . Apache Aries which is an implementation of the Blueprint standard .. . .. . Again sort of . The standard download of Apache Karaf does come with Apache Aries by default . Now let s talk about what OSGI Apache Felix Equinox is and what Apache Karaf is : .. . .. . OSGI is very simple . You can start an OSGI runtime in your application and not even notice it . The shell the ability to hot deploy from a folder install from a maven repo etc..These are all extras that OSGI doesn t have to do and are provided by additional projects like Karaf GOGO or Pax .. . .. . Now on to Apache Karaf : .. . .. . It is basically an OSGI environment that provides some additional goodies on top of a standard OSGI implementation . Because Apache Karaf is just built on standard OSGI it can in theory run on any OSGI runtime . This gives you a uniform interface for working with OSGI runtimes . Some goodies Apache Karaf provides that you won t see in a Apache Felix without some additional work : .. . .. . Folder based hot deployment .. . A IMHO better default console than gogo . org.apache.karaf.shell .. . Remote SSH access to that console . org.apache.karaf.shell.ssh .. . Centralized Logging System . org.apache.karaf.log .. . It has it s own way of provisioning bundles and start levels . org.apache.karaf.features .. . Karaf has it s own maven plugins as well . Pretty much anything here : .. . .. . http : mvnrepository.com search.html query org.apache.karaf .. . .. . I mentioned Karaf having it s own way of provisioning bundles and start levels . Apache Karaf also comes with a bunch of pre-defined ones to get started with . I know Apache Felix comes with some as well through OBR but Apache Karaf comes much more batteries-included .",
"Question : Started working on a new project and We are using Apache Karaf for running OSGi bundles . Some one suggested me to use Equinox instead of Felix inside Karaf . Please some body let me know if Equinox is better than Felix and if so what way . .. . Answer : A few years ago there were some stability issues that lead folks to recommend Equinox over Felix . Today I recommend using Felix since a good number of the Karaf ServiceMix committers also have the ability to make changes to Felix without having to wait for Equinox to make upstream changes . Latest check of Equinox website also seems to indicate that it is lagging Felix+Karaf a bit in terms of adopting the latest OSGi Enterprise specs .",
"Question : Apache Karaf http : karaf.apache.org is a sub project of Apache Felix http : felix.apache.org . It is defined as a lightweight OSGi container . I don t understand when should I use the heavyweight and when to use the lightweight . Their site doesn t explain this too much . .. . Answer : The lightweight OSGi container label is contrasting Karaf http : karaf.apache.org with more feature rich OSGi containers not with Felix http : felix.apache.org . To quote Guillaume Nodet Karaf s author from here http : gnodet.blogspot.com 2009 04 apache-karaf.html : .. . .. . Felix is just the OSGi core runtime . Karaf provides a distribution based on Felix by adding other features such as a console an SSH remoting mechanism a file deployer and more . In this diagram of the Karaf architecture Felix or other OSGi implementation - currently Equinox http : www.eclipse.org equinox is also supported is the OSGi box the other boxes are the features added by Karaf : .. . .. . Karaf Architecture https : unpocodejava.files.wordpress.com 2010 09 image00210.png Therefore unless you have specific needs which are not met by Karaf requiring access to the underlying implementation it usually makes sense to use this since it provides more out of the box . Comment : Thanks . That clears the confusion : Comment : Thanks great and clean explanation . Comment : One nice feature of any OSGi container is that you can select just the bundles you need and deploy them into your container . So my advice would be to first architect your application and then pick what you need . The advice to just install the whole platform because it is feature rich sounds a bit like going back to the huge Java EE application servers . Now I m not saying that Apache Karaf is anywhere near as big as those I am just making a point that you can and should just deploy what you actually need .",
"Question : I am a little bit confused about what Apache Karaf exactly is . Can you say that Apache Karaf includes amongst other things : .. . .. . Apache Felix which is an implementation of the OSGi 4.2 framework .. . Apache Aries which is an implementation of the Blueprint standard Comment : I ve been working with OSGi for nearly ten years and I also don t get the point of Karaf - Comment : Related question stackoverflow.com questions 1612120 http : stackoverflow.com questions 1612120 osgi-what-are-the-differences-between-apache-felix-and-apache-karaf .. . Answer : Apache Karaf is a swiss army knife to run OSGi stuff and non OSGi things bundled as OSGi . Felix and Aries are default but the frameworks are pluggable so equinox works as well . Unix like shell accessible from CLI or SSH .. . Hotdeploy of bundles .. . May deploy almost anything as a bundle plain .jar spring xml blueprint etc .. . WAR files .. . Deploy from maven - including autowrapping non OSGi bundles . Web Console .. . Karaf features - .kar files that includes bundles and custom karaf features commands . A side note is that Karaf is part of ServiceMix the initial name was ServiceMix kernel so it has very tight integration with Apache Camel Apache CXF and Apache ActiveMQ . Turning Karaf into an ESB with those features is trivial .",
"Question : In OSGi the resolution process of defined dependencies i.e . Package imports and exports is pretty strict when using version numbers and version ranges . If for some package import of version 1.2.3 no corresponding export with a range containing 1.2.3 is found the bundle cannot be resolved or started . This is good . However this does not seem to apply to the core package org.osgi.framework . Current versions of both Equinox 3.8.0 and Apache Felix 4.0.3 define org.osgi.framework version 1.7.0 as one of the exported packages . But a bundle requiring a specific lower version of this package e.g . Import-Package : org.osgi.framework version 1.3 is still resolved this to this newer version . I would expect the bundle not to get resolved . How can this behavior be explained Is this a misbehavior of the OSGi implementations An I missing an exception when resolving core OSGi packages Or is Karaf getting in the way here I tested this with Apache Karaf see below .. . .. . I know that I d rather not declare the version explicitly and that the version would result in a range which were perfectly resolvable . However there are bundles not under my control defining such imports namely : iPOJO see below . .. . .. . Some setup details : I tested this in Karaf 2.3.2 and 2.3.3 with Equinox or Felix enabled respectively . You can find a demo bundle I used for the tests over at github https : github.com BenjaminDebeerst test-import-framework-package which can be built as is and will show the failure when deployed to a fresh Karaf container . The reason I found this out is because the core iPOJO bundle http : mvnrepository.com artifact org.apache.felix org.apache.felix.ipojo 1.10.1 defines such explicit versions rather than ranges . I added this to a Karaf feature descriptor and tried to verify the feature export import integrity using the Karaf Features Maven Plugin http : karaf.apache.org manual latest-2.2.x developers-guide features-maven-plugin-validate.html which fails . .. . Answer : No package imports in OSGi are NOT repeat NOT treated differently . OSGi never makes exceptions for its own services or code it is completely symmetric . As BJ stated in his answer an import for version X is actually an import for X and anything higher .",
"Question : In OSGi the resolution process of defined dependencies i.e . Package imports and exports is pretty strict when using version numbers and version ranges . If for some package import of version 1.2.3 no corresponding export with a range containing 1.2.3 is found the bundle cannot be resolved or started . This is good . However this does not seem to apply to the core package org.osgi.framework . Current versions of both Equinox 3.8.0 and Apache Felix 4.0.3 define org.osgi.framework version 1.7.0 as one of the exported packages . But a bundle requiring a specific lower version of this package e.g . Import-Package : org.osgi.framework version 1.3 is still resolved this to this newer version . I would expect the bundle not to get resolved . How can this behavior be explained Is this a misbehavior of the OSGi implementations An I missing an exception when resolving core OSGi packages Or is Karaf getting in the way here I tested this with Apache Karaf see below .. . .. . I know that I d rather not declare the version explicitly and that the version would result in a range which were perfectly resolvable . However there are bundles not under my control defining such imports namely : iPOJO see below . .. . .. . Some setup details : I tested this in Karaf 2.3.2 and 2.3.3 with Equinox or Felix enabled respectively . You can find a demo bundle I used for the tests over at github https : github.com BenjaminDebeerst test-import-framework-package which can be built as is and will show the failure when deployed to a fresh Karaf container . The reason I found this out is because the core iPOJO bundle http : mvnrepository.com artifact org.apache.felix org.apache.felix.ipojo 1.10.1 defines such explicit versions rather than ranges . I added this to a Karaf feature descriptor and tried to verify the feature export import integrity using the Karaf Features Maven Plugin http : karaf.apache.org manual latest-2.2.x developers-guide features-maven-plugin-validate.html which fails . .. . Answer : In OSGi an import of version 1.3 is equivalent to version 1.3 . See section 3.2.6 Version Ranges . This is for historical reasons . You should always use complete version ranges in your import package statements .",
"Question : Hi i am trying to install the below dependency in karaf .. . .. . I am getting the below Exception .. . .. . I am trying to install some opendaylight features and one of the features internally uses this dependency . Am i missing out something please help . Comment : the error says it can t find native library for your processor os . What is the value of the properties org.osgi.framework.os.name and org.osgi.framework.os.processor you can see them with the command system : property Comment : org.osgi.framework.os.name window 8.1 org.osgi.framework.os.version 6.3.0 I can find the value for the property org.osgi.framework.os.processor Comment : The stacktrace is saying it is not able to find the dll . The dll is part of the dependency jar itself . java2s.com Code Jar l Downloadleveldbjniall17jar.htm http : www.java2s.com Code Jar l Downloadleveldbjniall17jar.htm . FYI i have taken the opendaylight karaf distribution . nexus.opendaylight.org content repositories https : nexus.opendaylight.org content repositories opendaylight.snapshot org opendaylight integration distribution-karaf 0.4.0-SNAPSHOT . .. . Answer : The bundle leveldbjni has a dependency on a native library . Native as in os dependent . In OSGi a bundle can declare several natives libraries and specify for each library when this library can be loaded . In your error you can see which library this bundle can load : .. . .. . windows32 leveldbjni.dll if processor x86 osname Win32 .. . windows64 leveldbjni.dll if processor x86-64 osname Win32 .. . osx libleveldbjni.jnilib if processor x86 osname macosx .. . osx libleveldbjni.jnilib if processor x86-64 osname macosx .. . linux32 libleveldbjni.so if processor x86 osname Linux .. . linux64 libleveldbjni.so if processor x86-64 osname Linux .. . .. . In your case osname Windows 8.1 so there is no library matching this name and the requirement fails . Each OSGi framework has a list of alias for mapping osname-s . It depends on your implementation and versions . For example the latest version of Equinox https : github.com eclipse rt.equinox.framework blob master bundles org.eclipse.osgi container src org eclipse osgi internal framework osname.aliases has this configuration : .. . .. . In Felix https : github.com apache-felix blob trunk framework src main resources default.properties L66 : .. . .. . I don t know which framework you use or which version but if you use Felix which is the default you can try to add-in the file etc system.properties : .. . .. . In Equinox this issue is tracked on Bug 423970 https : bugs.eclipse.org bugs show bug.cgi id 423970 . I don t know how to override these properties . Karaf 4 has a version of Equinox which should work . You can try maybe to override in etc system.properties the value of the os Honestly I don t know if it will work as this value should be discovered - and it s an ugly hack to hardcode this value Comment : In my karaf 4.0.3 i am not able to find this entry in system.properties . So should i add and see Comment : yes you should add it and see : - Comment : I have made the entry in system.properties . Karaf is still throwing the same error . Comment : I didn t see you use Equinox . This property is for Felix Comment : I am using felix only . i have checked etc config.properties karaf.framework felix",
"Question : Is anyone using Karaf instead of Servicemix If so how did you come to this decision I m aware that Servicemix adds a layer of functionality around Karaf just curious if Karaf is being used on its own and why.. . .. . Answer : We re using Karaf for a number of our applications . We were already using Camel JMS and Esper for integration between several different platforms a JBoss 4.2 instance a Tomcat and several Felix instances and as this was working well there was little justification in migrating this too which would have been cause to consider ServiceMix . The only reason we have some Felix nodes is that they re limited in use on client desktops rarely need get updated and I wanted the smallest footprint for these nodes . For anything OSGi on the serverside we re using Karaf . Karaf provides all of the features you d expect and need for a production environment see the apache-karaf tag s info http : stackoverflow.com tags apache-karaf info . We do our development and testing against standard minimal framework using pax-exam but deploy to Karaf . If you don t need an ESB JCA BPEL etc but want a solid tunable OSGi container then Karaf on it s own is more than adequate . And if you found yourself needing a limited subset of ServiceMix s functionality you can always install these in a Karaf instance . You can also customise the Karaf distribution http : karaf.apache.org manual 2.2.2 developers-guide custom-distribution.html as part of a maven build - personally I like have the container as part of the application s build as I can checkout build and run the entire setup from the command-line in minimal time . Recently there s a clustering subproject of Karaf called Cellar http : karaf.apache.org index subprojects cellar.html using HazelCast I not sure if this applies to ServiceMix too . Comment : +1 for the detailed response...thanks",
"Question : Chapter 126 of the OSGI Enterprise Release 5 specification http : www.osgi.org Download Release5 mentions compatibility : .. . .. . Support the traditional JNDI programming model used by Java SE and Java EE clients . and use of OSGI-unaware code : .. . .. . Clients and JNDI Context providers that are unaware of OSGi use static-methods to connect to the JRE JNDI implementation . The InitialContext class provides access to a Context from a provider and providers use the static NamingManager methods to do object conversion and find URL Contexts . This traditional model is not aware of OSGi and can therefore only be used reliably if the consequences of this lack of OSGi awareness are managed . but it is not clear to me if this text only applies to legacy code executed inside an OSGI bundle or also to code outside the OSGI container f ex in a scenario where the OSGI container is embedded in an application . In an embedding scenario there may be application code both outside and inside the OSGI container that performs JNDI calls and as they execute in the same JVM they will share JNDI implementation . Question : Should an OSGI JNDI implementation running in an embedded OSGI container allow OSGI-unaware code outside the container to perform its JNDI calls like usual or is some porting to OSGI-awareness required Trying this out myself with Apache Karaf 2.3.0 which uses Apache Aries JNDI 1.0.0 this doesn t seem to work as Apache Aries requires JNDI client calls to originate from an OSGI bundle . Partial stacktrace : .. . .. . Question : Is this correct behaviour or is there a section of the specification I can refer to that is violated by this limitation .. . Answer : I ran into same issue when trying to deploy Apache Karaf on Weblogic . We use karaf through a servlet bridge - a war is deployed in weblogic which bridges all http requests to karaf . I am running with the the following applications on weblogic : .. . .. . 1 . app1 uses JNDI .. . 2 . app2 .. . 3 . karaf-bridge bridges requests to Karaf .. . .. . As soon as karaf starts the Aries JNDI implementation running inside Karaf sets InitialContextFactoryBuilder inside javax.naming.NamingManager to its own implementation . NamingManager holds a static reference to the initial context factory builder so whichever implementation irrespective of whether its running in an OSGI environment sets this static reference becomes the JNDI provider . In my case-when app1 non-OSGI tries to do a new InitialContext Aries JNDI tries to resolve it using the BundleContext and fails . I fixed this using some very ugly hacks that involved extracting the javax.naming package from jre and installing it as a bundle in karaf . So the answer to your question : I think the issue is really in the jre and not with OSGI on how JNDI lookup is managed .",
"Question : I am getting uses constraint violation as below while installing a feature in Apache Karaf karaf framework is felix and version is 4.2.1 .. . .. . could not be resolved . Reason : Package uses conflict : Import-Package : org.apache.http.entity version 0.0.0 .. . .. . After googling came to know that Dependency Chain can help in root causing the issue . but I do not know the steps to follow to get this dependency chain printed in the logs or osgi console .. . .. . Example Dependency chain is given in the below URL : Dependency chain conflicts for Hibernate and Apache Felix http : stackoverflow.com questions 23495147 dependency-chain-conflicts-for-hibernate-and-apache-felix .. . .. . Thanks in advance .. . Answer : If you use the felix framework this should be printed either on the console and or in the logfile while starting the bundle . With Karaf you also can take a look at bundle : tree-show bundle-id . This will show you all bundles your bundle depends on . Comment : Hi Achim thanks for the reply.. . Karaf version used is 3.0.1 which is bundled with felix frame work 4.2.1 and is enabled using etc config.properties . Still I could not see the chain printed either on the console log file . Not sure this version of felix framework supports dependency chain feature or not . Is there any way to upgrade this felix to latest 4.6.0 bundle : tree-show and dependency chain gives the same information Comment : Actually there shouldn t be any need to upgrade to a newer version as the one used in Karaf 3.x is already up to-date . Another thing what kind of bundle are you installing here Looks like you re trying to use the felix http-service . If you just install the http or war feature you ll install the karaf supported Pax Web project .",
"Question : I got this error when I tried to deploy a bundle that uses Compendium service : .. . .. . My bundle is configured so it uses : .. . .. . And acording to karaf 4 depts documenation http : karaf.apache.org index documentation karaf-dependencies karaf-deps-4.0.x.html . Osgi Compendium version is 5.0.0 . Does this means that I need to provision to karaf compendium jar manually is there any karaf feature contain Compendium Services .. . Answer : I found a quote from Jean-Baptiste Onofr .. . .. . Hi Bob .. . .. . Karaf 3.0.0 already use and ship org.osgi.core and org.osgi.compendium . .. . So yes you can use 5.0.0 for core compendium and enterprise . .. . Regards JB .. . .. . Telling that Karaf ships osgi compendium . I had a conflict in my pom.xml after the migration to version 5.0.0 and I didnt notice before . Comment : Christian is right that you should NEVER install compendium or enterprise JARs in your runtime .",
"Question : Apache Karaf http : karaf.apache.org is a sub project of Apache Felix http : felix.apache.org . It is defined as a lightweight OSGi container . I don t understand when should I use the heavyweight and when to use the lightweight . Their site doesn t explain this too much . .. . Answer : @Marcel Karaf isn t monolithic or huge like a Java EE server . It is a very slim and minimalist implementation . It is a core product without much functionality other than a basic console file loading so that you can actually read configuration-files etc . The latest zip file of it is 19.1 MB . Yeah . Small . It can easily run on small devices and work in embedded . What you may be thinking of is something more like ServiceMix which uses Karaf as a core kernel . But it includes CXF ActiveMQ Camel and other libraries in its full configuration . Even then they have minimal medium and full sizes . Really for 99 of the projects out there it wouldn t make sense to start directly with Felix and not use Karaf instead .",
"Question : I am trying to use Karaf and I was wondering if it is possible to configure it to pull the transitive dependencies from the Apache Maven Central repository . Without having to use embedded bundles .. . .. . I already know you can pull explicit dependencies the key part of the the question is the transitive ones . I also know you can use OBR to read from a repository.xml file in a deployed site but I can t find one for Maven central . A possible answer to the question would be to add the URL but I can t find it documented anywhere what the repository.xml URL is . At the moment my work around is to figure out what the dependencies are and explicitly add them to the .. . .. . Embedded bundles do not work with the Karaf OSGi blueprint implementation it just waits for something that won t exist . I also find it ugly to have to do that . Another possible answer I can think of for this question is if there were instructions to create a package that can be deployed to any OSGi container not just Karaf using KAR files that contains all the necessary dependencies . .. . Answer : As far as I know the best you can do is use Maven to download all the dependancies and then use the Felix bnd plugin http : felix.apache.org site apache-felix-maven-bundle-plugin-bnd.html to convert your local or remote repository into an OBR that you can use with Karaf . Comment : Any example of how to do this conversion Comment : @ArchimedesTrajano The link I provided goes into some examples . It s basically a matter or setting up the pom file with some additional details again see the link and then running mvn clean install or mvn clean deploy Comment : I did see the link earlier on and the examples only show how to install the bundle for the pom in question it does not show you how to include the transitive dependencies . Comment : hence why I am asking for an example .",
"Question : I am looking into ways to deploy and update an OSGI Karaf specifically application . It seems that there are several options . One is to use The OSGi Bundle Repository OBR another is to use Features in Karaf and the third is to use Karaf Cave http : karaf.apache.org index subprojects cave.html . I m not really sure how these options are really different . They all seem to be doing the same things . Are they just different implementations of the same functionality Could someone please explain the differences or provide some recommendations .. . Answer : Karaf features and OBR are different ways of solving the sort of same problem . Both allow you to install OSGi bundles into an OSGi framework but how they decide which bundles to install is different . With a Karaf feature you provide a file feature.xml say which explicitly lists URLs for all the bundles for the feature . They can live on the filesystem or in a maven repository or anywhere else which can be described by a URL . OBR on the other hand works out what bundles to work out based on requirements and capabilities . It will work out the transitive dependencies of whatever you re installing as your starting point and make sure they all get installed . Usually you d configure one or more external repositories which support the OBR format and then an OBR resolver in your runtime would provision bundles from those repositories . So you can say I need package org.foo or I need an OSGi service which implements org.bar and the provisioner will decide which bundles best suit your requirements . OBR is more flexible and generic than Karaf features but it might be overkill if you re just installing a well-defined set of bundles into a framework which is already primed with the infrastructure you need . It also doesn t help you if the bundles which make up your application don t have dependencies on each other - you ll still need to include them all in your starting set . The distinction gets a bit blurred because Karaf features allow you to specify version ranges in the maven URLs so even with a feature you can be a bit flexible in what gets provisioned . Karaf features also have an interoperability with OBR so you can write your feature definition file in terms of OBR requirements . I believe Karaf Cave is an OBR implementation with some feature-features . So it s a server rather than a new technology like features or OBR provisioning . -- Enterprise OSGi in Action : http : www.manning.com cummins Comment : self-advertising the right way good answer thanks",
"Question : I got this error when I tried to deploy a bundle that uses Compendium service : .. . .. . My bundle is configured so it uses : .. . .. . And acording to karaf 4 depts documenation http : karaf.apache.org index documentation karaf-dependencies karaf-deps-4.0.x.html . Osgi Compendium version is 5.0.0 . Does this means that I need to provision to karaf compendium jar manually is there any karaf feature contain Compendium Services .. . Answer : The compendium and core jars contain the OSGi APIs . They are only to be used at build time . Do not install these into OSGi . The core APIs are all implemented by the OSGi framework bundle . The compendium as well as the enterprise API bundles contain too many different APIs to be useful at runtime . If you install them they can cause trouble by conflicting with other API versions installed . Instead you need to provide a bundle that implements the API . This bundle then either embeds the API package it implements or you additionally need to install an API bundle that contains only this API package . In you case you need to install the scr feature which implements the declarative-services spec . Comment : Hi Christian I am working on a UPnP OSGi implementation . So far I was installing the osgi-compendium.jar manually included in my feature . Do you mean that it is best to add the UPnP OSGi API inside my bundle Comment : You can embed the api package but I would prefer to install this bundle search.maven.org http : search.maven.org artifactdetails 7Corg.osgi 7Corg.osgi.service.upnp 7C1.2.0 7Cjar Comment : Appreciate your advice I will follow it . Thanks very much for your answer",
"Question : null .. . Answer : We are trying to connect with the HDFS using kerberos from Karaf container by OSGI bundle . We have already installed the hadoop client in karaf using apache servicemix bundles . Pom file is attached below : .. . .. . Code Snippet : .. . .. . Error : Comment : I don t think this is related to OSGi have you tried in a non-OSGi environment Comment : Yes . It is working Comment : Can you add the debug logging output Be sure to also check any files that karaf would be sending stdout to .",
"Question : Is anyone using Karaf instead of Servicemix If so how did you come to this decision I m aware that Servicemix adds a layer of functionality around Karaf just curious if Karaf is being used on its own and why.. . .. . Answer : Karaf s life started as the ServiceMix core . Currently ServiceMix is really a set of bundles that are deployed into a Karaf container . ServiceMix has a number of very handy bundles which do a lot of cool stuff that karaf doesn t . That said the two primary reason for using ServiceMix is if you want : 1 an ESB 2 NMR a feature that allows you to community between bundles AND instances of Karaf . This all said the ServiceMix group is currently planning version 5 which will remove the ESB and NMR features and will be focused on being a management container for Camel . In ESB s a great deal of effort when into creating components that could be described using BPL Business Process Language . However the folks that wrote ServiceMix began to focus on the implementation of EIP s Enterprise Integration Patterns which largely does the same stuff as BPL but does it in a more standardized and accepted manner . This work was done under the Camel project . So in short . If you are using ServiceMix 4+ you re also using Karaf . If you want a more robust integration environment the environment of choice today in the Apache Felix world at least is Karaf Camel and a few bundles from Servicemix . Comment : Does Karaf come with a SOAP engine for web-services I know I can add CFX to get that . I m wondering if that comes with ServiceMix .",
"Question : null .. . Answer : Good day . I am trying to get the benefits of OBR in my application . I took Karaf Cave 4.0.0 as OBR implementation and org.apache.felix.bundlerepository 2.0.4 as OBR client . I successfully configured the repository itself but I can t properly use it . The problem is : when I install the bundle via OBR and all its dependencies are already installed in OSGI runtime it is installed successfully . But if some of the requirements are missing I got an Unsatisfied requirements error which is odd since I know for sure that all the resources which resolves these requirements are present in the OBR descriptor and all links to them are valid . Why aren t they resolved automatically How to configure OBR client to work with Karaf Cave I also tried OBR implementation from Sonatype Nexus OBR plugin and found out that the OBR descriptor generated by Cave and the one generated by Nexus are differ . Moreover : .. . .. . the one generated by Cave is OSGI compendium spec compliant .. . the one generated by Nexus is not but works like a charm with org.apache.felix.bundlerepository - the problem is not reproduced . I am completely confused . The step sequence to reproduce the problem reproduced on Apache Karaf 4.0.0 : .. . .. . 1 Installing Karaf Cave : .. . .. . 2 Creating a cave repository : .. . .. . On this step I am able to successfully retrieve an OBR descriptor from http : localhost : 8181 cave http test-repository.xml .. . .. . 3 Install the OBR client and register test cave repository from Karaf : .. . .. . 4 Try to deploy some OBR resources with obr : deploy Comment : I have the same problem with a vanilla Felix 5.4 installation . Trying to obr : deploy a bundle from my repo fails with Unsatisfied requirement s unless I first deploy its dependencies located in the same repo . My repo also uses the OSGi Repository Specification format as opposed to the proprietary Felix OBR format .",
"Question : I have two features that are using antlr4-runtime but different versions of it . In runtime classes for antlr are loaded from 4.5.3 version for both features . Can we configure karaf somehow to use one version of same library for one feature and the other for second feature .. . Answer : There is no need to do explicit configuration for the Karaf container . While constructing a bundle you need to mention the specific versions antlr bundle in the consuming bundle the one which uses . Since karaf OSGi container accepts deployment of same bundle with different versions . This is one of the major advantage of OSGI containers .",
"Question : I am trying to use Karaf and I was wondering if it is possible to configure it to pull the transitive dependencies from the Apache Maven Central repository . Without having to use embedded bundles .. . .. . I already know you can pull explicit dependencies the key part of the the question is the transitive ones . I also know you can use OBR to read from a repository.xml file in a deployed site but I can t find one for Maven central . A possible answer to the question would be to add the URL but I can t find it documented anywhere what the repository.xml URL is . At the moment my work around is to figure out what the dependencies are and explicitly add them to the .. . .. . Embedded bundles do not work with the Karaf OSGi blueprint implementation it just waits for something that won t exist . I also find it ugly to have to do that . Another possible answer I can think of for this question is if there were instructions to create a package that can be deployed to any OSGi container not just Karaf using KAR files that contains all the necessary dependencies . .. . Answer : You can use the karaf-maven-plugin to create a feature file from maven dependencies . This will resolve transitive dependencies . Comment : again I ask for an example when I did this yesterday I just get NullPointerExceptions . Also my question text explicitly states that I am looking for something that will work in ANY OSGi container not just Karaf Comment : Can you post your sample project somewhere I can then take a look at it and check why you get a Nullpointer exception . This could mean that there is a bug somewhere . As far as I know there is no container independent answer to this problem . Please also check that you use the most current version of Karaf . For an example you can look at the karaf source code in assemblies features . It uses the karaf maven-plugin to create its own features . Comment : github.com trajano maven-jee6 tree emerging-technologies https : github.com trajano maven-jee6 tree emerging-technologies hello-osgi Comment : actually for container independence I would think OBR would do it but I haven t found a way to create an OBR repository with the transitive dependencies just specific bundles . Comment : feel free to fork an answer :"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
implementation
|
UNK_RELATION
|
visual-studio-extensions@visual-studio@106
|
visual-studio-extensions -- products and extensions for visual-studio which help you get the most out of @placeholder .
|
{
"confidence": [
57.775611877441406,
51.05724334716797,
48.82426071166992,
46.3094482421875,
46.21029281616211,
44.883201599121094,
44.75971221923828,
44.730464935302734,
44.20526885986328,
44.0951042175293,
43.540706634521484,
43.44098663330078,
43.25767135620117,
43.25767135620117,
42.92720031738281,
42.357872009277344,
42.07373046875,
42.07373046875,
42.07373046875,
41.73137664794922,
41.73137664794922,
41.73137664794922,
41.33893966674805,
41.33893966674805,
41.20800018310547,
40.833282470703125,
40.38987731933594,
40.29812240600586,
40.17524719238281,
39.93882369995117,
39.89243698120117,
39.817115783691406,
39.55891799926758,
39.55891799926758,
39.5274658203125,
39.498390197753906,
39.498390197753906,
39.43536376953125,
39.43536376953125,
39.43536376953125,
39.43536376953125,
39.43536376953125,
39.43536376953125,
39.43448257446289,
39.39960861206055,
39.17298889160156,
39.151241302490234,
38.77510070800781,
38.480445861816406,
38.22885513305664,
38.22885513305664,
38.22885513305664,
38.10252380371094,
38.035247802734375,
37.9422607421875,
37.32172393798828,
37.308128356933594,
37.20237731933594,
37.20237731933594,
37.20237731933594,
37.20237731933594,
37.20237731933594,
37.20237731933594,
37.20237731933594,
37.20237731933594,
37.20237731933594,
37.20237731933594,
37.20237731933594,
37.20237731933594,
37.20237731933594,
37.20237731933594,
36.983577728271484,
36.72248840332031,
36.61824035644531,
36.61824035644531,
36.325279235839844,
36.325279235839844,
36.325279235839844,
36.325279235839844,
36.325279235839844,
36.325279235839844,
36.325279235839844,
36.325279235839844,
36.325279235839844,
36.325279235839844,
36.325279235839844,
36.325279235839844,
36.325279235839844,
36.325279235839844,
36.27402877807617,
36.25147247314453,
35.96562957763672,
35.96562957763672,
35.80226135253906,
35.80226135253906,
35.75587463378906,
35.70709991455078,
35.67450714111328,
35.5478515625,
35.5478515625
],
"content": [
"Is this possible with Visual Studio extensions",
"Visual Studio Extensions can be debugged like any other application .",
"Does opening the Updates section of Extensions and Updates not force Visual Studio to check",
"The question is What are exact limitations for installing extensions in Visual Studio 2010 Express",
"One of the extensions listed in Visual Studio 2012 for me is the Microsoft Advertising SDK for Windows 8.1 .",
"How can I get a list of all installed Visual Studio extensions programatically",
"I ve written a Visual Studio extension and am updating it in the Visual Studio Gallery .",
"Proper support for extensions require a Community version of Visual Studio which is free like Express .",
"alternativeto.net software ultra-find-for-visual-studio http : alternativeto.net software ultra-find-for-visual-studio",
"Not trying to be snarky but did you click on the visual-studio-extensions tag you tagged this question with",
"For normal Vsix extensions you d just be able to use .. . .. . for people stumbling onto this question looking to install a normal extension .. . .. . For a normal Visual Studio Extension you can use : .. . .. . After installing Visual Studio to the machine you can use the vsixinstaller.exe that lives in the visual-studio installation folder to install extensions .",
"What visual Studio version",
"Running Visual Studio 2013 I m trying to debug a Visual Studio project template as well as a visual-studio extension .",
"Is there a way to import export Visual Studio settings via a Visual Studio Extension i.e . via the Visual Studio API",
"What happened to the Visual Studio extension for Ultra Find",
"http : www.larswilhelmsen.com 2012 01 08 syncing-visual-studio-extensions-and-settings-with-dropbox .. . .. . Which looked like a perfect solution except in 2013 2013 the extensions location must have changed and I cannot find them .",
"I would like to run a script after files with certain extensions are saved in visual-studio .",
"Can anyone point me in the right direction in terms of API documentation for visual-studio-extensions .",
"My VSIX shows up in the Online section of Extensions and Updates in Visual Studio 2012 and I can install it from there :",
"Tried uninstalling whole visual studio. .",
"This is now available in Visual Studio 2015 .",
"Restart Visual Studio 2012 .. . 9 .",
"I m trying to develop a plugin for Visual Studio 2015 .",
"I develop the Visual Studio package with a tool window .",
"Restarting Visual Studio .. . 5 .",
"Is there some interval at which Visual Studio checks for updates",
"I am trying to get started in Visual Studio 2010 extensions and I am having a hard time finding the right materials .",
"Too bad but at least that rules out the entire enormous Visual Studio codebase .",
"That s reinforced here https : visualstudiomagazine.com articles 2014 05 21 no-extensions-for-visual-studio-express.aspx and it seems to be from the perspective of someone installing the extension .",
"You will need to deploy your extension somewhere that Visual Studio knows about .",
"Not a dumb question : We already update the version number but for visual-studio to actually see that new version it has to be deployed somewhere that visual-studio can find it .",
"I m writing Visual Studio extension with command in the Solution Explorer .",
"I need to create a setup-project using WiX to deploy two Visual Studio Extensions vsix .",
"It therefore cannot be said that the express editions of Visual Studio do not support installing Extensions or Add-Ins .",
"I ve followed the instructions given here http : stackoverflow.com questions 9281662 how-to-debug-visual-studio-extensions but when the new instance of Visual Studio launches I get : .. . .. . Microsoft.VisualStudio.ExtensionManager.NotInstalledException was unhandled Message : An unhandled-exception of type Microsoft.VisualStudio.ExtensionManager.NotInstalledException occurred in mscorlib.dll .. . .. . I ve tried disabling all Visual Studio Extensions that can be - that didn t help .",
"Details of Visual Studio .. . .. . Update .. . .. . 1 .",
"Is there a Visual Studio interface that returns this information",
"Is there an easier way to do this in Visual Studio 2015",
"I m talking about a visual-studio extension .",
"I m using Visual Studio 2015 and I m not seeing it .",
"Create a New Project in Visual Studio 2012 .. . 2 .",
"Note OutputWindowHelper does not exist in Visual Studio 2015 .",
"Look for CodeSense .dll in the visual-studio directory for hints .",
"The problem caused by Microsoft Azure HDInsight Tools for Visual Studio which is new release and possible not compatible with Visual Studio 2012 however installs into the Visual Studio 2012 and causing problems at start .",
"Do these steps : .. . .. . 1 - Close Visual Studio .. . .. . 2 - Reset the Visual Studio SDK experimental instance : find the Microsoft Visual Studio 2012 Microsoft Visual Studio SDK Tools folder and then select Reset the Microsoft Visual Studio 2012 Experimental instance . .. . .. . 3 - Open your project in Visual Studio .",
"For The Update Cycle my experience : .. . .. . It checks on start of the Visual Studio once Daily if in Option enabled .. . It checks every time you open the Extensions and Updates .",
"We can all vote for the feature in Visual Studio here : visualstudio.uservoice.com forums 121579-visual-studio-2015 https : visualstudio.uservoice.com forums 121579-visual-studio-2015 suggestions 2907413-add-exclude-files-to-the-look-in-options-under Doooooo it",
"For Visual Studio 2015 Version 14.0 this is how to get information about the user that is currently signed in in Visual Studio .",
"I need the one for my current Visual Studio instance I run 3-4 instances of Visual Studio at a time .",
"I m developing a language service for Visual Studio through a VSPackage .",
"I use it to script the cleanup as post visual-studio install .",
"I m developing a Visual Studio extension that adds a window to the Team Explorer .",
"This question already has an answer here : .. . .. . Restrictions on installing extensions or add-ins in Visual Studio 2010 Express questions 7940249 restrictions-on-installing-extensions-or-add-ins-in-visual-studio-2010-express 1 answer .. . .. . I downloaded an extension that adds indent guides but when I try to install it I get an error saying this extension cant be installed on any currently installed programs .. . .. . The extension http : indentguide.codeplex.com releases view 110312 is supposed to work on Visual Studio 2010 .",
"You could write a Visual Studio 2012 extension to accomplish this",
"I recently added some extensions to Visual Studio 2015 Community and since then I experience this error message when I load a solution : .. . .. .",
"Therefore my question is how I can find out that Visual Studio theme color has been changed",
"I m writing a Visual Studio Extension VSPackage which interacts with the Entity Framework .",
"I am developing an extension for visual-studio with adornment .",
"Visual Studio 2015 is regularly becoming odd .",
"Question Is there an easy way in Visual Studio e.g .",
"I am developing a Visual Studio extension package .",
"I m targeting Visual Studio 2013 SDK .",
"This is my first attempt at using the Visual Studio SDK .",
"I have been in the wrong visual-studio folder .",
"If not Visual Studio don t load your TestContaineDiscoverer .",
"At the same time Visual Studio 2013 is not affected .",
"I am developing a Visual Studio Extension .",
"This is in reference to writing a Visual Studio extension or MEF .",
"The version of Visual Studio is too old incompatible .",
"This results in a great many Visual Studio warnings .",
"Is there a Visual Studio extension that will automate this cleanup operation for me",
"Is there an equivalent extension for Visual Studio 2010",
"Does anyone know why my Productivity Power Tools both on Visual Studio Professional 2012 AND Visual Studio Community 2013 is disabled and won t get enabled",
"After that you need to restart visual-studio .",
"You can do this from within Visual Studio .",
"Does resetting the Experimental Instance of Visual Studio count as cleaning all the caches",
"Does this happen when installing your extension in a fresh install of Visual Studio",
"I m loading the dynamic items for this button when Visual Studio starts .",
"I m writing a visual-studio extension using c that creates a toolwindow .",
"The toolwindow still shows up after exit and reopen visual-studio .",
"Is there a way make sure the toolwindow does not show up on reopening visual-studio",
"Might not be a terrible thing to suggest on the Visual Studio uservoice either .",
"I could then make an extension and post it on the Visual Studio Gallery .",
"Choose Templates - Other Project Types - Extensibility - Visual Studio Add-in .. . 3 .",
"Hotkey GUID generation and a little bit of Visual Studio Add-in know how .",
"This tells Visual Studio to use the experimental hive instead of the normal configuration hive .",
"I am wanting to write an addition to intellisense in Visual Studio .",
"Any way to catch test events inside a Visual Studio Addin",
"Question : Does anyone know how to extend CodeLens in Visual Studio",
"Is there any support for integrating into Visual Studio s built-in Extensions and Updates UI to handle updates for my VSIX",
"You can test this primary version without VSix : Go to Visual studio Test extension folder C : Program Files x86 Microsoft Visual Studio 12.0 Common7 IDE CommonExtensions Microsoft TestWindow Extensions for VS 2013 and add your DLL and dependencies .",
"So i installed Visual Studio 2012 and Visual Studio SDK 2012 and created a new VS Package project .",
"I m using MEF to write a Visual Studio extension using Visual Studio 2012 Pro .",
"You can implement an IIntellisensePresenterProvider using the Visual Studio SDK .",
"Also what is your minimum version of Visual Studio you need to target",
"Concord is used as the debug engine for native debugging from Visual Studio 2012 forward and for all debugging in Visual Studio 2013 forward .",
"I suggest you request it on the VS User Voice site and or send-a-frown inside vs visualstudio.uservoice.com forums 121579-visual-studio http : visualstudio.uservoice.com forums 121579-visual-studio",
"Express supports some types of extensions as described in this answer http : stackoverflow.com questions 7940249 restrictions-on-installing-extensions-or-add-ins-in-visual-studio-2010-express by Mark Hall : .. . .. . The Express SKUs only support installation of extensions that are classified as Templates or Template Wizards and Controls .",
"I am using Visual Studio Community 2015 and while installing or updating any extensions it creates multiple VSIXInstaller processes and then entire system hangs in a few minutes .",
"Problem .. . .. . I have a work computer a home computer a surface and maybe some Azure VMs that i d like my visual-studio-2013 extensions synced across them ."
]
}
|
{
"confidence": [
56.014583587646484,
54.00846862792969,
51.860023498535156,
51.74497985839844,
51.46827697753906,
51.38914489746094,
51.35836410522461,
49.4742431640625,
47.984474182128906,
47.01976776123047,
46.938724517822266,
46.885887145996094,
46.39301681518555,
45.7763671875,
45.68617248535156,
45.65203094482422,
45.395973205566406,
45.39188003540039,
44.93606948852539,
44.297298431396484
],
"content": [
"Question : null .. . Answer : Running Visual Studio 2013 I m trying to debug a Visual Studio project template as well as a visual-studio extension . I ve followed the instructions given here http : stackoverflow.com questions 9281662 how-to-debug-visual-studio-extensions but when the new instance of Visual Studio launches I get : .. . .. . Microsoft.VisualStudio.ExtensionManager.NotInstalledException was unhandled Message : An unhandled-exception of type Microsoft.VisualStudio.ExtensionManager.NotInstalledException occurred in mscorlib.dll .. . .. . I ve tried disabling all Visual Studio Extensions that can be - that didn t help .",
"Question : This question already has an answer here : .. . .. . Restrictions on installing extensions or add-ins in Visual Studio 2010 Express questions 7940249 restrictions-on-installing-extensions-or-add-ins-in-visual-studio-2010-express 1 answer .. . .. . I downloaded an extension that adds indent guides but when I try to install it I get an error saying this extension cant be installed on any currently installed programs .. . .. . The extension http : indentguide.codeplex.com releases view 110312 is supposed to work on Visual Studio 2010 . Is it because I have VB 2010 Express and not VB 2010 Professional I would really appreciate it if someone could help me fix this so I can get these very helpful indent guides in VB . .. . Answer : Proper support for extensions require a Community version of Visual Studio which is free like Express . Express supports some types of extensions as described in this answer http : stackoverflow.com questions 7940249 restrictions-on-installing-extensions-or-add-ins-in-visual-studio-2010-express by Mark Hall : .. . .. . The Express SKUs only support installation of extensions that are classified as Templates or Template Wizards and Controls . .. . The Express SKUs do not support tool extensions . Which is anything that doesn t fall into one of the other categories Template or Control . .. . VSIX files are marked via the manifest as to which applications they are compatible and can be installed . Comment : In my Visual Studio 2010 Express I can open the Extension Manager . Comment : @Alex dlc I added some information regarding extension support in Express edition .",
"Question : We have a Visual Studio extension currently installed with MSI since we need to perform certain tasks after the installation ngen registering certain COM servers etc . In the end of the installation we run devenv.exe setup more specifically devenv.exe setup nosetupvstemplates to make it a bit faster to register the extension in Visual Studio 2012 and above in 2010 this step was not required since VS2010 would rebuild the extensions cache on every startup . We re currently looking to move to a partial VSIX installation but there are certain issues : .. . .. . 1 . We have a certain folder structure additional bundled tools . I wasn t able to find an option to include arbitrary folders and files with in VSIX package . Is this possible 2 . We re trying to avoid using devenv.exe setup since in rare cases this may cause extensions not to load as detailed by Remco Mulder on the MSDN forums http : social.msdn.microsoft.com Forums en-US c483d83f-d640-4fe9-8ff7-af78d635df23 visual-studio-extension-caching-preventing-extensions-from-loading forum vsx . 3 . We still need to perform post-installation operations currently not possible with VSIX . 4 . Due to previous sins we hardcoded some of the paths to use the CompanyName ProductName Version format that the VSIX packages used to follow but it seems that VSIX randomy generate a folder name now as Jason mentions in his answer below . So what I d essentially like is to be able to install an unpacked VSIX package - have the MSI installer create the file structure on disk in the correct location VSInstallDir Common7 IDE Extensions Company Product Version and then somehow to have VSIX consume the .vsixmanifest file to register the extension in Visual Studio . Initial digging into the Extension Manager API shows there s a method called CreateInstalledExtension in ExtensionManagerService that takes in a path to vsixmanifest in assembly Microsoft.VisualStudio.ExtensionManager.Implementation.dll but unfortunately it is internal . So without resorting to API hackery is there any alternative way to essentially install an extension in Visual Studio 2012 and above without using devenv setup Comment : If you set InstalledByMSI true InstalledByMSI in the source.extension.vsixmanifest and then unpack the files from the .vsix file to the Extensions folder does it work if you omit the call to devenv setup Comment : Yes our vsixmanifest has InstalledByMSI set to true . Per Ed Dore s blog in VS2012+ extensions are not being re-cached by default blogs.msdn.com b dsvst archive 2012 10 08 http : blogs.msdn.com b dsvst archive 2012 10 08 your-vs-package-may-not-load-after-porting-it-to-vs-2012.aspx Comment : Is it possible to launch the VSIXInstaller.exe quiet vsix path instead of unpacking the VSIX manually Comment : @280Z28 I m currently looking into that . There s an issue with a randomly generated folder name as Jason mentions in his answer below.. . it doesn t seem to be using the company product name . .. . Answer : As Jason and everyone else suggests - yes the correct supported way of registering a Visual Studio package externally is by running devenv.exe setup and for the most part - it works without problems albeit slow due to entire Visual Studio configuration being rebuilt . This is a commercial product and every once in a while we get a support case complaining that after installing our extension something bad happened in Visual Studio - other extensions failed to load problem with Solution explorer etc . Those cases are rare but they do happen . In an attempt to minimize the impact installing our extension does to the user s machine I was trying to find a suitable way to use the VSIX installation mechanism that does not use devenv.exe setup but unfortunately there isn t a supported scenario that handles all the issues I ve raised in the question above . After extensive research into the problem I found http : blogs.clariusconsulting.net kzu how-to-install-a-visual-studio-extension-with-templates-via-an-msi an undocumented unsupported solution that solves the problem completely An empty file called extensions.configurationchanged located under VSInstallDir Common7 IDE Extensions gets touched http : en.wikipedia.org wiki Touch 28Unix 29 every time a VSIX package is installed or uninstalled causing Visual Studio to refresh it s package cache only on next restart With modifying this file s last modified date it will essentially cause Visual Studio to act as-if a VSIX package was just installed or uninstalled . A few quick experiments of copying the extension files to an empty hive and then touching the extensions.configurationchanged will cause Visual Studio to load the extension and process all its .pkgdef files on next restart - no devenv setup necessary Several commercial products offer this solution in the Troubleshooting section of their online help dealing with loading failure of their extension so this solution might be the lesser evil I was looking for . Use at your own risk .",
"Question : I installed MSVC++ 2010 Express and trying to figure which extensions vsix are available to install . There are some extensions in the Extension Manager section Online Gallery . All of them from Visual Studio Gallery http : visualstudiogallery.msdn.microsoft.com . To be sure I installed some extension http : visualstudiogallery.msdn.microsoft.com 9df9c61c-4d90-43e5-9aa1-a58786b7a1e4 . It therefore cannot be said that the express editions of Visual Studio do not support installing Extensions or Add-Ins . At first I decided that Visual Studio Gallery is the place for allowed extensions . I downloaded from there PowerConsole http : visualstudiogallery.msdn.microsoft.com 67620d8c-93dd-4e57-aa86-c9404acbd7b3 extension and tried to install it . However I got message box with following text : .. . .. . Visual Studio Extension Installer .. . This extension is not installable on any currently installed products . The question is What are exact limitations for installing extensions in Visual Studio 2010 Express .. . Answer : Take a look at this article http : www.go4answers.com Example installing-vsix-file-vb2010-express-5068.aspx . In summary from above article : .. . .. . The Express SKUs only support installation of extensions that are classified as Templates or Template Wizards and Controls . The Express SKUs do not support tool extensions . Which is anything that doesn t fall into one of the other categories Template or Control . VSIX files are marked via the manifest as to which applications they are compatible and can be installed . Comment : Does this mean that careful editing of the manifest can change where they can be installed Comment : According to the quoted article it seems like it is a limitation of the express editions not being able to load tool extensions . The manifest would be for a template or controls that the author was restricting .",
"Question : I m sure this is a common problem but I can t find much info about it . Problem .. . .. . I have a work computer a home computer a surface and maybe some Azure VMs that i d like my visual-studio-2013 extensions synced across them . I seem to have to refresh wipe a computer fairly often and re-installing all the extensions I like to use is sort of a pain . I initally thought the new VS Profiles would do this but apparently they only sync themes general settings . Attempted Outdated Solutions .. . .. . There used to be an extenstion that apparently did this Extension Sync http : visualstudiogallery.msdn.microsoft.com dbaf0ac9-fb7b-4fb3-b34d-ea2269276d3c .. . .. . But that looks like it s only for VS 2010 . There was also a blog post that showed the location that the extensions were saved in . http : www.larswilhelmsen.com 2012 01 08 syncing-visual-studio-extensions-and-settings-with-dropbox .. . .. . Which looked like a perfect solution except in 2013 2013 the extensions location must have changed and I cannot find them . Question .. . .. . Does anyone know how I could sync my extensions across multiple machines Or possibly know the location that the Extensions are stored in and if it s possible to change that location to something like Dropbox Skydrive Google Drive Comment : Syncing Extension via some sort of file sync would not work . There are also bits of metadata stored in other files and in the registry that would get out of sync . .. . Answer : There s something called the User State Migration Tool that is intended for preserving state in corporate PC desktop deployments for wipe-and-load similar to your Azure scenario . If you know something about the way the extension settings are saved as shown in the blog it s not too hard to construct an XML descriptor and use the deployment tool to apply the settings . The tool is command-line so it is easily automated . http : technet.microsoft.com en-us library hh825142.aspx .. . .. . This solution has increasing value when you have more than just Visual Studio to migrate into your VM .",
"Question : I m sure this is a common problem but I can t find much info about it . Problem .. . .. . I have a work computer a home computer a surface and maybe some Azure VMs that i d like my visual-studio-2013 extensions synced across them . I seem to have to refresh wipe a computer fairly often and re-installing all the extensions I like to use is sort of a pain . I initally thought the new VS Profiles would do this but apparently they only sync themes general settings . Attempted Outdated Solutions .. . .. . There used to be an extenstion that apparently did this Extension Sync http : visualstudiogallery.msdn.microsoft.com dbaf0ac9-fb7b-4fb3-b34d-ea2269276d3c .. . .. . But that looks like it s only for VS 2010 . There was also a blog post that showed the location that the extensions were saved in . http : www.larswilhelmsen.com 2012 01 08 syncing-visual-studio-extensions-and-settings-with-dropbox .. . .. . Which looked like a perfect solution except in 2013 2013 the extensions location must have changed and I cannot find them . Question .. . .. . Does anyone know how I could sync my extensions across multiple machines Or possibly know the location that the Extensions are stored in and if it s possible to change that location to something like Dropbox Skydrive Google Drive Comment : Syncing Extension via some sort of file sync would not work . There are also bits of metadata stored in other files and in the registry that would get out of sync . .. . Answer : If you ve upgraded to Visual Studio 2015 there s a new extension that Microsoft just released for it called the Roaming Extension Manager . It sounds like this is what you are looking for . https : visualstudiogallery.msdn.microsoft.com 7b421a95-c32c-4433-a2be-a41b276013ab SRC Home",
"Question : I recently added some extensions to Visual Studio 2015 Community and since then I experience this error message when I load a solution : .. . .. . enter image description here http : i.stack.imgur.com o46a2.png .. . .. . I tried to run Visual Studio as administrator and disabled uninstalled the new extensions but nothing helps or indicates to the problem . The log shows this error message : .. . .. . In the extension manager the typescript extension is grey-ed out : .. . .. . enter image description here http : i.stack.imgur.com uC030.png .. . .. . Any idea other than reinstalling Visual Studio .. . Answer : The version of Visual Studio is too old incompatible . An upgrade to the latest version Visual Studio Update 3 https : www.visualstudio.com en-us news releasenotes vs2015-update3-vs resolves the issue .",
"Question : I am making changes to a Visual Studio wizard that creates a project from a template and needs to add a reference to an assembly to the project that also lives in the extension directory . So I need to set the hintpath . I have not been able to figure out how a running VS extension can discover its extension directory which is a directory name like this : .. . .. . USERPROFILE AppData Local Microsoft VisualStudio 10.0 Extensions myCompany myExtension .. . .. . Using System.Reflection.Assembly.GetExecutingAssembly .CodeBase yields : .. . .. . C : Windows Microsoft.Net assembly GAC MSIL myCompany.myExtension v4.0 1.0.0.0 936015a19c3638eb myCompany.myExtension.dll .. . .. . Unfortunately not helpful . Using GetCallingAssembly is no better--it points at another directory in the MSIL GAC . Is there a Visual Studio interface that returns this information I haven t been able to find it . If that s not possible is it at least possible to determine if the extension is running in the experimental instance vs . non-experimental I could use that information to locate the extension directory . .. . Answer : Sorry for digging up an old answered question.. . I was looking into a similar problem and have implemented the Extension Manager but decided this is just pretty awful though if you do want to do use it these links will also help : .. . .. . http : stackoverflow.com a 24294185 .. . .. . http : blog.ninlabs.com 2011 04 auto-update-visual-studio-extensions .. . .. . However I decided to look into how the CodeGenerator in Asp.Net.Scaffolding accessed template files . Turns out very easily.. . .. . .. . Simples",
"Question : I m just writing a VSIX extension for Visual Studio 2010 and can t figure out how to debug it . One obvious method is to output messages . Extension template uses Trace.WriteLine . But where to find it s output .. . Answer : Visual Studio Extensions can be debugged like any other application . You just need to setup the debug experience to launch devenv with the loaded extension . Try the following .. . .. . Right click on the project and select Properties .. . Go to the Debug Tab .. . .. . Click on the radio-button for Start External Program . Point it to the devenv.exe binary . On my machine it s located at .. . .. . C : Program Files x86 Microsoft Visual Studio 10.0 Common7 IDE devenv.exe .. . .. . On a non x64 machine though you can remove the x86 portion . Then set the command-line-arguments to rootsuffix Exp . This tells Visual Studio to use the experimental hive instead of the normal configuration hive . By default VSIX extensions when built will register themselves in the experimental hive . Now you can F5 and it will start Visual Studio with your VSIX as an available extension . Comment : thank you for this answer solved an issue in one hit . Much obliged Comment : @JaredPar - is there a way to tell vs2012 extension to register itself in the experimental hive of vs2015 preview Comment : I did this in VS2015 and it worked . Comment : It seems that this works only if the versions you use to debug and to test are the same . So you can t debug in 2013 and run the extension in 2015 . @SrikanthVenugopalan Comment : @miparnisari - yes so it seems . Kind of a pain though if you are supporting multiple versions .",
"Question : I ve written a Visual Studio extension and am updating it in the Visual Studio Gallery . When uploading it produces this error : .. . .. . You can only upload template VSIX files for the Visual Studio Express SKUs . What s the source of the problem and how can it be fixed enter image description here http : i.stack.imgur.com Q5Xeq.png .. . .. . My manifest : .. . Answer : Specifically responding to the error I don t believe Express SKUs support Tool extension types only Template and Control . That s reinforced here https : visualstudiomagazine.com articles 2014 05 21 no-extensions-for-visual-studio-express.aspx and it seems to be from the perspective of someone installing the extension . However you re uploading not installing and so I believe it is an indirect result-of the manifest https : msdn.microsoft.com en-us library ee943167.aspx trying to specify it is available for install with Express editions . Can you check your vsix manifest for something like : .. . .. . If it s there that would be what I d try removing . For VS 2015 manifests https : msdn.microsoft.com en-us library ee943167 v vs.140 .aspx ensure these elements are removed if they exist . Comment : Thanks Chris . Turns out the manifest created by VS 2015 doesn t include the SupportedProducts element but did have InstallationTarget elements with Express values . Comment : @p.campbell thanks for the edit Comment : Wasn t this restriction cleared with VS2015 that Express SKU cannot be extended with tools",
"Question : I would like to run a script after files with certain extensions are saved in visual-studio . I am wondering where the event handler for saving a file is located in the Visual Studio SDK API . Can anyone point me in the right direction in terms of API documentation for visual-studio-extensions . I have found the Visual Studio SDK Reference http : msdn.microsoft.com en-us library bb166217.aspx but some direction or sample examples would be helpful . I want to create partial designer files that are usually generated when the project is built Mono for Android Project my files will have temporary values but are only intended to enable intellisense without building the entire project . I can run the process manually right now but I would like to trigger the script when .xml or .axml files are saved . It think I need to work with IVsRunningDocTableEvents.OnAfterSave http : msdn.microsoft.com en-us library microsoft.visualstudio.shell.interop.ivsrunningdoctableevents.onaftersave.aspx method but I m not sure about how I get the handle on the running doc table or how I filter the files I want to run the event for . This is my first attempt at using the Visual Studio SDK . .. . Answer : The event handler for saving files is : .. . .. . Dte.Events.DocumentEvents.DocumentSaved .. . .. . Note you need to keep a reference to Events and DocumentEvents in order for it to actually work . Here is some information on that : http : social.msdn.microsoft.com Forums br vsx thread 0857a868-e650-42ed-b9cc-2975dc46e994 .. . .. . Here is a link-to 30 sample projects that illustrate all kinds of functionality for Visual Studio Add-Ins : .. . .. . http : code.msdn.microsoft.com Visual-Studio-2010-SDK-ddfe1372 .. . .. . You can find some getting started informatin here : .. . .. . http : msdn.microsoft.com en-us vstudio ff677564.aspx",
"Question : I ve used SideWaffle to create a VSIX source here https : github.com allenrice DriveTimeScaffolding that contains project templates and scaffolders . However to update the installed VSIX I ve been uninstalling the previous version and installing the new version manually . Is there any support for integrating into Visual Studio s built-in Extensions and Updates UI to handle updates for my VSIX I m not sure if this is independent of SideWaffle or not . Thanks for any help Comment : Ah of course it looks like this is using the VisualStudioGallery.. . looks like this person was on the right track with trying to do it locally : stackoverflow.com questions 3570406 http : stackoverflow.com questions 3570406 is-it-possible-to-have-a-vs2010-vsix-check-for-updates-locally Comment : Dumb question : why not just increment the version number and let the built-in support work Comment : Not a dumb question : We already update the version number but for visual-studio to actually see that new version it has to be deployed somewhere that visual-studio can find it . We haven t been deploying this to the VisualStudioGallery . We re going to deploy it to a local gallery now Comment : Yep local gallery would be the good way to do it . .. . Answer : You will need to deploy your extension somewhere that Visual Studio knows about . This can be the public Visual Studio Gallery site https : visualstudiogallery.msdn.microsoft.com or a Private Gallery https : msdn.microsoft.com en-us library hh266746.aspx .. . .. . If you want to go down the Private Gallery route configure your Visual Studio like so .. . .. . enter image description here http : i.stack.imgur.com PAYrl.png",
"Question : we are working on a VSPackage in a team using Visual Studio 2012 and TFS . The extension works fine on the computer used to create it through a wizard . On another computer Visual Studio says that a project with output type of class-library cannot be started directly when we attempt to run it with F5 . The output of the project is indeed class-library and pressing F5 on the first machine starts Experimental Instance of Visual Studio with the extension loaded and working . By looking at LOCALAPPDATA Microsoft VisualStudio 11.0Exp Extensions on the second computer we see that the extension had been built and there was an attempt of registering it with VS . We have also created another extension on the second computer and tried to run it on the first machine . It displays the same error . How can we get the extension to run on computers which were not used to create it Comment : I have this problem on the same machine : The main source code is on path C : Dev-1 I checked out the same source code to the path C : Dev-2 now the new copy gives me the same error you get . Comment : Try launching Visual Studio with rootSuffix exp2 or something else - this way the new copy will go to a brand new experimental instance of VS and won t conflict with the extension from C : Dev-1 Comment : @Matze s answer solved the issue . Thanks . .. . Answer : The Visual Studio package project type adds an additional tab to the project properties view named VISX . On that tab the Deploy VSIX content to experimental instance for debugging option is checked by default that s the reason why package files are copied to the extensions directory of the current user s profile after build . If you want to start Visual Studio using the experimental hive you must customize the Debug settings of the class-library project . Set the Start Action to Start external program and select the devenv.exe file the file s location depends on your installation folder and specify the following commandline arguments : .. . .. . This allows to debug the extension by pressing F5 . Comment : Thank you To further discuss the problem this particular information is stored in Projectname.csproj.user file which doesn t seem to be shared over TFS - it s neither in included changes nor in excluded changes . This will be a manual fixthat needs to be done done on each machine . Comment : You re right by default the .user files are ignored from the list of pending changes for good reasons . Comment : Yes same problem once I put the local code to source control . .user file was not checked in and got me into trouble . Comment : Finally I m finally back in business thanks to you thanks so much . BTW I needed to complete the steps in this other answer as well in order to get it to work : stackoverflow.com questions 7767249 http : stackoverflow.com questions 7767249 unable-to-debug-vsix-project",
"Question : One of the extensions listed in Visual Studio 2012 for me is the Microsoft Advertising SDK for Windows 8.1 . I like to uninstall extensions I don t need but this one won t allow me . if I hover the enabled button it says in a tooltip : .. . .. . This product cannot be uninstalled via extensions and updates .. . .. . It looks like this : .. . .. . extensions http : i.stack.imgur.com VGiiz.png .. . .. . On second inspection I see a similar more helpful message bottom right : .. . .. . You need to use the Programs and Features pane in the Windows Control Panel to remove this extension . Easy enough no But it s not there uninstalls http : i.stack.imgur.com 18lU5.png .. . .. . Or : .. . .. . uninstalls search http : i.stack.imgur.com LlgEK.png .. . .. . In addition to the instructions on screen I also searched . The only helpful source was this MSDN page http : msdn.microsoft.com en-us library advertising-windows-prereqs 28v msads.10 29.aspx that says basically the same thing . Commenters mentioned that the extension web page http : visualstudiogallery.msdn.microsoft.com 3d3fa204-0641-4317-ab2c-50092f732edb see Reviews and Q AND A tabs has a few similar complaints . I ve cross-posted this question there as well . In any case : is there an easy way to uninstall this extension Comment : Others are complaining as well.. . visualstudiogallery.msdn.microsoft.com http : visualstudiogallery.msdn.microsoft.com 3d3fa204-0641-4317-ab2c-50092f732edb Comment : Ah thanks for the link I hadn t found it which is kind of silly of me I ve added to the discussion there as well . .. . Answer : Sharing my prefered method . There were a few other extensions I wanted to remove as well The windows Phone Tools and F .. . .. . http : stackoverflow.com a 28050106 376487 .. . .. . Direct link-to the uninstaller http : totaluninstaller.codeplex.com .. . .. . You can configure it to remove more or less depending on your needs . Edit : @Max actually posted a forked version of this . This one is file based setup with a command-line interface . I use it to script the cleanup as post visual-studio install . Comment : Isn t that basically the same as @Max s earlier answer http : stackoverflow.com a 29124618 419956 Comment : Huh turns out they are the same tool . The one @max linked has a GUI and the original the one I linked to is all command-line based with a config file . I actually prefer the command-line one . from the page I linked to : UPDATE 3 7 2015 : tsasioglu went ahead and provided nice WPF UI for my little tool . It may be more comfortable for some than command-line . Comment : Nice tool with exactly right initial config",
"Question : I m using a Visual Studio Private Gallery http : msdn.microsoft.com en-us library hh266746 28v vs.110 29.aspx to publish a VSIX internal to my company . My VSIX shows up in the Online section of Extensions and Updates in Visual Studio 2012 and I can install it from there : VSIX available to install from Online http : i.stack.imgur.com Q1rja.png .. . .. . However once it s installed I can t figure out how to update my extension in a way that makes it show up in the Updates section of that same dialog box nor can I figure out how to make Visual Studio notify me that an update is available . VSIX doesn t appear in Updates pane even though it s a newer version than installed http : i.stack.imgur.com lX315.png .. . .. . I ve tried various combinations of the following : .. . .. . 1 . Increasing the version number in the VSIX itself and in the atom.xml .. . 2 . Changing the updated tag inside of the entry tag to the current date and time .. . 3 . Changing the updated tag inside of the feed tag to the current date and time .. . 4 . Changing the published tag inside of the entry tag to the current date and time .. . .. . My expectation was that a combination of 1 2 and 3 should be enough to show that there is an update but to no avail . This guide http : msmvps.com blogs p3net archive 2013 01 11 hosting-a-private-visual-studio-gallery.aspx seems to confirm my expectation : .. . .. . Published - The date time when the extension was added . Updated - The date time when the extension was last updated . I ve also tried all 4 at the same time also to no avail . I m serving the gallery from an Apache instance and I ve confirmed that it s setting a correct Last-Modified header for the atom.xml . Is there some interval at which Visual Studio checks for updates Does opening the Updates section of Extensions and Updates not force Visual Studio to check Here s the contents of my atom.xml : .. . .. . I should also note that my extension is not Strong Name Signed because it uses a third party assembly that is unsigned . Does that make a difference .. . Answer : it looks like VS only checks for updates once a day but I wasn t able to get it to detect an updated extension in an Atom gallery . Comment : Unfortunately even after several days there is still no indication of updates .",
"Question : One of the extensions listed in Visual Studio 2012 for me is the Microsoft Advertising SDK for Windows 8.1 . I like to uninstall extensions I don t need but this one won t allow me . if I hover the enabled button it says in a tooltip : .. . .. . This product cannot be uninstalled via extensions and updates .. . .. . It looks like this : .. . .. . extensions http : i.stack.imgur.com VGiiz.png .. . .. . On second inspection I see a similar more helpful message bottom right : .. . .. . You need to use the Programs and Features pane in the Windows Control Panel to remove this extension . Easy enough no But it s not there uninstalls http : i.stack.imgur.com 18lU5.png .. . .. . Or : .. . .. . uninstalls search http : i.stack.imgur.com LlgEK.png .. . .. . In addition to the instructions on screen I also searched . The only helpful source was this MSDN page http : msdn.microsoft.com en-us library advertising-windows-prereqs 28v msads.10 29.aspx that says basically the same thing . Commenters mentioned that the extension web page http : visualstudiogallery.msdn.microsoft.com 3d3fa204-0641-4317-ab2c-50092f732edb see Reviews and Q AND A tabs has a few similar complaints . I ve cross-posted this question there as well . In any case : is there an easy way to uninstall this extension Comment : Others are complaining as well.. . visualstudiogallery.msdn.microsoft.com http : visualstudiogallery.msdn.microsoft.com 3d3fa204-0641-4317-ab2c-50092f732edb Comment : Ah thanks for the link I hadn t found it which is kind of silly of me I ve added to the discussion there as well . .. . Answer : The PowerShell answer given by Duncan Smith above is great . However as an alternative in the case of VS2013 if you have the iso-image for the Visual Studio installation if you navigate to the packages AdsSDK10 folder you will find two files .. . .. . If you right-click on these you can choose the uninstall option and this will remove the pubCenter Integration and the Advertising SDK for Windows 8.1 Comment : To complete the uninstallation you may have to remove extensions . .cache files from LocalAppData Microsoft VisualStudio 12.0 Extensions for VS 2013 Comment : @SergeyT thanks for sharing . Comment : If you don t have the ISO ready you may be able to find the setup file for it in C : ProgramData Package Cache . If you don t know the file name you can find the GUID for it from the registry somewhere in HKEY CLASSES ROOT Installer . Comment : For some reason I had nothing to uninstall . Only removing the cache files were enough to solve my problem",
"Question : One of the extensions listed in Visual Studio 2012 for me is the Microsoft Advertising SDK for Windows 8.1 . I like to uninstall extensions I don t need but this one won t allow me . if I hover the enabled button it says in a tooltip : .. . .. . This product cannot be uninstalled via extensions and updates .. . .. . It looks like this : .. . .. . extensions http : i.stack.imgur.com VGiiz.png .. . .. . On second inspection I see a similar more helpful message bottom right : .. . .. . You need to use the Programs and Features pane in the Windows Control Panel to remove this extension . Easy enough no But it s not there uninstalls http : i.stack.imgur.com 18lU5.png .. . .. . Or : .. . .. . uninstalls search http : i.stack.imgur.com LlgEK.png .. . .. . In addition to the instructions on screen I also searched . The only helpful source was this MSDN page http : msdn.microsoft.com en-us library advertising-windows-prereqs 28v msads.10 29.aspx that says basically the same thing . Commenters mentioned that the extension web page http : visualstudiogallery.msdn.microsoft.com 3d3fa204-0641-4317-ab2c-50092f732edb see Reviews and Q AND A tabs has a few similar complaints . I ve cross-posted this question there as well . In any case : is there an easy way to uninstall this extension Comment : Others are complaining as well.. . visualstudiogallery.msdn.microsoft.com http : visualstudiogallery.msdn.microsoft.com 3d3fa204-0641-4317-ab2c-50092f732edb Comment : Ah thanks for the link I hadn t found it which is kind of silly of me I ve added to the discussion there as well . .. . Answer : For this and all other bloatware that comes with VS 2012 and 2013 and 2015 - I highly doubt that the current trend will ever revert back to the advanced customization options of 2010 simply install Revo Uninstaller has a fully functional free trial and enable Show system components in its options and voila - simple as that . Some integrated components may refuse to be removed - but if you are absolutely sure about it just right-click on them and select Forced Uninstall and that s it . The most offending ones especially the extensions with their Uninstall button disabled grayed out in VS are perfectly safe to remove - they even warn if something else depends on them so no worries there either . Comment : why the downvote this does everything as the accepted answer but in a failsafe GUI - and no I m in no way affiliated with Revo Uninstaller .",
"Question : I m using a Visual Studio Private Gallery http : msdn.microsoft.com en-us library hh266746 28v vs.110 29.aspx to publish a VSIX internal to my company . My VSIX shows up in the Online section of Extensions and Updates in Visual Studio 2012 and I can install it from there : VSIX available to install from Online http : i.stack.imgur.com Q1rja.png .. . .. . However once it s installed I can t figure out how to update my extension in a way that makes it show up in the Updates section of that same dialog box nor can I figure out how to make Visual Studio notify me that an update is available . VSIX doesn t appear in Updates pane even though it s a newer version than installed http : i.stack.imgur.com lX315.png .. . .. . I ve tried various combinations of the following : .. . .. . 1 . Increasing the version number in the VSIX itself and in the atom.xml .. . 2 . Changing the updated tag inside of the entry tag to the current date and time .. . 3 . Changing the updated tag inside of the feed tag to the current date and time .. . 4 . Changing the published tag inside of the entry tag to the current date and time .. . .. . My expectation was that a combination of 1 2 and 3 should be enough to show that there is an update but to no avail . This guide http : msmvps.com blogs p3net archive 2013 01 11 hosting-a-private-visual-studio-gallery.aspx seems to confirm my expectation : .. . .. . Published - The date time when the extension was added . Updated - The date time when the extension was last updated . I ve also tried all 4 at the same time also to no avail . I m serving the gallery from an Apache instance and I ve confirmed that it s setting a correct Last-Modified header for the atom.xml . Is there some interval at which Visual Studio checks for updates Does opening the Updates section of Extensions and Updates not force Visual Studio to check Here s the contents of my atom.xml : .. . .. . I should also note that my extension is not Strong Name Signed because it uses a third party assembly that is unsigned . Does that make a difference .. . Answer : I had the same Issue and made some deep investigation . In my case it was odd that my extension always shown as Download in the Private Gallery instead as Installed the Green Hook . So I guessed there is a missing Link between the Gallery item and the installed Item .. . .. . The answer is as simple as annoying : .. . .. . The ID has to be THE ID . So the Product ID in the VSIX Configuration is the reference which has to be in the Atom-File . In Your case : .. . .. . As you see : Withyout your MyVSIX. . . After that it will recognize your Extension and if installed also hide the Download Button within the Gallery .. . .. . For Update : .. . .. . It s enough if you increase the Version Content . For The Update Cycle my experience : .. . .. . It checks on start of the Visual Studio once Daily if in Option enabled .. . It checks every time you open the Extensions and Updates . So reopen after a save of the XML should be enough . EDIT : thanks for the Upvote .. . .. . Here the Pictures for better understaning made in VS2013 but almost same for VS2012 .. . .. . The ID in the VSIX File . VSIX ProductID http : i.stack.imgur.com rarbZ.png .. . .. . How it should look like in the Atom-Feedfile . How it should look if you correctly linked between Gallery and VSIX File . Gallery Linking http : i.stack.imgur.com 7e1Dn.png Comment : Thank you so much that worked Just to be clear we are talking about the Id element inside the Vsix element . Comment : Thanks for your feedback . I ve added the VSIX Tag in the exmaples to clarify the location . Comment : Oh man this had bothered me for over a year . Thank you Comment : You saved my day thanks . Comment : Great - thank you Still wondering why the heck Microsoft placed the name of the Extension + . . in front of the id in their guide for private galleries https : msdn.microsoft.com en-us library hh266717.aspx",
"Question : null .. . Answer : I m using Visual studio 2015 inside our organization . I want to be able to use the Extensions and updates features but I always get a connection problem when I try to access the online or update section . We are behind a proxy server . The problem is related to the configuration of the proxy because the feature work well if I connect my pc on a direct internet-connection . The proxy is managed by another organization and I don t know much about that subject . I need help on what I should say so they understand what they need to change . Does someone knows what configuration need to be put in-place to make that VS feature works thanks Comment : There might be something about the route is using . The update are using the http protocol and also the news . The extensions are using the https 443 protocol . Visual studio seems to be using the IE proxy config file for the update but not for the 443 . It s using a different route . maybe this is what is causing the problem . Is there a way to force Visual studio to use IE proxy config file wpad file .",
"Question : We have a Visual Studio extension currently installed with MSI since we need to perform certain tasks after the installation ngen registering certain COM servers etc . In the end of the installation we run devenv.exe setup more specifically devenv.exe setup nosetupvstemplates to make it a bit faster to register the extension in Visual Studio 2012 and above in 2010 this step was not required since VS2010 would rebuild the extensions cache on every startup . We re currently looking to move to a partial VSIX installation but there are certain issues : .. . .. . 1 . We have a certain folder structure additional bundled tools . I wasn t able to find an option to include arbitrary folders and files with in VSIX package . Is this possible 2 . We re trying to avoid using devenv.exe setup since in rare cases this may cause extensions not to load as detailed by Remco Mulder on the MSDN forums http : social.msdn.microsoft.com Forums en-US c483d83f-d640-4fe9-8ff7-af78d635df23 visual-studio-extension-caching-preventing-extensions-from-loading forum vsx . 3 . We still need to perform post-installation operations currently not possible with VSIX . 4 . Due to previous sins we hardcoded some of the paths to use the CompanyName ProductName Version format that the VSIX packages used to follow but it seems that VSIX randomy generate a folder name now as Jason mentions in his answer below . So what I d essentially like is to be able to install an unpacked VSIX package - have the MSI installer create the file structure on disk in the correct location VSInstallDir Common7 IDE Extensions Company Product Version and then somehow to have VSIX consume the .vsixmanifest file to register the extension in Visual Studio . Initial digging into the Extension Manager API shows there s a method called CreateInstalledExtension in ExtensionManagerService that takes in a path to vsixmanifest in assembly Microsoft.VisualStudio.ExtensionManager.Implementation.dll but unfortunately it is internal . So without resorting to API hackery is there any alternative way to essentially install an extension in Visual Studio 2012 and above without using devenv setup Comment : If you set InstalledByMSI true InstalledByMSI in the source.extension.vsixmanifest and then unpack the files from the .vsix file to the Extensions folder does it work if you omit the call to devenv setup Comment : Yes our vsixmanifest has InstalledByMSI set to true . Per Ed Dore s blog in VS2012+ extensions are not being re-cached by default blogs.msdn.com b dsvst archive 2012 10 08 http : blogs.msdn.com b dsvst archive 2012 10 08 your-vs-package-may-not-load-after-porting-it-to-vs-2012.aspx Comment : Is it possible to launch the VSIXInstaller.exe quiet vsix path instead of unpacking the VSIX manually Comment : @280Z28 I m currently looking into that . There s an issue with a randomly generated folder name as Jason mentions in his answer below.. . it doesn t seem to be using the company product name . .. . Answer : Now that Devenv UpdateConfiguration is no longer an undocumented hack https : github.com Microsoft VSProjectSystem blob master doc overview mef.md it should be the solution for everyone :"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
visual-studio
|
UNK_RELATION
|
sql-psm@sql@79
|
sql-psm -- sql-psm is a procedural language defined by iso as an extension to @placeholder to use in stored-procedures .
|
{
"confidence": [
32.303199768066406,
31.530025482177734,
29.08510971069336,
24.73224639892578,
23.322227478027344,
18.18768310546875,
18.18768310546875,
18.18768310546875,
18.18768310546875,
18.18768310546875,
18.18768310546875,
18.18768310546875,
18.18768310546875,
18.18768310546875,
18.18768310546875,
18.18768310546875,
18.18768310546875,
15.237531661987305,
11.564689636230469,
11.564689636230469,
11.564689636230469,
11.564689636230469,
11.564689636230469,
11.564689636230469,
11.564689636230469,
11.564689636230469,
11.564689636230469,
11.564689636230469,
11.564689636230469,
11.564689636230469,
11.564689636230469,
11.564689636230469,
11.564689636230469,
11.564689636230469,
11.564689636230469,
11.564689636230469,
11.564689636230469,
11.564689636230469
],
"content": [
"There is no IF in plain standard SQL .",
"What does IF evaluate to for NULL in SQL",
"In most dialects of SQL conditions are treated as true only when they are true .",
"@Andrew Yeah that is my gut feeling as well but en.wikipedia.org wiki https : en.wikipedia.org wiki Null SQL IF statements in procedural extensions and tutorialspoint.com plsql plsql if then.htm http : www.tutorialspoint.com plsql plsql if then.htm suggests otherwise",
"What will happen in following code if fieldXYZ were NULL .. . .. . Update : .. . .. . I have found one result which suggests that NULL can be considered as falsy .. . .. . https : technet.microsoft.com en-us library ms182587 v sql.110 .aspx",
"Hi this is a pretty basic question but I am not able to find a definitive answer to it .",
"Not sure but I would suggest not relying on truthy falsey evaluations and just be specific about what you expect to be there .",
"In MySQL you can effectively bypass this problem with the IFNULL construct : IFNULL expr1 expr2 -- If expr1 is not NULL IFNULL returns expr1 otherwise it returns expr2 .",
"IFNULL returns a numeric or string value depending on the context in which it is used .",
"False and NULL values are not true so the else is executed .",
"Which DBMS are you using",
"First of all I think your if..else http : www.techonthenet.com oracle loops if then.php statement is incomplete as you are not defining any expression for your column fieldXYZ .",
"Generally when you write an if..else statement you would want to write an expression that compares your column value with something .",
"You can explicitly check for null values if you want to handle them .",
"Here is a gist of that syntax : .. . .. . Also if the fieldXYZ is passed a NULL value in the above statement then the first condition is not met so the else condition applies immediately in that scenario.Hope this helps",
"I had condensed the condition but you are right I will write the complete one",
"I am reluctant to answer my own question but in absence of any solution reposting my comment as answer .. . .. . Apparently the right way is to consider NULL as falsy .",
"Whenever I call the above stored procedure all the records in into T3 is inserting with top 1 id in table T1 time even though I have total 10 id s in T1 .",
"I need to select the data from two tables and insert into one table .",
"The same kind of the question was asked and answered many times but I have kind of requirement .",
"I have total three tables T1 T2 T3 .",
"My final goal is to insert the data into table T3 .",
"I have total 15 columns in table T3 .",
"Among that 15 columns I need to fill the 14 columns data from table T2 and the data for the last column I need to join table T1 and T2 from that I need to fetch the data for that column .",
"Please find the below query .. . .. . Here the rest of the fourteen columns of T3 have the relation first column id .",
"After close observation I came to know that the reason for that is as I m mentioning the limit 1 so it is fetch only first id every time .",
"If I didn t mention limit 1 it is returning all the 10 id s and the query it self is failing .",
"Is there anyway I can get all id s in table T3 .",
"Please suggest me .",
"Thanks in Advance .",
"Sub-queries are only allowed to return 1 row here .",
"You need a join returning all columns to insert .",
"stackoverflow.com questions 17122128 http : stackoverflow.com questions 17122128 insert-all-rows-from-table-into-other-table-single-query",
"hi @jarlh thanks for the quick reply .",
"Could you please elaborate explain it bit detail .",
"In the link provided the data is selecting from single table but here need to select the data from multiple tables .",
"insert into T3 select col1 col2 col3 .. . from t1 join t2 .. .",
"To elaborate or the comment by @jarlh who is absolutely correct you need to have a join between the two tables rather than selecting a value in a subquery .. . .. . With your code as it is you would only ever expect a single value from T1 ."
]
}
|
{
"confidence": [
29.280521392822266,
28.494354248046875,
14.241765022277832
],
"content": [
"Question : Hi this is a pretty basic question but I am not able to find a definitive answer to it . What does IF evaluate to for NULL in SQL What will happen in following code if fieldXYZ were NULL .. . .. . Update : .. . .. . I have found one result which suggests that NULL can be considered as falsy .. . .. . https : technet.microsoft.com en-us library ms182587 v sql.110 .aspx Comment : Not sure but I would suggest not relying on truthy falsey evaluations and just be specific about what you expect to be there . Comment : In MySQL you can effectively bypass this problem with the IFNULL construct : IFNULL expr1 expr2 -- If expr1 is not NULL IFNULL returns expr1 otherwise it returns expr2 . IFNULL returns a numeric or string value depending on the context in which it is used . Comment : In most dialects of SQL conditions are treated as true only when they are true . False and NULL values are not true so the else is executed . Comment : @Andrew Yeah that is my gut feeling as well but en.wikipedia.org wiki https : en.wikipedia.org wiki Null SQL IF statements in procedural extensions and tutorialspoint.com plsql plsql if then.htm http : www.tutorialspoint.com plsql plsql if then.htm suggests otherwise Comment : Which DBMS are you using There is no IF in plain standard SQL . .. . Answer : I am reluctant to answer my own question but in absence of any solution reposting my comment as answer .. . .. . Apparently the right way is to consider NULL as falsy .",
"Question : Hi this is a pretty basic question but I am not able to find a definitive answer to it . What does IF evaluate to for NULL in SQL What will happen in following code if fieldXYZ were NULL .. . .. . Update : .. . .. . I have found one result which suggests that NULL can be considered as falsy .. . .. . https : technet.microsoft.com en-us library ms182587 v sql.110 .aspx Comment : Not sure but I would suggest not relying on truthy falsey evaluations and just be specific about what you expect to be there . Comment : In MySQL you can effectively bypass this problem with the IFNULL construct : IFNULL expr1 expr2 -- If expr1 is not NULL IFNULL returns expr1 otherwise it returns expr2 . IFNULL returns a numeric or string value depending on the context in which it is used . Comment : In most dialects of SQL conditions are treated as true only when they are true . False and NULL values are not true so the else is executed . Comment : @Andrew Yeah that is my gut feeling as well but en.wikipedia.org wiki https : en.wikipedia.org wiki Null SQL IF statements in procedural extensions and tutorialspoint.com plsql plsql if then.htm http : www.tutorialspoint.com plsql plsql if then.htm suggests otherwise Comment : Which DBMS are you using There is no IF in plain standard SQL . .. . Answer : First of all I think your if..else http : www.techonthenet.com oracle loops if then.php statement is incomplete as you are not defining any expression for your column fieldXYZ . Generally when you write an if..else statement you would want to write an expression that compares your column value with something . You can explicitly check for null values if you want to handle them . Here is a gist of that syntax : .. . .. . Also if the fieldXYZ is passed a NULL value in the above statement then the first condition is not met so the else condition applies immediately in that scenario.Hope this helps Comment : I had condensed the condition but you are right I will write the complete one",
"Question : I need to select the data from two tables and insert into one table . The same kind of the question was asked and answered many times but I have kind of requirement . I have total three tables T1 T2 T3 . My final goal is to insert the data into table T3 . I have total 15 columns in table T3 . Among that 15 columns I need to fill the 14 columns data from table T2 and the data for the last column I need to join table T1 and T2 from that I need to fetch the data for that column . Please find the below query .. . .. . Here the rest of the fourteen columns of T3 have the relation first column id . Whenever I call the above stored procedure all the records in into T3 is inserting with top 1 id in table T1 time even though I have total 10 id s in T1 . After close observation I came to know that the reason for that is as I m mentioning the limit 1 so it is fetch only first id every time . If I didn t mention limit 1 it is returning all the 10 id s and the query it self is failing . Is there anyway I can get all id s in table T3 . Please suggest me . Thanks in Advance . Comment : Sub-queries are only allowed to return 1 row here . You need a join returning all columns to insert . Comment : stackoverflow.com questions 17122128 http : stackoverflow.com questions 17122128 insert-all-rows-from-table-into-other-table-single-query Comment : hi @jarlh thanks for the quick reply . Could you please elaborate explain it bit detail . In the link provided the data is selecting from single table but here need to select the data from multiple tables . Comment : insert into T3 select col1 col2 col3 .. . from t1 join t2 .. . .. . Answer : To elaborate or the comment by @jarlh who is absolutely correct you need to have a join between the two tables rather than selecting a value in a subquery .. . .. . With your code as it is you would only ever expect a single value from T1 ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
sql
|
UNK_RELATION
|
neography@ruby@34
|
neography -- neography is a thin @placeholder wrapper to the neo4j rest api .
|
{
"confidence": [
73.85985565185547,
66.905517578125,
59.369850158691406,
57.879215240478516,
53.57743453979492,
51.55491256713867,
50.412899017333984,
49.044166564941406,
48.67503356933594,
48.67503356933594,
48.67503356933594,
48.67503356933594,
47.37677001953125,
45.72699737548828,
45.49518966674805,
45.49518966674805,
45.12628936767578,
44.5133171081543,
43.17150115966797,
43.14458465576172,
42.96821212768555,
42.96821212768555,
42.96821212768555,
42.96821212768555,
42.65340042114258,
41.49620056152344,
41.49620056152344,
41.37620544433594,
41.24677276611328,
41.24677276611328,
41.24677276611328,
40.75564193725586,
40.75564193725586,
40.75564193725586,
40.75564193725586,
40.362239837646484,
40.104759216308594,
39.654762268066406,
39.54528045654297,
39.54528045654297,
39.54528045654297,
39.54528045654297,
38.993507385253906,
38.89238739013672,
37.82383728027344,
37.82383728027344,
37.82383728027344,
37.73467254638672,
37.640663146972656,
36.962364196777344,
36.906131744384766,
36.68182373046875,
36.68182373046875,
36.68182373046875,
36.68182373046875,
36.68182373046875,
35.59291076660156,
35.31309127807617,
35.31309127807617,
35.31309127807617,
34.934608459472656,
34.934608459472656,
34.934608459472656,
34.934608459472656,
34.934608459472656,
34.8712158203125,
33.50248336791992,
33.213165283203125,
33.213165283203125,
33.213165283203125,
33.213165283203125,
33.213165283203125,
32.71375274658203,
32.11277770996094,
32.11277770996094,
32.07115173339844,
32.07115173339844,
32.07115173339844,
32.07115173339844,
30.70241928100586,
30.391334533691406,
29.24932289123535,
28.952224731445312,
27.88058853149414,
27.88058853149414,
27.427425384521484,
27.26584243774414,
27.230783462524414,
27.230783462524414,
26.739810943603516,
26.226409912109375,
24.233524322509766,
24.20355987548828,
24.138395309448242,
23.931713104248047,
23.817867279052734,
23.799381256103516,
23.799381256103516,
23.629533767700195,
23.3336181640625
],
"content": [
"Neography is not a DSL but a wrapper around the REST API of Neo4J .",
"i am using neography as wrapper of the REST api for Neo4j graph database .",
"I m using the Neography https : github.com maxdemarzi neography gem to interact with a Neo4j database through the REST API .",
"Neography is a wrapper to query a neo4j server through the REST protocol .",
"Neography is just a wrapper around the REST end point of Neo4j it doesn t have additional features .",
"I m using neo4j for the first time neography for Ruby .",
"I m new to working with Neo4j and the neography gem .",
"Looking for gems I found neography and neo4j .",
"Any suggestions would be terrific I m definitely new to neo4j and neography .",
"I am using Neo4j 1.9 gremlin plugin 1.5 neography 1.0.9",
"I am coding in Ruby using Neo4j with the gem Neography .",
"I am transferring my rdb to neo4j 2.0.3 using neography .",
"Maybe neography source",
"I am using neo4j 2.0.3 with neography and this is my neo4j-wrapper.conf http : pastebin.com raw.php i cA6vi0d7 .",
"Just found the set node properties method in neography .",
"upgraded to Neography 0.0.25 and the issue persists",
"I m using Neography gem and it s batch insertion : github.com maxdemarzi neography wiki Batch https : github.com maxdemarzi neography wiki Batch .",
"Neography version is 1.6.0 .",
"I just need the Neography REST access and access my own wrapper on top of that .",
"Is this impossible while using Neography",
"Trying to execute a parameterized Cypher query with Neography v0.0.23 .",
"Can I use the neography DSL to do this query",
"I m using neography but willing to switch if there is something simpler .",
"Put aside Neography if it is possible using Cypher",
"I m successfully using the neography https : github.com maxdemarzi neography gem with one small problem .",
"I am using the Neography gem s batch insertion https : github.com maxdemarzi neography wiki Batch and the code that does the batch insert is below : .. . .. . Running Neo4j 2.1.2 enterprise edition on Ubuntu 12.04 LTS .",
"I am working on a Ruby on Rails project that will read and parse somewhat big text file around 100k lines and build Neo4j nodes I am using Neography https : github.com maxdemarzi neography with that data .",
"You can use neography to submit the cypher queries see the examples here : https : github.com maxdemarzi neography wiki Scripts-and-queries",
"The examples available for Neography does not have one for Rails .",
"I m using neoid that is based on neography gem",
"I m using the Neography Gem on Rails e.g .",
"Im currently building something with Neo4j and Neography and were wondering what is preferred : Using the traverse method or a Cypher query",
"The only reason I was considering neography was that I am not a super duper Java guru and hence was unsure of using JRuby Neo4j .",
"I m relatively new to neo4j so trying Neography to just call a cypher query I create as a string .",
"I m trying to read a lot of bulk data probably around 1-2G into neo4j with a simple ruby script and Neography .",
"I have a bunch of functions in my controller that help me access Neo4j through the Neography : : Rest function but I want to move it into its own class .",
"Neography does not have the concept of models that Devise looks for .",
"To clear all nodes and relationships except the root node use the solution provided in neography wiki https : github.com maxdemarzi neography wiki Testing",
"How do I update a given property of a node using neography",
"do you know if there is any syntax in neography that does match and create unique",
"When doing query I use the method execute neo4j query provided by Neography .",
"My question is : .. . .. . 1 Is there a way to reuse previously queried results using Neography",
"However Heroku does not provide a permanent fiel system which is why the Neo4j addon is operating over REST and thus Neography is a good choice for you .",
"You could use the Phase 2 API https : github.com maxdemarzi neography wiki Phase-2-Nodes to find it as below .. . .. . n Neography : : Node.find nodes index type repo .. . .. . n.neo id 12",
"With Neography you can send this Gremlin script : .. . .. . to remove all the nodes and relationships .",
"I don t think Neography integrates that closely with rails or has an ActiveRecord mapper .",
"You might be able to do this with pure cypher or neography generated cypher .",
"Don t use start anymore if you don t know why you would use it .. . 2 . use the transactional cypher support in neography https : github.com maxdemarzi neography wiki Transactions .. . 3 .",
"While using the Neography gem to implement a Neo4j database on a Rails app it so appears that the database is local to that particular Rails app s embedded Neo4j server .",
"Stop the local neo4j server via rake neo4j : stop I am using rails and this wonderful gem https : github.com maxdemarzi neography .. . .. . 4 .",
"The API I m using is : .. . .. . I want to be able to do the equivalent of : .. . .. . Looking at the source code https : github.com maxdemarzi neography blob 46be2bb3c66aea14e707b1e6f82937e65f686ccc lib neography rest nodes.rb L23-L37 this doesn t seem to be possible at least not via create node .",
"1.8.1 is ancient and probably not compatible with any recent neography versions.. .",
"We re running sidekiq workers that utilize neography to do batch operations .",
"If you re using Neography you ll need to roll your own authentication .",
"I m assuming you prefer neo4j.rb more than neography",
"Results should already be an array - no need parsing the response from neography .",
"With Neo4j 2.1.3 the LOAD CSV issue is resolved : .. . .. . In your ruby code you should use Cypher parameters and probably the transactional API https : github.com maxdemarzi neography wiki Transactions .",
"If I go with neography can gems like devise be used in the project",
"I think you only need neography if you re using MRI Ruby .",
"Note that I am using ruby bindings - the neography gem .",
"I often need to change the end node of a relationship but i am not able to do this using neography .",
"I think I can do what I want in cypher using MATCH . . CRAETE UNIQUE. . what s the equivalent of that in neography",
"2 Is it recommended to use methods provided by Neography such as @neo.create node other than using execute neo4j query directly",
"So if you can rewrite my above codes in native Neography code it will be greatly appreciated .",
"I do not know Neography either but you can simplify the query slightly with this one liner :",
"Neography depends on httpclient https : github.com maxdemarzi neography blob v1.3.7 lib neography.rb L2 which in turn defines a module named HTTP https : github.com nahi httpclient blob v2.3.4.1 lib httpclient http.rb L16 .",
"Could someone provide example code to show how to do this with neography if possible how to do it without neography if necessary or a work-around such as limiting the number of results returned from the example traversal I m already doing",
"I don t see any way in Neography itself though if it s there I d love to use it",
"Did you try to do @neo Neography : : Rest.new and @neo.create node .. . I think that one reuses the http connections .",
"Trying parameters in neography throws an error saying you can t use parameter msps with MERGE .",
"Also running neography even with parameters gets socket errors after about 25k rows .",
"It ll give you another little boost though I m not sure how you d do that with Neography .",
"In regards to Models specifically in regards to the Neography gem you re probably best off storing data in normal Postgres Mysql sqlite and using after create after update after delete hooks in your models to then keep the neo4j database in sync .",
"I m testing with a simple variation of a working neography example and while the filter seems as though it should work I m not having any luck .",
"I don t know Neography but I can take a shot at answering question 1 since that appears to be answerable by changing your third Cypher query .",
"In Ruby on Rails using NeoGraphy I m constructing a parameterized cypher query and getting back a result .",
"Since you re planning on using Neography Neo4j.rb might be a bit heavier than you re looking for .",
"Honestly I don t know much about neography I just started with that one .",
"But if I run a similar Cypher query mentioning relations using Ruby Neography library it tooks a couple of minutes to complete .",
"I came across SearchKick https : github.com ankane searchkick but this doesn t have any integration with neography .",
"I am experimenting using Neography with Rails 3 and can t quite understand where to specify DB connections Model Validations validates presence of etc .",
"when i use require sinatra on the file everything is fine but when i insert require neography it gives me this error when trying to run the file .",
"instead of the traversal endpoint I would look into cypher see http : docs.neo4j.org chunked snapshot cypher-query-lang.html which is supported by Neography .. . .. . Your query would then be something like .. . .. . HTH",
"Apologies if this is a simple question but I turn to the wisdom of SO to get me over this bump : .. . .. . I m using RoR 3.1.1 with the neography gem .",
"I ve tried to do it the way you suggest but it gives the following message : Neography : : NeographyError : expected return clause . when trying to delete all relationships .",
"Platform : .. . .. . Neo4j - Graph Database Kernel 2.0.0-M03 server .. . jruby 1.7.4 1.9.3p392 2013-05-16 2390d3b on Java HotSpot TM 64-Bit Server VM 1.7.0 25-b15 linux-amd64 .. . neography 1.1.1 for interaction with the neo4j REST api .. . .. . I have a series of product nodes with indexed catalogue number properties already stored in neo4j and I m attempting to batch insert SKUs that are children variations of those products with a relationship from the SKU - the parent Product catalogue number .. . .. . I have the following code : .. . .. . This returns back the error full stack-trace at the bottom .. . .. . Clearly I m doing something wrong here but I can t seem to see what it is .",
"Right now I use the following traversal code which gets me ALL of the friends-of-friends at once it can take so long that it will cause a timeout : .. . .. . From the neo4j website http : docs.neo4j.org chunked stable rest-api-traverse.html rest-api-creating-a-paged-traverser it looks like there is already such a thing as paged traversals but I don t see any references to doing this from neography .",
"You can find configuration information on their wiki https : github.com maxdemarzi neography wiki Configuration-and-initialization : they don t explicitly say it but you should copy that config in to initializers neography.rb .",
"gave me a undefined method split for nil : NilClass in .. . .. . id self .split .last .. . .. . gives me a Neography : : UnknownBatchOptionException for get node .. . .. . I am not even sure this will save me enough time either .",
"the REST API",
"I started with neo4j and didn t find support for REST .",
"For hosting I found that Heroku supports neo4j REST public beta .",
"what version of neo4j are you using",
"I found in the file community-server src main java org neo4j server rest batch BatchOperationResults.java two System.out.println on lines 69 and 72 .",
"I would check out this plugin for Neo4j : github.com neo4j-contrib neo4j-elasticsearch https : github.com neo4j-contrib neo4j-elasticsearch",
"Neo4j does not allow replacing the nodes of a relationship see javadoc http : api.neo4j.org 1.8.1 org neo4j graphdb Relationship.html .",
"I m using the awesome neography gem and have run into a slight problem converting the results of a Cypher query to a structured object OpenStruct.new.. . .. . .. . I don t know how to create a hash or a OpenStruct from the columns and data query results which are .. . .. . I cannot create a usable hash from it .",
"So over time a user might have 5000 nodes in the list. . Neo 1.9 Neography Gem ROR 3.2.. . .. . .. . When I use cypher to traverse the list it does well as long as the number of hops is under 40 or so.. . but. . with thousands of nodes 40 isn t gonna cut it. .",
"Create a backup of my Heroku neo4j database via neo4j dashboard .. . .. . 2 .",
"I m new to Neo4j so I m a little stumped ."
]
}
|
{
"confidence": [
73.4225082397461,
73.387451171875,
72.54014587402344,
72.17788696289062,
71.9391098022461,
67.29649353027344,
67.16122436523438,
63.89305877685547,
63.17402648925781,
62.43202209472656,
62.31805419921875,
61.31877899169922,
60.81321334838867,
60.766571044921875,
60.04955291748047,
59.908538818359375,
57.55635070800781,
57.35199737548828,
56.59348678588867,
54.713897705078125
],
"content": [
"Question : I m using the Neography https : github.com maxdemarzi neography gem to interact with a Neo4j database through the REST API . I don t see any way in Neography itself though if it s there I d love to use it nor have I been able to find by searching on Google whether this is possible directly through the REST API itself . Does anyone out there with Neo4j experience happen to know .. . Answer : To clear all nodes and relationships except the root node use the solution provided in neography wiki https : github.com maxdemarzi neography wiki Testing",
"Question : i am using neography as wrapper of the REST api for Neo4j graph database . I often need to change the end node of a relationship but i am not able to do this using neography . Of course i can delete the relation then recreate it with the new end point node but it s not optimized . Does anyone had this problem Thanks . .. . Answer : Neo4j does not allow replacing the nodes of a relationship see javadoc http : api.neo4j.org 1.8.1 org neo4j graphdb Relationship.html . So you only can create a new relationship to the new end node and delete the other relationship .",
"Question : i am using neography as wrapper of the REST api for Neo4j graph database . I often need to change the end node of a relationship but i am not able to do this using neography . Of course i can delete the relation then recreate it with the new end point node but it s not optimized . Does anyone had this problem Thanks . .. . Answer : You can see an example of this in the LinkedList example http : docs.neo4j.org chunked snapshot cookbook-linked-list.html",
"Question : I m using the Neography https : github.com maxdemarzi neography gem to interact with a Neo4j database through the REST API . I don t see any way in Neography itself though if it s there I d love to use it nor have I been able to find by searching on Google whether this is possible directly through the REST API itself . Does anyone out there with Neo4j experience happen to know .. . Answer : With Neography you can send this Gremlin script : .. . .. . to remove all the nodes and relationships . Comment : Just got a chance to verify this thanks",
"Question : Can I use the neography DSL to do this query .. . Answer : Neography is not a DSL but a wrapper around the REST API of Neo4J . As long as your query is a valid Cypher one you can execute it like that . In you case the id is not a classic property so I think you cannot use it like that . You may rewrite your query like this : .. . .. . START user node id SET user.name given name surname SET user.email email .. . .. . You may want to use parameters as well : http : docs.neo4j.org chunked milestone rest-api-cypher.html",
"Question : I m trying to implement a rails application with neo4j . For hosting I found that Heroku supports neo4j REST public beta . Looking for gems I found neography and neo4j . I started with neo4j and didn t find support for REST . Is it possible to work with REST Is there any benefits to go with embedded database If I go with neography can gems like devise be used in the project .. . Answer : in principle the advantage with the Neo4j embedded version is the great Rails3 and performance boost you get by not being forced to do REST . However Heroku does not provide a permanent fiel system which is why the Neo4j addon is operating over REST and thus Neography is a good choice for you .",
"Question : I m trying to write an importer script that will take a MySQL resultset and add nodes and relationships in my Neo4J DB . To simplify things my resultset has the following fields : .. . .. . application id .. . amount .. . application date .. . account id .. . .. . I want to create a node with Application label with the application id amount application date fields and another node with Account label with account id field and a relationship between them . My SQL query is from the applications table so I m not afraid of dups there but an account id can appear more than once and I obviously don t want to create multiple nodes for that . I m using neography but willing to switch if there is something simpler . What would be the best easiest way to achieve that My script will drop the database before it starts so no leftovers to take care of . Should I create an index before and use create unique node I think I can do what I want in cypher using MATCH . . CRAETE UNIQUE. . what s the equivalent of that in neography I don t understand how index name gets into the equation.. . .. . Should I or should I not define the constraint on Account Many thanks It s my first time with graph DBs so apologies if I miss a concept here. . .. . Answer : From what you describe it looks like you should use the constraints that come with Neo4j 2.0 : http : docs.neo4j.org chunked milestone query-constraints.html constraints-create-uniqueness-constraint .. . .. . CREATE CONSTRAINT ON account : ACCOUNT ASSERT account.account id IS UNIQUE .. . .. . Then you can use the MATCH . . CREATE UNIQUE clauses for all your inserts . You can use neography to submit the cypher queries see the examples here : https : github.com maxdemarzi neography wiki Scripts-and-queries Comment : do you know if there is any syntax in neography that does match and create unique Or I have to use execute query Comment : Use the execute query with your cypher query as a parameter . Neography is just a wrapper around the REST end point of Neo4j it doesn t have additional features .",
"Question : While using the Neography gem to implement a Neo4j database on a Rails app it so appears that the database is local to that particular Rails app s embedded Neo4j server . I wish to share a common Neo4j DB between two Rails apps just the way you could do with a MySQL database through entries into database.yml . Is this impossible while using Neography If so what could be my possible alternatives which don t involve JRuby i.e . using neo4j.rb . .. . Answer : Neography is a wrapper to query a neo4j server through the REST protocol . In that case you should be able to query from anywhere you want once you have started the server even with a simple curl command . You want especially to uncomment this line in conf neo4j-server.properties if your apps are on 2 different servers : .. . .. . Make sure however to protect your database you can read here how to : http : docs.neo4j.org chunked stable security-server.html",
"Question : I am experimenting using Neography with Rails 3 and can t quite understand where to specify DB connections Model Validations validates presence of etc . The examples available for Neography does not have one for Rails . Would appreciate any pointers . .. . Answer : I don t think Neography integrates that closely with rails or has an ActiveRecord mapper . You can find configuration information on their wiki https : github.com maxdemarzi neography wiki Configuration-and-initialization : they don t explicitly say it but you should copy that config in to initializers neography.rb . In regards to Models specifically in regards to the Neography gem you re probably best off storing data in normal Postgres Mysql sqlite and using after create after update after delete hooks in your models to then keep the neo4j database in sync . If you do it this way you really only have to store the minimum amount of data needed in Neo4j e.g . object ids and only the data your actively using for node and vertice graph operations . Then when you query neo4j you d take the resulting object id s and rehydrate them by querying your SQL ActiveRecord models .. . .. . The alternative is to use the Neo4j gem https : github.com andreasronge neo4j itself which offers ActiveRecord mappers and a much cleaner api . But I assume that you re not doing that because of environment constraints for example you want to run on Heroku and use the Neo4j addon Comment : Thanks . The only reason I was considering neography was that I am not a super duper Java guru and hence was unsure of using JRuby Neo4j . Since I don t want to use multiple DB s I am now going to give it a go .",
"Question : I m trying to implement a rails application with neo4j . For hosting I found that Heroku supports neo4j REST public beta . Looking for gems I found neography and neo4j . I started with neo4j and didn t find support for REST . Is it possible to work with REST Is there any benefits to go with embedded database If I go with neography can gems like devise be used in the project .. . Answer : I think you only need neography if you re using MRI Ruby . If you use jruby you don t need to use a restful server and according to the docs your neo4j queries will run faster . Devise will work fine with jruby although you will find other gems don t work well with Neo4j eg declarative-authorization or cancan since they rely on ActiveRecord and Neo4j only satisfies ActiveModel . If you do end up using jruby I strongly recommend you use rvm to install it and don t forget to add the --1.9 flag when running ruby or run export JRUBY OPTS --1.9 since jruby 1.6 defaults to ruby-1.8 which is not immediately compatible with Rails 3 . Sorry I can t answer your question about the REST client .",
"Question : I m new to working with Neo4j and the neography gem . I m building an API that will require authentication . I m used to using Devise or Clearance with Postgres to handle authentication . If users are stored as nodes in the Neo4j database are Devise and or Clearance compatible with Neo4j Or will I need to implement my own authentication .. . Answer : If you re using Neography you ll need to roll your own authentication . Neography does not have the concept of models that Devise looks for . If you re used to auth gems devise-neo4j https : github.com neo4jrb devise-neo4j works with Neo4j.rb https : github.com neo4jrb neo4j to provide Devise support . Since you re planning on using Neography Neo4j.rb might be a bit heavier than you re looking for . You could use it for a single User model for auth and then the underlying Neo4j-core gem for basic more direct Neo4j communication . Comment : Ah looks like you re one of the maintainers of neo4j.rb http : neo4jrb.io . Honestly I don t know much about neography I just started with that one . I m assuming you prefer neo4j.rb more than neography How would you compare them Comment : My gem preference always comes back to requirements of the project there s a tool for every job . I wrote neo4j.com developer ruby http : neo4j.com developer ruby a few months ago I think it ll give you a good overview of the ecosystem and should arm you to make an informed decision .",
"Question : I used the Neo4j API to batch insert a few million records which normally would take much longer if done individually . The import finished considerably faster but I do not see the millions of records I inserted . Does Neo4j keep some form of queue for the batch insertions and insert it over time If so how can I see the progress of this queue I am doing a count and I notice the records are increasing but at a very slow pace . I am using the Neography gem s batch insertion https : github.com maxdemarzi neography wiki Batch and the code that does the batch insert is below : .. . .. . Running Neo4j 2.1.2 enterprise edition on Ubuntu 12.04 LTS . .. . Answer : Did you shutdown the batch inserter correctly after finishing your insert Which Neo4j version and OS are you using Also make sure your memory config is correct . Configure the memory-mapping fore the nodestore and relationshipstore correctly see Rik s blog post http : blog.bruggen.com 2014 02 some-neo4j-import-tweaks-what-and-where.html for that . It is not a queue it is writing those records directly . How do you check and count You must not access the database concurrently . Can you share your code Comment : I m using Neography gem and it s batch insertion : github.com maxdemarzi neography wiki Batch https : github.com maxdemarzi neography wiki Batch . Neo4j Enterprise 2.1.2 on Ubuntu 12.04 LTS . I m checking the count via match m : User return count . Comment : Can you try match m return count I don think that batch-mode supports labels the unique-index there is a legacy index . You d have to run start n node : users id : return count Comment : You are correct it was because I wasn t adding the labels .",
"Question : I am coding in Ruby using Neo4j with the gem Neography . When doing query I use the method execute neo4j query provided by Neography . I am not sure about the best practice . Suppose I use following code to fetch a user : .. . .. . and to fetch another user similarly .. . .. . Then I did some stuff with this two users . Now I need to create an edge between this two users so I did this .. . .. . However I believe such approach is not optimal since I queried for the same two users twice . My question is : .. . .. . 1 Is there a way to reuse previously queried results using Neography 2 Is it recommended to use methods provided by Neography such as @neo.create node other than using execute neo4j query directly I choose the latter because I am not sure if the encapsulated methods can satisfy my task . So if you can rewrite my above codes in native Neography code it will be greatly appreciated . .. . Answer : 1 . Don t use start anymore if you don t know why you would use it .. . 2 . use the transactional cypher support in neography https : github.com maxdemarzi neography wiki Transactions .. . 3 . Use Parameters in your cypher queries like MATCH u : User name : name RETURN u Comment : Exactly what I need thanks",
"Question : I am experiencing something strange : my console.log is filled with messages like this : .. . .. . It s quite annoying as the file grew to 1G in two days . These look like debug messages but I can t find the culprit . I am using Neo4j 1.9 gremlin plugin 1.5 neography 1.0.9 Comment : Maybe search for that DONE : log statement in the code Maybe neography source Is it on the client or server Comment : This is what I tried but I didn t find anything . I don t know if the message comes from the server s side or the client s . .. . Answer : I found in the file community-server src main java org neo4j server rest batch BatchOperationResults.java two System.out.println on lines 69 and 72 .",
"Question : null .. . Answer : I m successfully using the neography https : github.com maxdemarzi neography gem with one small problem . I cannot seem to specify the type of node I want . The API I m using is : .. . .. . I want to be able to do the equivalent of : .. . .. . Looking at the source code https : github.com maxdemarzi neography blob 46be2bb3c66aea14e707b1e6f82937e65f686ccc lib neography rest nodes.rb L23-L37 this doesn t seem to be possible at least not via create node . Thanks in advance for the help",
"Question : I am coding in Ruby using Neo4j with the gem Neography . When doing query I use the method execute neo4j query provided by Neography . I am not sure about the best practice . Suppose I use following code to fetch a user : .. . .. . and to fetch another user similarly .. . .. . Then I did some stuff with this two users . Now I need to create an edge between this two users so I did this .. . .. . However I believe such approach is not optimal since I queried for the same two users twice . My question is : .. . .. . 1 Is there a way to reuse previously queried results using Neography 2 Is it recommended to use methods provided by Neography such as @neo.create node other than using execute neo4j query directly I choose the latter because I am not sure if the encapsulated methods can satisfy my task . So if you can rewrite my above codes in native Neography code it will be greatly appreciated . .. . Answer : I do not know Neography either but you can simplify the query slightly with this one liner :",
"Question : null .. . Answer : I have a bunch of functions in my controller that help me access Neo4j through the Neography : : Rest function but I want to move it into its own class . Where can I put it so I can call Neo.blabla inside any controller like a Model I tried to put it with the Models but it does not find the class . There should be an easy solution that loads one instance of that class so in my application I can access the Rest connection from any controller . I am quite sure putting the @neo inside the controller is not how one is supposed to do it . My neo4j graph is too complicated to use the Neo4j ActiveNode stuff . It really wouldn t help me . I just need the Neography REST access and access my own wrapper on top of that . Comment : What path are you using and what does your model roughly look like Rails should autoload files from the app models directory as long as the file and class are named correctly . Comment : Also I m one of the maintainers of the neo4j gem and I d be curious to know why your model is too complicated for ActiveNode . My feeling is that ActiveNode is better when your domain is more complicated . We d love your feedback Also feel free to drop by our chat room if that s easier : gitter.im neo4jrb neo4j https : gitter.im neo4jrb neo4j",
"Question : I am coding in Ruby using Neo4j with the gem Neography . When doing query I use the method execute neo4j query provided by Neography . I am not sure about the best practice . Suppose I use following code to fetch a user : .. . .. . and to fetch another user similarly .. . .. . Then I did some stuff with this two users . Now I need to create an edge between this two users so I did this .. . .. . However I believe such approach is not optimal since I queried for the same two users twice . My question is : .. . .. . 1 Is there a way to reuse previously queried results using Neography 2 Is it recommended to use methods provided by Neography such as @neo.create node other than using execute neo4j query directly I choose the latter because I am not sure if the encapsulated methods can satisfy my task . So if you can rewrite my above codes in native Neography code it will be greatly appreciated . .. . Answer : I don t know Neography but I can take a shot at answering question 1 since that appears to be answerable by changing your third Cypher query . Since your 2 initial queries seem to be getting the node IDs for user 1 and user 2 you should be able to avoid searching again for those nodes by using the START clause . You will need to specify a parameter map with the 2 node IDs returned by the first 2 queries . Comment : Yeah but I think even querying using ids will take some time to search along the index tree . I am thinking that given I have done the query once if it is possible to store the exact object for reuse such as creating a pointer pointing to the fetched users or a variable storing the object . Put aside Neography if it is possible using Cypher Comment : I think specifying a node by node ID is as close as you can get to a node pointer",
"Question : How do I update a given property of a node using neography And if its an indexed field . will the indexes get updated automatically I know on the console its as trivial as .. . .. . Of course this doesnt update any indexes indices sp either . Comment : Just found the set node properties method in neography . Must ve missed it earlier . But it still doesnt update the indexes . Are you expected to remove and add the node to indexes yourself .. . Answer : According to the neo4j-manual-1.8 .. . .. . To update an index entry the old one must be removed and a new one added .. . .. . Another option is to setup autoindexing .",
"Question : Apologies if this is a simple question but I turn to the wisdom of SO to get me over this bump : .. . .. . I m using RoR 3.1.1 with the neography gem . I currently have a neo4j graph of people nodes with relationships as friends connecting them . Given a specific person s node I d like to page through results of their friends-of-friends 2nd degree nodes 5 at a time . Right now I use the following traversal code which gets me ALL of the friends-of-friends at once it can take so long that it will cause a timeout : .. . .. . From the neo4j website http : docs.neo4j.org chunked stable rest-api-traverse.html rest-api-creating-a-paged-traverser it looks like there is already such a thing as paged traversals but I don t see any references to doing this from neography . Could someone provide example code to show how to do this with neography if possible how to do it without neography if necessary or a work-around such as limiting the number of results returned from the example traversal I m already doing Thanks .. . Answer : Could you use a Cypher query for this http : docs.neo4j.org chunked snapshot cypher-query-lang.html like .. . .. . for the first 5 friends Comment : Thanks This seems to mostly work with a few quirks . I think it s returning both the original node as well as some direct friends . Perhaps it s returning some direct friends who are also connected through another friend but I thought this query should exclude direct friends Also it seems to return no results nil when I specify a RETURN field that doesn t exist . Is there a way to say return this field if it exists otherwise return the results with nil for that field E.g . .. . - fof RETURN fof.uid fof.name fof.birthday SKIP 0 LIMIT 5 Comment : I m still wondering about it returning direct friends as well but I fixed the issue with return fields that don t exist using the operator : e.g . .. . - fof RETURN fof.uid fof.name fof.birthday SKIP 0 LIMIT 5 Comment : After more investigation I found a way to fix the issue of it returning both the start node and direct friends while preserving the friends-of-friends that it returns . I m marking your answer as accepted thanks Here s the cypher query I have working with those extra tweaks : start n node 1 match n - : friends - friend - : friends - fof where not n --fof and n.uid fof.uid return friend.uid friend.name fof.uid fof.name fof.gender SKIP 0 LIMIT 5 Comment : Great that s exactly the way ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
ruby
|
UNK_RELATION
|
xdmcp@user@85
|
xdmcp -- x display manager control protocol xdmcp is used for communicating between @placeholder s local x server and a remote x display manager .
|
{
"confidence": [
56.876041412353516,
54.255577087402344,
49.4833869934082,
49.4833869934082,
49.4833869934082,
45.560455322265625,
43.746788024902344,
43.48536682128906,
40.62887191772461,
40.183929443359375,
39.47482681274414,
39.29395294189453,
39.29395294189453,
38.83548355102539,
37.027259826660156,
36.94208908081055,
33.757469177246094,
33.09517288208008,
32.82306671142578,
32.65211486816406,
32.35830307006836,
32.31043243408203,
32.03968048095703,
31.27542495727539,
30.502099990844727,
30.13157081604004,
29.172344207763672,
29.027637481689453,
28.725936889648438,
28.492095947265625,
28.075149536132812,
26.48241424560547,
26.06570816040039,
25.849872589111328,
25.596385955810547,
25.596385955810547,
23.640060424804688,
23.6287784576416,
22.92636489868164,
22.92636489868164,
22.886005401611328,
21.30131721496582,
21.292255401611328,
21.18091583251953,
21.055742263793945,
19.470003128051758,
19.068632125854492,
19.068632125854492,
18.72186279296875,
18.66139030456543,
18.52482795715332,
17.98210334777832,
17.88914680480957,
15.962784767150879,
15.166827201843262,
15.166827201843262,
15.166827201843262,
15.166827201843262,
15.166827201843262,
15.166827201843262,
15.166827201843262,
15.166827201843262,
15.166827201843262,
15.166827201843262,
15.166827201843262,
15.166827201843262,
15.166827201843262,
15.166827201843262,
15.166827201843262,
15.166827201843262,
13.336039543151855,
13.283355712890625,
13.16238784790039,
13.16238784790039,
13.16238784790039,
13.16238784790039,
13.16238784790039,
13.16238784790039,
13.16238784790039,
13.16238784790039,
13.16238784790039,
13.16238784790039,
13.16238784790039,
13.16238784790039,
13.16238784790039,
13.16238784790039,
13.16238784790039,
13.16238784790039,
13.16238784790039,
13.16238784790039,
13.16238784790039,
13.16238784790039,
11.83263111114502,
11.83263111114502,
11.83263111114502,
11.83263111114502,
11.83263111114502,
11.83263111114502,
11.83263111114502,
11.83263111114502
],
"content": [
"I get through the XDMCP negotiation and the client opens the socket for the display .",
"Are there any secure alternatives to XDMCP A Linux remote desktop protocol",
"I want XDMCP to work as I want .",
"Maybe the problem is that XDMCP is not planned to work like that",
"I am trying to add support for XDMCP .",
"As I have said XDMCP works as expected fast and responsive .",
"@MikiJ - it works the other way around remote computer starts X server locally and tunnels the listening port to the server apps running on the server use client s X server to display graphics .",
"After trying VNC and XRDP I have chosen XDMCP as stated in this page : https : wiki.ubuntu.com xdmcp - It s the best by performance and security is not an issue for me personal LAN .",
"I have turned the firewall off selinux off enabled XDMCP in etc kde kdm kdmrc but I still get Can t open display when testing using Cywin export DISPLAY myfedora10box : 0.0 xclock .",
"It s possible to set up a ix to remote display to a system you re sitting in front of without an X server on the machine running the app .",
"Is it possible to setup the X server to accept only remote sessions without going into local graphical mode",
"In the somewhat distant past it was a no-brainer to use a remote X display to accomplish this very useful programming aid .",
"The test works fine when I remote display to another windows box running Cygwin X .",
"However in recent Fedora and Ubuntu distros remote X is a royal pain in the butt Google remote X or XDMCP and you will see there are now many configuration settings for GDM XDM and KDM not to mention xhost and the firewall configurations that make remote X more difficult than convincing Barry Kelley that this type of question is TRULY programming related .",
"If I do not start a login manager which process will listen to incoming X sessions",
"Did you add the hosts which are allowed xdmcp access to etc X11 xdm Xaccess",
"Cygwin helps out somewhat but true remote X is the preferred solution .",
"Disable automatic start of the login manager and X server instructions are googlable say http : www.debianadmin.com howto-boot-debian-in-text-mode-instead-of-graphical-mode-gui.html .",
"You ll also want an X server running on the machine you re sitting in front of .",
"They reduced the chattyness of the X protocol in a neat way and tunnel it through ssh .",
"Now I am running Fedora 10 with an XFCE environment and KDM as my display manager .",
"There s also freenx which is a GPL implementation of the server the protocol at least in version 3.x is GPL .",
"However since the machine is very underpowered and it is actually not connected to a physical monitor I was hoping to setup the X server to accept only remote sessions .",
"I would like to setup a small computer Raspberry Pi running Arch Linux to accept remote X sessions .",
"I use Cygwin X for using of XWin .",
"Why not use ssh -X",
"For interactive usage log in with ssh -X myfedora10box .",
"From the man page : .. . .. . The xhost program is used to add and delete host names or user names to the list allowed to make connections to the X server .",
"When I have the misfortune of using windows I usually just login to a terminal with putty or some other ssh client and launch X apps from the terminal XMing or some other X server .",
"I am on a private-network so I guess I ll probably end up going with XDMCP but it would seem kinda sorry if there aren t any secure open-source alternatives .",
"The X server is normally configured to not accept tcp connections -nolisten tcp but another option is to use the X11 forwarding mechanism of ssh .",
"I have also tried with the launcher from XMing choosing 0 as the Display .",
"Doing this usually means setting up Xorg server and running one of the Display Managers .",
"From personal experience running X apps on raspberry remotely is not too good either .",
"But yes you re right ssh -X only forwards X11 .",
"Check out Nomachine NX which is a secure version of X .",
"You ll probably find that the X server session is being launched with the -nolisten tcp option meaning it s not possible to connect to the desktop remotely since it s not listening on any network ports .",
"For once I confirmed that ps -ef grep X showed the -nolisten tcp arguments on the X command it was a no-brainer to go from there to grep for -nolisten under etc Emacs rgrep to be precise where I found the culprit in etc kde kdm kdmrc : 457 where ServerArgsLocal -br -nolisten tcp was specified .",
"Also I think you really want to use ssh -Y iirc ssh -X only forwards X11 not tunnels it .",
"Sorry for the confusion -- at least on the latest version of ssh it seems -X may be the correct flag .",
"On your Fedora box you would type xhost +mywindowsbox to allow the xclock and emacs and whatever else on the windows box to be displayed on the Fedora X screen .",
"This way no memory would be wasted on managing the local graphics card video memory etc since they are not being used .",
"You could auto-logon locally with a general user and then autorun a script displaying a form-for entering user passwd which connects to a session using ssh -X .. .",
"I had tried this as well but still get the same Can t open display error .",
"But if you want a full X session rather than just launching individual apps maybe some framebuffer system like VNC or NX would be easier to setup",
"I respond with the Server response saying authorized etc and then the client just closes .",
"Portable Ubuntu http : lifehacker.com 5195999 portable-ubuntu-runs-ubuntu-inside-windows would allow you to run a Linux environment directly from within Windows without any messy X Windows setups or having to set up a virtual-machine .",
"I m not on a box with xdm at the moment but if i recall correctly there should also be a config file which could contain relevant configuration have a look at etc X11 xdm xdm-config .. . .. . edit : you may need to restart X after these configuration changes off course",
"I have a server with Xubuntu 14.04 and I want to connect remotely to a graphical session .",
"First of all I m not very used to linux so I ll try to explain all my steps carefully .",
"Then apt-get or yum your X11 libraries and app s .",
"This seems like a question for serverfault but couldn t you just setup a VPN between the client computer and the server",
"You need X11 libraries one or more X11 applications and you probably want openssh set up for remote X11 forwarding - all on the raspberry-pi .",
"That way all traffic will be encrypted between the two machines .",
"Sorry if this is a long post .",
"The other ones didn t work well for me and were unstable but that s part of another post in the future .",
"I have edited etc lightdm lightdm.conf added XDMCPServer enabled true line and restarted .",
"Everything works ok and I connect from Windows with Xming with this line : C : Program Files Xming Xming.exe -query 192.168.1.101 -clipboard .",
"My problem is that I need a permanent session opened as-if I were connecting to a VNC or XRDP session .",
"For example let s say I open Firefox with a page I close XMING and when I reopen XMING later I want to return to the same desktop .",
"Everytime I close XMING all the programs in that session are closed and I have to reopen them .",
"This is a serious issue because I can t leave anything long on background doing anything it closes everything and I have to restart it .",
"I have searched for documentation or other people with the same problem and I have found nothing .",
"I haven t found an answer yet .",
"Thanks for reading",
"I am trying to develop an XServer and it works for xclock xcalc etc .",
"I get sent the connection initiation .",
"Where can I find any messages to indicate why the login client is not happy .",
"I am using Ubuntu 14.04 with lightdm",
"Okay found var log lightdm lightdm.log Relevant part appears to be +4667.04s DEBUG : Session pid 4988 : Not setting XDG VTNR +4667.15s DEBUG : Session pid 4988 : Running command usr sbin lightdm-session gnome-session --session ubuntu +4667.15s DEBUG : Session pid 4988 : Logging to .xsession-errors +4667.36s DEBUG : Activating login1 session c2 +4667.36s WARNING : Error activating login1 session : GDBus.Error : org.freedesktop.DBus.Error.Failed : Operation not supported Any ideas what is wrong",
"I d like to set up some thin clients -- UI heads old computer + mouse + keyboard connected to VMs on a fast server .",
"I ve always used OpenVPN but it falls in the it s what I know category more than the it s better than xyz category",
"I have done this before and I will go this route if I have to .",
"And how",
"On the Raspberry Pi change your sshd config to include X11Forwarding yes .",
"After making this change restart sshd or reboot .",
"When you connect to the Raspberry Pi machine use ssh -Y instead of just ssh to pass along xauth data .",
"Good luck",
"Thanks this connected the dots .",
"@bobah Thanks for you comments as well .",
"Both answers filled a bit of a puzzle and now it all works .",
"dstromberg was ever so slightly closer so I accept this answer .",
"Thanks to both any way .",
"I might be missing something .",
"But every time I wand to change keyboard layout I get prompt window with assking for my password .",
"In Details- Action it is org.freedesktop.accounts.change-own-user-data .. . .. . XWin is launche with next command-line .",
"run XWin : 1 -query REMOTE HOST -clipboard -nodecoration -lesspointer .. . .. . How to disable this password asking",
"Thanks",
"I found workaround .",
"It was polkit deamon which ask password every time I switch layout .",
"I ve just killed it and kept happy .",
"Next issue - disable polkit at startup or modify policy but it is another topic .",
"I am developing a JSF web application on a Windows box using Emacs as my editor but I far prefer to use Emacs in a Linux environment .",
"So the problem is clearly a configuration setting in Fedora 10 .",
"I d just virtualize in vmware and run it all locally .",
"Might be the quickest solution if all you really want to do is run Emacs .",
"+1 I can t stand using Windows without this",
"Try to run .. . .. . of your cygwin machine and you should get the clock running .",
"I did try to modify Xaccess but I must confess I found it very confusing and I suspect this is the culprit .",
"I will play with this some more ."
]
}
|
{
"confidence": [
83.08084106445312,
81.61614227294922,
80.65817260742188,
80.52205657958984,
79.92042541503906,
78.47431182861328,
78.14205169677734,
77.72198486328125,
69.76353454589844,
64.67017364501953,
61.7843017578125,
60.83600997924805,
59.49885559082031,
55.804405212402344,
50.67180252075195,
22.729476928710938
],
"content": [
"Question : I am developing a JSF web application on a Windows box using Emacs as my editor but I far prefer to use Emacs in a Linux environment . In the somewhat distant past it was a no-brainer to use a remote X display to accomplish this very useful programming aid . Cygwin helps out somewhat but true remote X is the preferred solution . However in recent Fedora and Ubuntu distros remote X is a royal pain in the butt Google remote X or XDMCP and you will see there are now many configuration settings for GDM XDM and KDM not to mention xhost and the firewall configurations that make remote X more difficult than convincing Barry Kelley that this type of question is TRULY programming related . Now I am running Fedora 10 with an XFCE environment and KDM as my display manager . I have turned the firewall off selinux off enabled XDMCP in etc kde kdm kdmrc but I still get Can t open display when testing using Cywin export DISPLAY myfedora10box : 0.0 xclock . The test works fine when I remote display to another windows box running Cygwin X . So the problem is clearly a configuration setting in Fedora 10 . Comment : I d just virtualize in vmware and run it all locally . .. . Answer : Did you add the hosts which are allowed xdmcp access to etc X11 xdm Xaccess I m not on a box with xdm at the moment but if i recall correctly there should also be a config file which could contain relevant configuration have a look at etc X11 xdm xdm-config .. . .. . edit : you may need to restart X after these configuration changes off course Comment : I did try to modify Xaccess but I must confess I found it very confusing and I suspect this is the culprit . I will play with this some more . Thanks for the suggestion .",
"Question : I am developing a JSF web application on a Windows box using Emacs as my editor but I far prefer to use Emacs in a Linux environment . In the somewhat distant past it was a no-brainer to use a remote X display to accomplish this very useful programming aid . Cygwin helps out somewhat but true remote X is the preferred solution . However in recent Fedora and Ubuntu distros remote X is a royal pain in the butt Google remote X or XDMCP and you will see there are now many configuration settings for GDM XDM and KDM not to mention xhost and the firewall configurations that make remote X more difficult than convincing Barry Kelley that this type of question is TRULY programming related . Now I am running Fedora 10 with an XFCE environment and KDM as my display manager . I have turned the firewall off selinux off enabled XDMCP in etc kde kdm kdmrc but I still get Can t open display when testing using Cywin export DISPLAY myfedora10box : 0.0 xclock . The test works fine when I remote display to another windows box running Cygwin X . So the problem is clearly a configuration setting in Fedora 10 . Comment : I d just virtualize in vmware and run it all locally . .. . Answer : Did you try the xhost command From the man page : .. . .. . The xhost program is used to add and delete host names or user names to the list allowed to make connections to the X server . On your Fedora box you would type xhost +mywindowsbox to allow the xclock and emacs and whatever else on the windows box to be displayed on the Fedora X screen . However this only gives you the Windows emacs on the Fedora screen editing the Windows file . If you are looking to use the Fedora emacs on the Windows file you may want to set the Windows box to share its files and use samba on Fedora to make it accessible by an emacs running on the Fedora box .",
"Question : I am developing a JSF web application on a Windows box using Emacs as my editor but I far prefer to use Emacs in a Linux environment . In the somewhat distant past it was a no-brainer to use a remote X display to accomplish this very useful programming aid . Cygwin helps out somewhat but true remote X is the preferred solution . However in recent Fedora and Ubuntu distros remote X is a royal pain in the butt Google remote X or XDMCP and you will see there are now many configuration settings for GDM XDM and KDM not to mention xhost and the firewall configurations that make remote X more difficult than convincing Barry Kelley that this type of question is TRULY programming related . Now I am running Fedora 10 with an XFCE environment and KDM as my display manager . I have turned the firewall off selinux off enabled XDMCP in etc kde kdm kdmrc but I still get Can t open display when testing using Cywin export DISPLAY myfedora10box : 0.0 xclock . The test works fine when I remote display to another windows box running Cygwin X . So the problem is clearly a configuration setting in Fedora 10 . Comment : I d just virtualize in vmware and run it all locally . .. . Answer : The X server is normally configured to not accept tcp connections -nolisten tcp but another option is to use the X11 forwarding mechanism of ssh . Try to run .. . .. . of your cygwin machine and you should get the clock running . For interactive usage log in with ssh -X myfedora10box . Comment : I had tried this as well but still get the same Can t open display error .",
"Question : I am developing a JSF web application on a Windows box using Emacs as my editor but I far prefer to use Emacs in a Linux environment . In the somewhat distant past it was a no-brainer to use a remote X display to accomplish this very useful programming aid . Cygwin helps out somewhat but true remote X is the preferred solution . However in recent Fedora and Ubuntu distros remote X is a royal pain in the butt Google remote X or XDMCP and you will see there are now many configuration settings for GDM XDM and KDM not to mention xhost and the firewall configurations that make remote X more difficult than convincing Barry Kelley that this type of question is TRULY programming related . Now I am running Fedora 10 with an XFCE environment and KDM as my display manager . I have turned the firewall off selinux off enabled XDMCP in etc kde kdm kdmrc but I still get Can t open display when testing using Cywin export DISPLAY myfedora10box : 0.0 xclock . The test works fine when I remote display to another windows box running Cygwin X . So the problem is clearly a configuration setting in Fedora 10 . Comment : I d just virtualize in vmware and run it all locally . .. . Answer : When I have the misfortune of using windows I usually just login to a terminal with putty or some other ssh client and launch X apps from the terminal XMing or some other X server . But if you want a full X session rather than just launching individual apps maybe some framebuffer system like VNC or NX would be easier to setup",
"Question : I am developing a JSF web application on a Windows box using Emacs as my editor but I far prefer to use Emacs in a Linux environment . In the somewhat distant past it was a no-brainer to use a remote X display to accomplish this very useful programming aid . Cygwin helps out somewhat but true remote X is the preferred solution . However in recent Fedora and Ubuntu distros remote X is a royal pain in the butt Google remote X or XDMCP and you will see there are now many configuration settings for GDM XDM and KDM not to mention xhost and the firewall configurations that make remote X more difficult than convincing Barry Kelley that this type of question is TRULY programming related . Now I am running Fedora 10 with an XFCE environment and KDM as my display manager . I have turned the firewall off selinux off enabled XDMCP in etc kde kdm kdmrc but I still get Can t open display when testing using Cywin export DISPLAY myfedora10box : 0.0 xclock . The test works fine when I remote display to another windows box running Cygwin X . So the problem is clearly a configuration setting in Fedora 10 . Comment : I d just virtualize in vmware and run it all locally . .. . Answer : You ll probably find that the X server session is being launched with the -nolisten tcp option meaning it s not possible to connect to the desktop remotely since it s not listening on any network ports . Certainly on my Ubuntu box this is the default configuration . Comment : -nolisten tcp has been the case on Fedora also for a long time",
"Question : I am developing a JSF web application on a Windows box using Emacs as my editor but I far prefer to use Emacs in a Linux environment . In the somewhat distant past it was a no-brainer to use a remote X display to accomplish this very useful programming aid . Cygwin helps out somewhat but true remote X is the preferred solution . However in recent Fedora and Ubuntu distros remote X is a royal pain in the butt Google remote X or XDMCP and you will see there are now many configuration settings for GDM XDM and KDM not to mention xhost and the firewall configurations that make remote X more difficult than convincing Barry Kelley that this type of question is TRULY programming related . Now I am running Fedora 10 with an XFCE environment and KDM as my display manager . I have turned the firewall off selinux off enabled XDMCP in etc kde kdm kdmrc but I still get Can t open display when testing using Cywin export DISPLAY myfedora10box : 0.0 xclock . The test works fine when I remote display to another windows box running Cygwin X . So the problem is clearly a configuration setting in Fedora 10 . Comment : I d just virtualize in vmware and run it all locally . .. . Answer : Some of the answers I received helped especially the one from Bryan Childs . For once I confirmed that ps -ef grep X showed the -nolisten tcp arguments on the X command it was a no-brainer to go from there to grep for -nolisten under etc Emacs rgrep to be precise where I found the culprit in etc kde kdm kdmrc : 457 where ServerArgsLocal -br -nolisten tcp was specified . Thanks to all who responded . -pmr",
"Question : I am developing a JSF web application on a Windows box using Emacs as my editor but I far prefer to use Emacs in a Linux environment . In the somewhat distant past it was a no-brainer to use a remote X display to accomplish this very useful programming aid . Cygwin helps out somewhat but true remote X is the preferred solution . However in recent Fedora and Ubuntu distros remote X is a royal pain in the butt Google remote X or XDMCP and you will see there are now many configuration settings for GDM XDM and KDM not to mention xhost and the firewall configurations that make remote X more difficult than convincing Barry Kelley that this type of question is TRULY programming related . Now I am running Fedora 10 with an XFCE environment and KDM as my display manager . I have turned the firewall off selinux off enabled XDMCP in etc kde kdm kdmrc but I still get Can t open display when testing using Cywin export DISPLAY myfedora10box : 0.0 xclock . The test works fine when I remote display to another windows box running Cygwin X . So the problem is clearly a configuration setting in Fedora 10 . Comment : I d just virtualize in vmware and run it all locally . .. . Answer : Portable Ubuntu http : lifehacker.com 5195999 portable-ubuntu-runs-ubuntu-inside-windows would allow you to run a Linux environment directly from within Windows without any messy X Windows setups or having to set up a virtual-machine . Might be the quickest solution if all you really want to do is run Emacs . Comment : +1 I can t stand using Windows without this",
"Question : I am developing a JSF web application on a Windows box using Emacs as my editor but I far prefer to use Emacs in a Linux environment . In the somewhat distant past it was a no-brainer to use a remote X display to accomplish this very useful programming aid . Cygwin helps out somewhat but true remote X is the preferred solution . However in recent Fedora and Ubuntu distros remote X is a royal pain in the butt Google remote X or XDMCP and you will see there are now many configuration settings for GDM XDM and KDM not to mention xhost and the firewall configurations that make remote X more difficult than convincing Barry Kelley that this type of question is TRULY programming related . Now I am running Fedora 10 with an XFCE environment and KDM as my display manager . I have turned the firewall off selinux off enabled XDMCP in etc kde kdm kdmrc but I still get Can t open display when testing using Cywin export DISPLAY myfedora10box : 0.0 xclock . The test works fine when I remote display to another windows box running Cygwin X . So the problem is clearly a configuration setting in Fedora 10 . Comment : I d just virtualize in vmware and run it all locally . .. . Answer : An alternate to Portable Ubuntu is andLinux http : www.andlinux.org - I liked the desktop integration they have . Comment : I don t know if either of these will be the solution I am looking for but they are both very interesting possibilities . Thanks",
"Question : Are there any secure alternatives to XDMCP A Linux remote desktop protocol I d like to set up some thin clients -- UI heads old computer + mouse + keyboard connected to VMs on a fast server . ssh -Y doesn t quite cut it since this would be for non-savvy computer users . I d like it integrated with kdm gdm if possible this seems to rule out Nomachine NX and I don t like closed source . I am on a private-network so I guess I ll probably end up going with XDMCP but it would seem kinda sorry if there aren t any secure open-source alternatives . .. . Answer : Check out Nomachine NX which is a secure version of X . They reduced the chattyness of the X protocol in a neat way and tunnel it through ssh . It works really well but disclaimer - my company does resell the software . Available in free-as-in-beer single user version or paid for enterprise version . There s also freenx which is a GPL implementation of the server the protocol at least in version 3.x is GPL .",
"Question : I would like to setup a small computer Raspberry Pi running Arch Linux to accept remote X sessions . Doing this usually means setting up Xorg server and running one of the Display Managers . I have done this before and I will go this route if I have to . However since the machine is very underpowered and it is actually not connected to a physical monitor I was hoping to setup the X server to accept only remote sessions . This way no memory would be wasted on managing the local graphics card video memory etc since they are not being used . Is it possible to setup the X server to accept only remote sessions without going into local graphical mode And how .. . Answer : Disable automatic start of the login manager and X server instructions are googlable say http : www.debianadmin.com howto-boot-debian-in-text-mode-instead-of-graphical-mode-gui.html . From personal experience running X apps on raspberry remotely is not too good either . Comment : I might be missing something . If I do not start a login manager which process will listen to incoming X sessions Comment : @MikiJ - it works the other way around remote computer starts X server locally and tunnels the listening port to the server apps running on the server use client s X server to display graphics .",
"Question : null .. . Answer : First of all I m not very used to linux so I ll try to explain all my steps carefully . Sorry if this is a long post . I have a server with Xubuntu 14.04 and I want to connect remotely to a graphical session . After trying VNC and XRDP I have chosen XDMCP as stated in this page : https : wiki.ubuntu.com xdmcp - It s the best by performance and security is not an issue for me personal LAN . The other ones didn t work well for me and were unstable but that s part of another post in the future . I want XDMCP to work as I want . I have edited etc lightdm lightdm.conf added XDMCPServer enabled true line and restarted . Everything works ok and I connect from Windows with Xming with this line : C : Program Files Xming Xming.exe -query 192.168.1.101 -clipboard . I have also tried with the launcher from XMing choosing 0 as the Display . As I have said XDMCP works as expected fast and responsive . My problem is that I need a permanent session opened as-if I were connecting to a VNC or XRDP session . For example let s say I open Firefox with a page I close XMING and when I reopen XMING later I want to return to the same desktop . Everytime I close XMING all the programs in that session are closed and I have to reopen them . This is a serious issue because I can t leave anything long on background doing anything it closes everything and I have to restart it . I have searched for documentation or other people with the same problem and I have found nothing . Maybe the problem is that XDMCP is not planned to work like that I haven t found an answer yet . Thanks for reading",
"Question : Are there any secure alternatives to XDMCP A Linux remote desktop protocol I d like to set up some thin clients -- UI heads old computer + mouse + keyboard connected to VMs on a fast server . ssh -Y doesn t quite cut it since this would be for non-savvy computer users . I d like it integrated with kdm gdm if possible this seems to rule out Nomachine NX and I don t like closed source . I am on a private-network so I guess I ll probably end up going with XDMCP but it would seem kinda sorry if there aren t any secure open-source alternatives . .. . Answer : Why not use ssh -X You could auto-logon locally with a general user and then autorun a script displaying a form-for entering user passwd which connects to a session using ssh -X .. . Comment : That s a very ad-hoc solution . It s easy to manipulate simply editing the startup script for the guest user and make it log passwords and undoubtedly confusing when things don t work right . Also I think you really want to use ssh -Y iirc ssh -X only forwards X11 not tunnels it . Comment : Well I guess it s not easy to manipulate the startup script as the user has read-only access on it . But yes you re right ssh -X only forwards X11 . Didn t know it needs to be tunneled . Comment : Sorry for the confusion -- at least on the latest version of ssh it seems -X may be the correct flag . It s hard to make sense of the man page though .",
"Question : Are there any secure alternatives to XDMCP A Linux remote desktop protocol I d like to set up some thin clients -- UI heads old computer + mouse + keyboard connected to VMs on a fast server . ssh -Y doesn t quite cut it since this would be for non-savvy computer users . I d like it integrated with kdm gdm if possible this seems to rule out Nomachine NX and I don t like closed source . I am on a private-network so I guess I ll probably end up going with XDMCP but it would seem kinda sorry if there aren t any secure open-source alternatives . .. . Answer : This seems like a question for serverfault but couldn t you just setup a VPN between the client computer and the server That way all traffic will be encrypted between the two machines . Comment : sounds good I m wondering why I didn t think of that.. . will take a look at strongswan unless you know something better Comment : I ve always used OpenVPN but it falls in the it s what I know category more than the it s better than xyz category",
"Question : null .. . Answer : I am trying to develop an XServer and it works for xclock xcalc etc . I am trying to add support for XDMCP . I get through the XDMCP negotiation and the client opens the socket for the display . I get sent the connection initiation . I respond with the Server response saying authorized etc and then the client just closes . Where can I find any messages to indicate why the login client is not happy . I am using Ubuntu 14.04 with lightdm Comment : Okay found var log lightdm lightdm.log Relevant part appears to be +4667.04s DEBUG : Session pid 4988 : Not setting XDG VTNR +4667.15s DEBUG : Session pid 4988 : Running command usr sbin lightdm-session gnome-session --session ubuntu +4667.15s DEBUG : Session pid 4988 : Logging to .xsession-errors +4667.36s DEBUG : Activating login1 session c2 +4667.36s WARNING : Error activating login1 session : GDBus.Error : org.freedesktop.DBus.Error.Failed : Operation not supported Any ideas what is wrong",
"Question : I would like to setup a small computer Raspberry Pi running Arch Linux to accept remote X sessions . Doing this usually means setting up Xorg server and running one of the Display Managers . I have done this before and I will go this route if I have to . However since the machine is very underpowered and it is actually not connected to a physical monitor I was hoping to setup the X server to accept only remote sessions . This way no memory would be wasted on managing the local graphics card video memory etc since they are not being used . Is it possible to setup the X server to accept only remote sessions without going into local graphical mode And how .. . Answer : It s possible to set up a ix to remote display to a system you re sitting in front of without an X server on the machine running the app . You need X11 libraries one or more X11 applications and you probably want openssh set up for remote X11 forwarding - all on the raspberry-pi . You ll also want an X server running on the machine you re sitting in front of . On the Raspberry Pi change your sshd config to include X11Forwarding yes . After making this change restart sshd or reboot . Then apt-get or yum your X11 libraries and app s . When you connect to the Raspberry Pi machine use ssh -Y instead of just ssh to pass along xauth data . Good luck Comment : Thanks this connected the dots . @bobah Thanks for you comments as well . Both answers filled a bit of a puzzle and now it all works . dstromberg was ever so slightly closer so I accept this answer . Thanks to both any way .",
"Question : I use Cygwin X for using of XWin . But every time I wand to change keyboard layout I get prompt window with assking for my password . In Details- Action it is org.freedesktop.accounts.change-own-user-data .. . .. . XWin is launche with next command-line . run XWin : 1 -query REMOTE HOST -clipboard -nodecoration -lesspointer .. . .. . How to disable this password asking Thanks .. . Answer : I found workaround . It was polkit deamon which ask password every time I switch layout . I ve just killed it and kept happy . Next issue - disable polkit at startup or modify policy but it is another topic ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
user
|
UNK_RELATION
|
gridfs-stream@module@45
|
gridfs-stream -- gridfs-stream is a node.js @placeholder that provides streams for writing to and reading from gridfs on mongodb .
|
{
"confidence": [
84.27601623535156,
83.58654022216797,
76.83851623535156,
76.24319458007812,
72.32832336425781,
70.80699157714844,
70.36477661132812,
70.36477661132812,
69.64759826660156,
67.257080078125,
65.66368103027344,
65.29959106445312,
65.13874816894531,
63.610504150390625,
61.909507751464844,
59.89745330810547,
59.870819091796875,
59.803321838378906,
57.91007995605469,
57.479339599609375,
56.84729766845703,
56.66239929199219,
56.33839797973633,
55.47857666015625,
55.47857666015625,
55.181129455566406,
54.80860900878906,
54.80860900878906,
54.80860900878906,
54.623477935791016,
54.52449035644531,
54.16048812866211,
53.15327453613281,
53.09507369995117,
53.09507369995117,
52.43022155761719,
52.398887634277344,
51.915069580078125,
51.915069580078125,
51.7388916015625,
51.7388916015625,
51.30039596557617,
51.296470642089844,
50.79924392700195,
50.50166320800781,
50.360198974609375,
49.98828887939453,
49.73783874511719,
49.58159637451172,
49.347412109375,
49.269203186035156,
49.024200439453125,
48.97187042236328,
48.97187042236328,
48.97187042236328,
48.90891647338867,
48.80066680908203,
48.076316833496094,
47.987754821777344,
47.556785583496094,
47.556785583496094,
46.93318176269531,
46.93318176269531,
46.93318176269531,
46.93318176269531,
46.52265167236328,
45.869422912597656,
44.927345275878906,
44.927345275878906,
44.54170227050781,
44.37049865722656,
43.99917221069336,
43.48206329345703,
43.48206329345703,
43.48206329345703,
43.233489990234375,
43.08925247192383,
42.95522689819336,
42.95522689819336,
42.23160171508789,
41.18996047973633,
41.050559997558594,
41.050559997558594,
41.050559997558594,
41.050559997558594,
41.050559997558594,
41.050559997558594,
38.82862854003906,
37.45027160644531,
37.45027160644531,
37.17431640625,
37.17431640625,
36.522377014160156,
36.16007614135742,
35.48704147338867,
35.18539047241211,
35.18539047241211,
35.18539047241211,
35.18539047241211,
33.41781997680664
],
"content": [
"Framework : node.js express.js busboy gridfs-stream mongodb .. . .. . I am using busboy to upload files and then use gridfs-stream to store files in mongodb gridfs .",
"I am saving uploaded images in Mongodb GridFS with Node.js Express gridfs-stream multyparty using streams .",
"I m using nodejs with mongodb and gridfs-stream .",
"gridfs-stream https : github.com aheckmann gridfs-stream makes that pretty easy :",
"Any thoughts on using gridfs-stream vs . using mongodb driver direclty for streaming into GridFS",
"Similar code works as expected with gridfs-stream but I thought could avoid adding an additional package and stream into GridFS using the mongodb driver .",
"https : github.com aheckmann gridfs-stream",
"I ve used multer and gridfs-stream .",
"I want to use gridfs-stream in a nodejs application .",
"I m encountering an issue with gridfs-stream https : github.com aheckmann gridfs-stream where the error event is emitted from my writeStream without an actual error .",
"I am trying to upload a file to a server built using Java by reading from a mongodb gridfs-stream .",
"First you need an instead of gridfs-stream : .. . .. . At which point you can create the write stream and pipe : .. . .. . However at this time the Node.js MongoDB Driver is at version 2.0 which uses Streams 2 so there is no reason to use gridfs-stream if you re using that version of the mongodb lib .",
"Hey Alex I tried this- github.com aheckmann gridfs-stream issues 74 https : github.com aheckmann gridfs-stream issues 74 .",
"I m using mongoose with gridfs-stream to store files images audios and videos .",
"I m using Sails.js to stream a mp4 file of a GridFS collection to my visitors .",
"I am running express-4 using multer https : github.com expressjs multer gridfs-stream https : github.com aheckmann gridfs-stream and mongoose https : github.com LearnBoost mongoose with mongodb and I am attempting to upload a file and stream it to gridfs .",
"I m trying to build a very basic video uploading system with gridfs-stream .",
"I want to use multiple buckets as documented in the GridFS reference http : docs.mongodb.org manual reference gridfs gridfs-reference .",
"I had a similar issue trying to download a pdf file from gridfs-stream but the file was unreadable .",
"One quick solution is to just create a readstream and stream it right back into GridFS .",
"I m trying to download a binary file of +200M saved in a mongoDB using the GridFS .",
"I am writing an API for my application using Mongoose Express and GridFS-Stream .",
"Github Issue on busboy https : github.com mscdex busboy issues 79 issuecomment-115819479 .. . .. . Github Issue on gridfs-stream https : github.com aheckmann gridfs-stream issues 76 .. . .. . My response on a Similar Stack Overflow Issue http : stackoverflow.com questions 30109041 node-js-file-upload-express-4-mongodb-gridfs-gridfs-stream 31079424 31079424",
"I m having some problems when I use Sails.js in combination with gridfs-stream .",
"I found the example here https : github.com aheckmann gridfs-stream issues 41 issuecomment-76353372 .",
"https : github.com mongodb node-mongodb-native blob V2.0.13 lib gridfs grid store.js L1317-L1429 FYI the stream that is implemented in the updated driver is Duplex .",
"I am trying to get the files that are stored in mongoDB with GridFS .",
"I have been able to successfully upload images to mongoDB using GridFs .",
"I want to post a file in express mongodb with multer and gridfs .",
"CODE .. . .. . PROBLEM .. . .. . This code downloads file from gridFs .",
"@robert I am new to gridfs .",
"You can just pipe the GridFS read stream to the response without buffering : .. . .. . I guess the problem of your buffering solution was that you only pass the first byte package you receive from GridFS to res.send .",
"You probably need to process range requests perhaps using express-range https : www.npmjs.com package express-range combined with reading partial data from GridFS using the range option https : github.com aheckmann gridfs-stream createreadstream .",
"I came acorss snippet to write file to gridfs but I am unable to find write way to update string to Gridfs .",
"The latest version of the GridFS spec requires that the id for a stored GridFS file be of type ObjectId .",
"I ve never used c9.io but gridfs-stream needs an instance of mongodb to initialize correctly so make sure you get it somehow and pass it in .",
"I am new to gridfs mongodb and creating a POST service to recieve the bytes of video and want to save the bytes in mongodb .",
"Or how to recieve the bytes from the device and store in gridfs any optimal way",
"I am using the above code to fetch all the images from GridFS .",
"Aside : gridfs-stream has its share of problems and while actively maintained is not very frequent .",
"My goal is to be able to write the file stream directly to gridfs without needing to store the file to disk initially .",
"I am able to save a file-upload to gridfs .",
"I am looking for a sample example for storing videos images in MongoDB using GridFS .",
".. . .. . .. . .. . req.pipe busboy .. . .. . .. . Here I try to get a image and convert the binary-data to base64 GET .. . .. . .. . GET to index .. . router.get function req res .. . var conn mongoose.createConnection 192.168.99.100 : 32773 .. . conn.once open function .. . var gfs Grid conn.db .. . var readstream gfs.createReadStream .. . filename : kittendj.jpg .. . .. . readstream.pipe .. . readstream.on open function chunk .. . bufs.push chunk .. . .. . readstream.on close function .. . var bufs .. . var fbuf Buffer.concat bufs .. . var base64 fbuf.toString base64 .. . res.render index .. . isAuthenticated : req.isAuthenticated .. . user : req.user .. . imageSrc : img src data : image jpeg base64 + base64 + .. . .. . .. . .. . .. . .. . Resources I checked : .. . .. . gridfs-stream documentation .. . .. . Display image in HTML from GridFS http : stackoverflow.com questions 22196125 display-image-in-html-from-gridfs .. . .. . Display Image in GridFS http : stackoverflow.com questions 22219400 display-image-in-gridfs rq 1 .. . How to retrieve all images from gridFs in a single http Request http : stackoverflow.com questions 30350857 how-to-retrieve-all-images-from-gridfs-in-a-single-http-request rq 1 .. . Node.js displaying images from Mongo s GridFS http : stackoverflow.com questions 10588872 node-js-displaying-images-from-mongos-gridfs rq 1 .. . nodejs display image stored in gridFS to html http : stackoverflow.com questions 31197463 nodejs-display-image-stored-in-gridfs-to-html rq 1",
"Is necessary to use the range https : github.com aheckmann gridfs-stream createreadstream option it allows us to select another position in the video and play it .",
"I am trying to use mongodb mongoose gridfs-strea and express to store img files on mongodb .",
"Download is simple : Use gridfs-stream s createReadStream I read the contents from mongodb and then use the following code to send it to browser .",
"I recently refactored my node app s code in attempts to keep things simple but have broken the functionality that I previously had working when a user Uploads a File my app saves the file locally it then attempts to save the media file to GridFS using the GridFS https : www.npmjs.com package gridfs npm package .",
"Could you have a look stackoverflow.com questions 34904157 http : stackoverflow.com questions 34904157 reading-and-displaying-images-from-mongodb-using-gridfs",
"The problem lies in the fact that you aren t piping just a file request to gridfs-stream .",
"It is in the tutorial you mentioned : codetutorial.io file-upload-gridfs-mean-stack-meanjs https : www.codetutorial.io file-upload-gridfs-mean-stack-meanjs crayon-56a0ddae56fde861598831",
"gridfs-stream upload a file not working but download a file working plz give solution .. . .. . gridfs-stream file-upload code is not working file download code is working very well.how can i set the path of the readstream files in the path .",
"The file was never put in the Gridfs although i got an error that end is not a function .",
"I have studied gridfs but couldn t got the clear picture .",
"I m simply trying to read a file uploaded to the server using GridFS .",
"The tweak to the skipper-gridfs seems pretty minor .",
"For some research I ve just written the GridFS stream into a file and moved this one to my Sails.js assets folder to call it directly in all browsers .",
"Reading in blogs found the answer to streaming data directly at database with express.js gridfs-stream.js and multer middleware that way : .. . .. . For testing this :",
"Best Practices for UUID Data in MongoDB http : 3t.io blog best-practices-uuid-mongodb .. . .. . I have a problem with getting a file from GridFS by UUID .",
"File is already uploaded in mongodb gridfs before I start uploading the file to upstream server .",
"I want to store files in MongoDB using GridFS for different purposes like streaming videos and saving images .",
"I am having some problems properly storing and retrieving files with GridFS .",
"Yes I have files stored in GridFS where id is not the ObjectId .",
"Please ensure you correctly saved binary-data to GridFS at the first instance .",
"set up the gridfs .. . .. . write the image to mongo .. . .. . read the image to mongo",
"I am using the following code to read the image file saved in MongoDB using GridFs : .. . .. . The output of console.log buff.toString is : .. . .. . The output of console.log data is : .. . .. . To display the image I did this : .. . .. . I am unable to read and display the image in html from GridFs MongoDB .. . .. . UPDATE : .. . .. . I have tried this : .. . .. . The output of the above is : .. . .. .",
"I wrote this function to store the files into mongoDB using GridFS .. . .. . and this function to get the files in mongoDB by passing the file ID which for this case is 5590c2a71d41c81703458433 .",
"A simple example is given in the documentation https : github.com aheckmann gridfs-stream : .. . .. . My problem is described by the comment : .. . .. . make sure the db instance is open before passing into Grid .. . .. . I try to use gfs in a post request .",
"i m uploading images to gridfs-stream using node and express..uploading is working fine but am unable to download .. . .. . the above code is unable to download the image by this cmd download filename acf58ae4-c853-f9f3-5c66-c395b663298a",
"In case anyone is interested I forged a quick solution with a fork of skipper-gridfs .",
"Update .. . .. . I think I am close to finding a way to stream directly to GridFS with metadata by use of Skipper https : github.com balderdashy skipper .",
"There s a pull request here -- https : github.com willhuang85 skipper-gridfs pull 9 I am now streaming directly into gridfs -- with metadata from the form -- without the need to save the file first .",
"I am trying to use the above code to store video bytes which will send from the device in gridfs with your answer .",
"EDIT : The file is well uploaded on the server so the problem is when I try to read it from GridFS .",
"Now I just upload directly to AWS S3 and download from it I don t use express or GridFS anymore .",
"Requires multiparty .. . multiparty require connect-multiparty .. . multipartyMiddleware multiparty .. . .. . Requires controller .. . UserController require . controllers UserController .. . .. . Example endpoint .. . router.post api user uploads multipartyMiddleware UserController.uploadFile .. . .. . gridfs-stream https : github.com aheckmann gridfs-stream .. . .. . .. . var Grid require gridfs-stream .. . var GridFS Grid mongoose.connection.db mongoose.mongo .. . var fs require fs .. . .. . .. . var UserSchema new Schema .. . first name : String .. . last name : String .. . email : type : String lowercase : true .. . role : .. . type : String .. . default : user .. . .. . hashedPassword : String .. . provider : String .. . salt : String .. . phone : String .. . projects : .. . type : Schema.Types.ObjectId .. . ref : Project .. . .. . profile-picture : Schema.Types.ObjectId .. . .. . .. . .. . each user has a id for a image file in mongodb .. . getFile : function .. . .. . var readstream GridFS.createReadStream .. . id : this.profile picture .. . .. . response.writeHead 200 Content-Type : iamge png .. . readstream.pipe response .. . .. . .. . .. . Thanks",
"I am using MEAN stack and I am trying to serve a file stored using Mongo GridFs .",
"I am using following nodejs libraries : .. . .. . request gridfs-stream .. . .. . I am getting the following error from upstream server : .. . .. . javax.servlet.ServletException : Processing of multipart form-data request failed .",
"I have retrieved the image from Mongo DB using Spring Data and GridFs Template .. . .. . so i don t know how to serve that retrieved input stream back to user .",
"I m in the process of seeing if I can t get some updates going to skipper-gridfs https : github.com willhuang85 skipper-gridfs that will take the text inputs on the html-form and set those as metadata etc .",
"For some strange reason GridFS will no longer save the media file to Mongo as it was doing before and I am not getting an error as to why its failing .",
"I just simply deleted the file using gfs.remove and then added the updated file to GridFS .",
"I used async.series to finish the delete operation first and then write the updated file to GridFS .",
"I just didn t want the file to hit the disk prior to being sent to gridfs .",
"I m following this tutorial https : www.codetutorial.io file-upload-gridfs-mean-stack-meanjs .",
"But since there may be existing files stored in GridFS where the id is not an ObjectId there is an overload of DownloadToStream that takes a BsonValue id .",
"You can query it directly https : docs.mongodb.org manual core gridfs additional-resources and check content of the file stored in the db .",
"I came across this official site https : mongodb.github.io node-mongodb-native api-articles nodekoarticle2.html and followed the below code snippet .. . .. . When I run the code I am getting bellow error .. . .. . please share any link for How to store files in MongoDB using GridFS in Nodejs .",
"I am trying to figure out how I can post an image directly to GridFS without storing it anywhere on the server as a temporary file first .",
"I tried to save image to Mongo DB using mongoose and Gridfs but I need in this document another coll with name Tags or etc .",
"This are the different header responses : .. . .. . Direct request to the mp4 file test myvideo.mp4 - works on all browsers : .. . .. . Request to the GridFS stream videos files sdrrer545547568fdsdf3.mp4 - doesn t work on Safari .. . .. . Has anybody an idea which information Safari needs to make it work",
"Here s the function where a block of HTML is saved with GridFS : .. . .. . My understanding is that the finish event will be emitted when the HTML stream is completely read and that the .destroy method will cause the close event to be emitted where I can finish the handling of the stored file .",
"When I try to download a saved file via a web browser window I see that the file contents are wrapped with something like the following : .. . .. . So my question is what do I need to do to strip the boundary information from the file stream before saving it to gridfs",
"to post a file and I manage to store this post as a file using : .. . .. . I am also able to store directly to GridFS from a readStream when the readStream is created from a file on the server .",
"I need save some files like : images video pdf.. . into mongodb so i use gridfs-stream and express.js .. . .. . for testing i use postman and set an POST request this way : .. . .. . the problem is that this way just store the data of the file : .. . .. . but not the content i mean de binary-data for it into mongodb is store for it the propety length is equal to 0 bacause has not any chunks in fs.chucks .",
"Im thinking on using different buckets from GridFS for each file-type videos and thumbnails but Im not sure how to create the Schema and the Model to populate the entire collection .",
"I have tried this so far but it only displays the name of the file : .. . .. . I have taken the code above from here https : www.codetutorial.io file-upload-gridfs-mean-stack-meanjs .. . .. . Can anyone please help .",
"I am also looking for the solution to read the image from gridfs and i am using grid-fs strem .. . .. . this is the solution I found hope it is helpful for you .",
"at the end such as .doc .png or .pdf because when I downloaded file from GridFS it would give me a file with no type as the figure below file name Picture unlike the file with .",
"but I keep getting this error : gridfs.errors.NoFile : no file in gridfs collection Collection Database MongoClient localhost 27017 u gridfs example u fs.files with id 5590c2a71d41c81703458433 .. . .. . Any help to get the files"
]
}
|
{
"confidence": [
103.14224243164062,
91.88032531738281,
91.32447814941406,
89.54414367675781,
85.86516571044922,
82.41919708251953,
79.77509307861328,
78.97950744628906,
78.7560806274414,
77.10443878173828,
76.46638488769531,
76.26936340332031,
75.8599853515625,
75.75495910644531,
75.03231811523438,
74.88815307617188,
73.7991714477539,
73.74205780029297,
73.32173919677734,
73.03511810302734
],
"content": [
"Question : null .. . Answer : Using node.js v0.12.7 mongodb driver version 2.0.47 and the following code : .. . .. . The above code creates an entry in db.fs.files but it has a length of 0 and no chunks are created . Similar code works as expected with gridfs-stream but I thought could avoid adding an additional package and stream into GridFS using the mongodb driver . This code is based on the last example here http : mongodb.github.io node-mongodb-native 2.0 tutorials streams . If I use a file stream fs.createReadStream instead of my pass-through stream then the code works as expected . I am getting end events on both streams . What is different about my pass-through stream that it would not work Any thoughts on using gridfs-stream vs . using mongodb driver direclty for streaming into GridFS Thanks",
"Question : Framework : node.js express.js busboy gridfs-stream mongodb .. . .. . I am using busboy to upload files and then use gridfs-stream to store files in mongodb gridfs . Download is simple : Use gridfs-stream s createReadStream I read the contents from mongodb and then use the following code to send it to browser . Problem : When I upload a 90kb pdf file it uploads fine . I see the size is correct in mongodb . But when I download the file size of the downloaded file is about 165kb . There is a mismatch . This does not happen with text-files . Sure its something to do with data type . can anyone please help .. . Answer : Pipe the gfs read stream to the response directly . This is what works for me Comment : thank you...works great .",
"Question : null .. . Answer : I am saving uploaded images in Mongodb GridFS with Node.js Express gridfs-stream multyparty using streams . Works fine . Now I would like to normalize resize images to some standard format before storing to database . I could use gm https : github.com aheckmann gm and have streaming but I would have to install native ImageMagic not an option or .. . Use something like lwip https : github.com EyalAr lwip and have a pure Node setup but then I cannot have streaming .. . .. . So is there a solution to have a streaming solution to request - resize - store to GridFS without installing external libraries Current solution missing the resize step :",
"Question : and thanks in advance for any help you guys can give me . I am trying to use mongodb mongoose gridfs-strea and express to store img files on mongodb . I do not want to store the file in a folder . I want gfs.createWriteStream to take the file directly from app.post from express . App.post is currently saving some strings through a schema model into mongodb . The form that routes to app.post contains strings and a input for img file . I tried to do this dnimgfront being the name of the input : .. . .. . I am getting back . My problem is I have to be able to store the img and the strings from the same app.post save function . Any ideas What I m using to connect to mongodb is : .. . .. . Thanks in advance for your help . .. . Answer : First you need an instead of gridfs-stream : .. . .. . At which point you can create the write stream and pipe : .. . .. . However at this time the Node.js MongoDB Driver is at version 2.0 which uses Streams 2 so there is no reason to use gridfs-stream if you re using that version of the mongodb lib . See the source code for v2.0.13 . https : github.com mongodb node-mongodb-native blob V2.0.13 lib gridfs grid store.js L1317-L1429 FYI the stream that is implemented in the updated driver is Duplex . Aside : gridfs-stream has its share of problems and while actively maintained is not very frequent . Comment : can I call re.pipe writeStream req.body.dnimgfront meaning I pass the req.body that stores the img from the form to the writeStream This would be within the app.post function . Comment : @jsrosas you can call it inline like that yes but not the way you have it . are you using multipart what express middleware are you using etc Comment : body-parser with the method-override urlenconded enconded extended true Comment : I am developing in c9.io so far i ve not had to require mongodb . it already comes installed do i still have to require Thanks for your help so far zammnuts Comment : @jsrosas body-parser doesn t handle streaming nor multi-part content IIRC i would use something like multiparty https : www.npmjs.com package multiparty . I ve never used c9.io but gridfs-stream needs an instance of mongodb to initialize correctly so make sure you get it somehow and pass it in .",
"Question : I am having some problems properly storing and retrieving files with GridFS . Currently if I submit a .txt file I end up getting the contents of the file back but if i submit a .doc file I get a bunch of gibberish like blackdiamonds with question marks in it . My end goal is just to be able to submit the file and then allow someone to download the file later on a different request . Writing Code : .. . .. . Reading Code : .. . .. . Any suggestions I would really appreciate any help you can provide . Thanks . Edit : Problem had to do with an uploading issue in angular . .. . Answer : For anyone who ends up with this issue I had the same symptoms and the issue was a middleware . This was a gnarly bug . The response was being corrupted by connect-livereload . Github Issue on busboy https : github.com mscdex busboy issues 79 issuecomment-115819479 .. . .. . Github Issue on gridfs-stream https : github.com aheckmann gridfs-stream issues 76 .. . .. . My response on a Similar Stack Overflow Issue http : stackoverflow.com questions 30109041 node-js-file-upload-express-4-mongodb-gridfs-gridfs-stream 31079424 31079424",
"Question : I m using mongoose with gridfs-stream to store files images audios and videos . The problem is when I select another position time in the video is stopped the same happens when I play any song . Someone can help me This is my code : Comment : You probably need to process range requests perhaps using express-range https : www.npmjs.com package express-range combined with reading partial data from GridFS using the range option https : github.com aheckmann gridfs-stream createreadstream . Comment : I found a solution without using express-range module but you re right I needed to use the range option thanks . .. . Answer : Is necessary to use the range https : github.com aheckmann gridfs-stream createreadstream option it allows us to select another position in the video and play it . In other words making a request to the server so that the server responds with the data we need . Here is the complete code I hope they serve someone . I found the example here https : github.com aheckmann gridfs-stream issues 41 issuecomment-76353372 .",
"Question : I came acorss snippet to write file to gridfs but I am unable to find write way to update string to Gridfs . the below snippet will update using path but what about direct string buffer .. . Answer : Even though it s been a while . I had this problem and solved it creating a stream from the string instead of a file . Like this : .. . .. . Got the stream idea from here http : stackoverflow.com questions 12755997 how-to-create-streams-from-string-in-node-js",
"Question : I am running express-4 using multer https : github.com expressjs multer gridfs-stream https : github.com aheckmann gridfs-stream and mongoose https : github.com LearnBoost mongoose with mongodb and I am attempting to upload a file and stream it to gridfs . The express route that does this is defined as : .. . .. . Once the express app is running a file is selected and uploaded via an HTML multipart form-data form and the output from the node server is : .. . .. . Has anyone any ideas what is causing the error and how to fix .. . Answer : The problem lies in the fact that you aren t piping just a file request to gridfs-stream . Using Multer as a middleware with catch any multipart form-data post request . As the stream comes in Multer built on Busboy https : github.com mscdex busboy watches for the on field and on file events and parses accordingly . What you are piping to Multer is not just a file . This bit of code works fine because Multer has indeed parsed out for you req.files and req.body by this point : .. . .. . But where your code runs into problems is here for reasons mentioned above : .. . .. . I have yet to find a way to stream a multipart form-data post request with more than just file uploads straight to GridFS . If your post request doesn t contain anything other than the file meaning no other html-input fields in the form then you might want to consider removing Multer from the middleware at least for this route . For my use-case I require the ability to receive an html-form-post with text inputs along with the file-upload I store metadata about the file on upload . Here is how I accomplished what I needed with Multer : .. . .. . By default Multer will store your files on disk . One quick solution is to just create a readstream and stream it right back into GridFS . Once the writing is completed remove the tmp file . As a side note there seems to be some thought going around that it s best to use Multer as middleware only on the routes that need it . You can read more on that thought on the last section of this http : lollyrock.com articles express4-file-upload . Update .. . .. . I think I am close to finding a way to stream directly to GridFS with metadata by use of Skipper https : github.com balderdashy skipper . I m in the process of seeing if I can t get some updates going to skipper-gridfs https : github.com willhuang85 skipper-gridfs that will take the text inputs on the html-form and set those as metadata etc . The tweak to the skipper-gridfs seems pretty minor . I ll update when that gets flushed out . If you look at skipper be sure you recognize the order of your html-form inputs if you have any does matter . Comment : In case anyone is interested I forged a quick solution with a fork of skipper-gridfs . The tweaks to the repo were minor and could stand some cleaning up but it s working great for me and I will probably use it in production here shortly . There s a pull request here -- https : github.com willhuang85 skipper-gridfs pull 9 I am now streaming directly into gridfs -- with metadata from the form -- without the need to save the file first . Working great .",
"Question : Framework : node.js express.js busboy gridfs-stream mongodb .. . .. . I am using busboy to upload files and then use gridfs-stream to store files in mongodb gridfs . Download is simple : Use gridfs-stream s createReadStream I read the contents from mongodb and then use the following code to send it to browser . Problem : When I upload a 90kb pdf file it uploads fine . I see the size is correct in mongodb . But when I download the file size of the downloaded file is about 165kb . There is a mismatch . This does not happen with text-files . Sure its something to do with data type . can anyone please help .. . Answer : Like Sasikanth said you can fix the problem with piping and that s the best approach . But if you are wondering what s wrong with your current approach then I suggest to read the Buffer https : nodejs.org api buffer.html documentation.You are naming your variable as buffer but assigning string . Then in your data callback you are adding string with Buffer . When you do that the chunk buffer is converted to string using it s toString method . So your binary-data is converted to utf8 encoded string and here it goes wrong . Since utf8 is multi-byte encoding the output size becomes large I don t know the exact mechanism of this conversion . So the right way to do is to keep it in buffers : Comment : thank you for your explanation...your solution is great .",
"Question : I need save some files like : images video pdf.. . into mongodb so i use gridfs-stream and express.js .. . .. . for testing i use postman and set an POST request this way : .. . .. . the problem is that this way just store the data of the file : .. . .. . but not the content i mean de binary-data for it into mongodb is store for it the propety length is equal to 0 bacause has not any chunks in fs.chucks . .. . Answer : Reading in blogs found the answer to streaming data directly at database with express.js gridfs-stream.js and multer middleware that way : .. . .. . For testing this : Comment : Did this really work for you because it didn t for me . The file was never put in the Gridfs although i got an error that end is not a function . Comment : Btw : Your example works now if I remove the drain event function around this.upload.end . Are there any problems if I implement it this way Comment : good point i not sure if the middleware multer takecare somethig like drain event when parsing files may be with the property inMemory https : github.com expressjs multer inmemory that should work if multer use pipe or some similar in the otherwise colud use other middleware that use pipe",
"Question : I am trying to figure out how I can post an image directly to GridFS without storing it anywhere on the server as a temporary file first . I am using Postman chrome ext . to post a file and I manage to store this post as a file using : .. . .. . I am also able to store directly to GridFS from a readStream when the readStream is created from a file on the server . see code .. . .. . I have the following files saveFromReq.js which listens for the POST and basically just passes this on to the savePic.js . saveFromReq.js : .. . .. . savePic.js : .. . .. . Any help would be greatly appreciated .. . Answer : gridfs-stream https : github.com aheckmann gridfs-stream makes that pretty easy : Comment : Thanks This works . Also can you please tell how to handle file-type multiple or multiple file controls in a form . and how to get the original file name from the post . Comment : @robert I am new to gridfs . Can you please tell me what is the filename in createWriteStream . What will be the case if i want to store bytes Should I create a new question for it Comment : @Java NewBie the filename is documented here http : mongodb.github.io node-mongodb-native api-generated gridstore.html . Basically it s an optional identifier for the GridFS document that you re creating so you can access that document not just through it s unique id property but also through a human-readable string . You can make this string anything you want . Comment : @robertklep Thankyou robert . I am trying to use the above code to store video bytes which will send from the device in gridfs with your answer . but I am struggling to store it . I need an understanding . I have posted the question on the separate thread but someone navigated to this link as duplicate.Thankyou Comment : @robertklep how can I get the details of the file stored in callback Thanks",
"Question : As we know we can use ObjectId as our identifier . In my situation I have legacy code where we use GUIDs in MongoDB UUID as identifiers . Best Practices for UUID Data in MongoDB http : 3t.io blog best-practices-uuid-mongodb .. . .. . I have a problem with getting a file from GridFS by UUID . I use new MongoDB.Driver.GridFS package and use GridFSBucket class . I would like to get stream by UUID not ObjectId but I can see that all overloads of DownloadToStream XXX methods have take ObjectId as parameter . There is no overload for UUID . So the question is : Is there any way to convert safely UUID to ObjectId and try to get the file from MongoDB Any help will be appreciated . Adam .. . Answer : The latest version of the GridFS spec requires that the id for a stored GridFS file be of type ObjectId . But since there may be existing files stored in GridFS where the id is not an ObjectId there is an overload of DownloadToStream that takes a BsonValue id . Since there is no BSON type for GUID specifically any GridFS files you might have where the id was originally a GUID would actually have the id stored as either a BsonBinary value or a BsonString value depending on how you chose to represent the GUID in MongoDB . So to read an existing GridFS file that was stored using a GUID as the id you need to convert that GUID to the appropriate BsonValue and then pass that BsonValue to the DownloadToStream overload that takes a BsonValue id .",
"Question : I am using the following code to read the image file saved in MongoDB using GridFs : .. . .. . The output of console.log buff.toString is : .. . .. . The output of console.log data is : .. . .. . To display the image I did this : .. . .. . I am unable to read and display the image in html from GridFs MongoDB .. . .. . UPDATE : .. . .. . I have tried this : .. . .. . The output of the above is : .. . .. . enter image description here http : i.stack.imgur.com wgmYs.png .. . Answer : You can just pipe the GridFS read stream to the response without buffering : .. . .. . I guess the problem of your buffering solution was that you only pass the first byte package you receive from GridFS to res.send . Comment : First I would say thank you so much for trying to answer my question and help me . I have made the changes you suggested . I am fairly certain I am doing it wrong . Please see the updated question for my changes and output . If you can help me resolve it would amazing as I ve been stuck at this for days . Thanks again .",
"Question : I am running express-4 using multer https : github.com expressjs multer gridfs-stream https : github.com aheckmann gridfs-stream and mongoose https : github.com LearnBoost mongoose with mongodb and I am attempting to upload a file and stream it to gridfs . The express route that does this is defined as : .. . .. . Once the express app is running a file is selected and uploaded via an HTML multipart form-data form and the output from the node server is : .. . .. . Has anyone any ideas what is causing the error and how to fix .. . Answer : In my code : .. . .. . I am assigning an ObjectId rather than the string representation of an ObjectId to the id property of the object passed into gfs.createWriteStream . It turns out this is causing the MongoError in my code . The fix discovered here http : docs.mongodb.org manual reference object-id core-object-id-class is to change the line of code causing the issue to be : .. . .. . Having done that I then came to the issue of the file not being put into the fs.chunks mongodb collection although the metadata does end up in the fs.files mongodb collection . AddieD s answer here http : stackoverflow.com a 27163813 837922 starts to address this :",
"Question : null .. . Answer : I m encountering an issue with gridfs-stream https : github.com aheckmann gridfs-stream where the error event is emitted from my writeStream without an actual error . I feel like my event-handling is not correctly set-up . Here s the function where a block of HTML is saved with GridFS : .. . .. . My understanding is that the finish event will be emitted when the HTML stream is completely read and that the .destroy method will cause the close event to be emitted where I can finish the handling of the stored file . saveExperiment will delete the stored file if there is an error saving the Experiment model : .. . .. . So what ends up happening is that the error event is emitted and calls the callback function with no error and the saveExperiment method is also calling the callback function . Double callbacks leads to errors when sending the response Any ideas",
"Question : I m trying to download a binary file of +200M saved in a mongoDB using the GridFS . My problem is that the download won t start . I m using nodejs with mongodb and gridfs-stream . In routes.js : .. . .. . Somewhere in my view : .. . .. . which generates a response from the nodejs log : .. . .. . but the download never starts.. . and I have no idea what s going on. . Comment : 1 . You don t open a database-connection in your route logic but you do it for your application lifecycle . 2 . Callbacks These things need to happen after the database is opened . The .open call is asynchronous . Comment : Yes I have to move the connection but I wanted a very simple example to work first . For some reason I had put the actual read from the database outside the callback . Thanks . .. . Answer : change .. . .. . to .. . .. . Please try . Comment : Yes . I just figure it out and found your answer . I put the call outside the callback .",
"Question : I have added a file into the collection my collections . I am not able check if the file was saved . With the default bucket fs.chunk and fs.files the code below works properly .. . .. . Code : .. . .. . The file is shown in db.my collection.files but code shows File does not exist .. . .. . The same code works if the root option is removed . I want to use multiple buckets as documented in the GridFS reference http : docs.mongodb.org manual reference gridfs gridfs-reference . Any suggestions .. . Answer : the problem was in version . the code on github is latest 0.5.3 while on npm it is 0.5.1. . .. . .. . so i have downloaded manually from github and everything works fine . https : github.com aheckmann gridfs-stream",
"Question : I am using the following code to read the image file saved in MongoDB using GridFs : .. . .. . The output of console.log buff.toString is : .. . .. . The output of console.log data is : .. . .. . To display the image I did this : .. . .. . I am unable to read and display the image in html from GridFs MongoDB .. . .. . UPDATE : .. . .. . I have tried this : .. . .. . The output of the above is : .. . .. . enter image description here http : i.stack.imgur.com wgmYs.png .. . Answer : Unless you really need to embed images into page use pipes as of saintedlama s answer . dHJvb3Blci5qcGVn is base64 encoded string trooper.jpeg . Please ensure you correctly saved binary-data to GridFS at the first instance . You can query it directly https : docs.mongodb.org manual core gridfs additional-resources and check content of the file stored in the db . Comment : Thank you so much for your answer . I am not sure whether I have saved it correctly . I posted this question which contains the code for my file-upload along with images . Could you have a look stackoverflow.com questions 34904157 http : stackoverflow.com questions 34904157 reading-and-displaying-images-from-mongodb-using-gridfs Comment : Yep you saved name of the file not the binary payload . I answered there .",
"Question : I am trying to upload a file to a server built using Java by reading from a mongodb gridfs-stream . File is already uploaded in mongodb gridfs before I start uploading the file to upstream server . I am using following nodejs libraries : .. . .. . request gridfs-stream .. . .. . I am getting the following error from upstream server : .. . .. . javax.servlet.ServletException : Processing of multipart form-data request failed . Stream ended unexpectedly .. . .. . What could be going wrong here Comment : Try to remove next Comment : Thanks mate for the suggestion . I tried adding headers : transfer-encoding : chunked to the headers and it worked without complaint . Comment : This is how it will look like : request.post url : IHUrl headers : transfer-encoding : chunked formData : formData Comment : I m glad it works but I think you should remove send anyway . I think you use it as a route in express app . So send will be called before your post request completed . Then it will be passed down the stack and if you have e.g . middlewares for handling 404 error will be returned .. . Answer : I realized that its been a while and its a problem some of you may encounter and the solution was not really what I posted in the comments as I found more problems later . The issue that we had was that the java servlet that we were posting the multipart form-data was not able to handle chunked data and setting headers won t do you any good . using request library will not help you here . I had to make use of restler https : www.npmjs.com package restler to send the entire multipart data in a single chunk .",
"Question : I am trying to change some binary-data from my uploaded images to base64 so I can use that to display an image . But the terimal is giving me this error : .. . .. . I don t understand when I post I also use the .on event and it is working fine . Besides that I wonder if I am correctly changing the data . Please take into account that I m fairly new to node : .. . .. . How I save a uploaded image POST .. . .. . .. . Post to profile page .. . router.post function req res next .. . var busboy new Busboy headers : req.headers .. . busboy.on file function fieldname file filename encoding mimetype .. . var conn mongoose.createConnection 192.168.99.100 : 32773 .. . conn.once open function .. . var gfs Grid conn.db .. . var writestream gfs.createWriteStream .. . filename : filename .. . content-type : mimetype .. . mode : w .. . metadata : .. . belongs-to : req.session.passport.user .. . .. . .. . .. . file.pipe writestream .. . writestream.on close function file .. . res.render profile .. . user : req.user .. . message : req.flash uploadMessage Your image has been uploaded successfully .. . .. . .. . .. . req.pipe busboy .. . .. . .. . Here I try to get a image and convert the binary-data to base64 GET .. . .. . .. . GET to index .. . router.get function req res .. . var conn mongoose.createConnection 192.168.99.100 : 32773 .. . conn.once open function .. . var gfs Grid conn.db .. . var readstream gfs.createReadStream .. . filename : kittendj.jpg .. . .. . readstream.pipe .. . readstream.on open function chunk .. . bufs.push chunk .. . .. . readstream.on close function .. . var bufs .. . var fbuf Buffer.concat bufs .. . var base64 fbuf.toString base64 .. . res.render index .. . isAuthenticated : req.isAuthenticated .. . user : req.user .. . imageSrc : img src data : image jpeg base64 + base64 + .. . .. . .. . .. . .. . .. . Resources I checked : .. . .. . gridfs-stream documentation .. . .. . Display image in HTML from GridFS http : stackoverflow.com questions 22196125 display-image-in-html-from-gridfs .. . .. . Display Image in GridFS http : stackoverflow.com questions 22219400 display-image-in-gridfs rq 1 .. . How to retrieve all images from gridFs in a single http Request http : stackoverflow.com questions 30350857 how-to-retrieve-all-images-from-gridfs-in-a-single-http-request rq 1 .. . Node.js displaying images from Mongo s GridFS http : stackoverflow.com questions 10588872 node-js-displaying-images-from-mongos-gridfs rq 1 .. . nodejs display image stored in gridFS to html http : stackoverflow.com questions 31197463 nodejs-display-image-stored-in-gridfs-to-html rq 1 Comment : use more semi-colons it might start working . Comment : @dandavis Semicolons are actually optional if I m not mistaken because ECMAScript the standard for Node.js and browser JavaScript implementations has an automatic semicolon-insertion feature . So I m not sure if the problem lies there but feel free to prove me wrong : .. . Answer : I am also looking for the solution to read the image from gridfs and i am using grid-fs strem .. . .. . this is the solution I found hope it is helpful for you . set up the gridfs .. . .. . write the image to mongo .. . .. . read the image to mongo"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
module
|
UNK_RELATION
|
windows-store-apps -- this refers to windows-8 and @placeholder apps only .
|
{
"confidence": [
52.848716735839844,
52.70061492919922,
52.45479202270508,
52.05789566040039,
51.781978607177734,
50.5301513671875,
49.88985061645508,
49.80734634399414,
48.31568145751953,
48.253623962402344,
47.81842803955078,
47.75580978393555,
47.67376708984375,
47.523468017578125,
46.413055419921875,
46.06529235839844,
45.887550354003906,
45.887550354003906,
45.876564025878906,
45.812896728515625,
45.812896728515625,
45.812896728515625,
45.73436737060547,
45.63459777832031,
45.62223434448242,
45.62223434448242,
45.62223434448242,
45.62223434448242,
45.42707061767578,
45.21092224121094,
44.77028274536133,
44.733306884765625,
44.733306884765625,
44.66164779663086,
44.618743896484375,
44.58011245727539,
44.499183654785156,
44.467628479003906,
44.107383728027344,
44.107383728027344,
44.107383728027344,
44.107383728027344,
44.107383728027344,
44.096397399902344,
44.06391906738281,
44.05052947998047,
43.528175354003906,
43.46709060668945,
43.387901306152344,
43.211509704589844,
43.119449615478516,
43.119449615478516,
43.119449615478516,
43.119449615478516,
42.994232177734375,
42.935569763183594,
42.924285888671875,
42.77738952636719,
42.05533981323242,
42.05533981323242,
42.036163330078125,
41.97380447387695,
41.97380447387695,
41.97380447387695,
41.97380447387695,
41.97380447387695,
41.97380447387695,
41.97380447387695,
41.97380447387695,
41.97380447387695,
41.97380447387695,
41.97380447387695,
41.97380447387695,
41.83277130126953,
41.800079345703125,
41.76837158203125,
41.76837158203125,
41.76837158203125,
41.67709732055664,
40.97313690185547,
40.97313690185547,
40.97313690185547,
40.61389923095703,
40.571197509765625,
40.571197509765625,
40.55000686645508,
40.535404205322266,
40.479923248291016,
40.30078125,
40.2279052734375,
40.09168243408203,
40.04503631591797,
40.043922424316406,
40.01637268066406,
40.0120735168457,
39.80009078979492,
39.687156677246094,
39.522743225097656,
39.47102355957031
],
"content": [
"Yes Windows RT apps for the Windows 8 Store .",
"The main issue is that BCRYPT is supported for the Universal Windows Platform apps aka Windows 10 Store apps but was not supported for Windows 8.x Store apps .",
"The project is a Windows Store apps .",
"Windows 8 store apps cannot be screensavers .",
"If you look at a property that is available for Windows Store apps such as TextEncoding http : msdn.microsoft.com en-us library windows apps system.servicemodel.httpbindingbase.textencoding.aspx it clearly says : .NET for Windows Store apps Supported in : Windows 8 .",
"What s the difference between Windows Store apps introduced in Windows 8 and Universal Windows Platform apps introduced in Windows 10 .",
"No it works with Desktop apps but not with Windows Store Apps",
"Do Windows 8 Store apps have something like a MessageBox",
"No wonder there are not many Apps in the Windows Store",
"Everywhere it says windows-store-apps only access library files and not other locations on the hard drives of PC .",
"This is not possible in Windows Store Apps .",
"Is there ANY binding that supports sessions for Windows Store apps",
"It is different from windows-8 apps that can be directly downloaded from the store .",
"Type.GetTypeCode is supported in full .NET apps and non-Store portable class libraries but not in Windows Store apps .",
"Since it is specific to Windows it is not available for Windows Store Apps .",
"All those platforms support the BCrypt APIs but they aren t available to Windows Store apps aka Metro style apps in Windows 8.x directly .",
"I am unable to use any Windows Store apps .",
"Are the DirectX Media Object COM interfaces supported in Windows Store apps",
"I ve found a list of supported Win32 and COM APIs in Windows Store apps http : msdn.microsoft.com en-us library windows apps hh452756.aspx and DMO is not on it .",
"This code will not work for windows-store-apps",
"Is this currently possible with Windows store apps",
"Is there any example for Windows Store apps",
"And so would that also mean that VS2013 on Windows 8 can only create Windows 8.1 store apps",
"..Only the Enterprise version of Windows 8 will have the capability to Side Load Apps .",
"There are currently over 210 000 reviews for apps in the Windows Store .",
"There is no equivalent in the available API s for Windows Store Apps .",
"Note that D MBCS is not an option for Windows Store apps .",
"There is no control called an alert dialog for Windows Store apps .",
"They are all say Windows Store apps because these APIs are supported for Windows 10 .",
"We all know that Windows 8 apps will run on Windows 10 but MS seems to never have told anybody that Windows 8 only apps will not be in the new store .",
"I have developed app in Windows 8 store apps and also developing Windows Phone 8 and Windows Phone 8.1 SilverLight Apps .",
"No Windows 10 devices will not be able to see Windows 8.x apps in the Windows Store .",
"Windows 10 users can download Windows 8.x and Windows 10 apps from the store .",
"Also just remember this sentence - All Windows apps are not Windows 8 apps",
"In my point of view - UWP apps ARE Windows Store apps as soon as you publish or plan to publish them in the Windows Store",
"Code signing is for Windows Classic apps or drivers and not for Windows Store apps .",
"Documentation links : Run Windows Store apps on a remote machine from Visual Studio http : msdn.microsoft.com en-us library windows apps hh441469.aspx Deploy Windows Store apps from Visual Studio http : msdn.microsoft.com en-us library windows apps hh771031.aspx and Get a developer license Store apps http : msdn.microsoft.com en-us library windows apps xaml hh974578.aspx",
"Windows 10 devices definitely can see Windows 8.x apps in the Windows Store readily provable : search for Windows 8 and you ll find several .",
"Is it possible to use WCF reliable sessions in Windows Store apps",
"I can t use WSHttpBinding because Windows Store apps don t support it .",
"@JoeMjr2 Exactly .NET for Windows Store apps is not .NET Framework 4.5 .",
"I am struggling with the file api of windows-store-apps .",
"This library is not included for windows-store-apps : am I right",
"As stated in the documentation http : msdn.microsoft.com en-us library windows apps system.servicemodel.nethttpbinding.reliablesession.aspx Version Information section ReliableSession property is not available for Windows Store apps i.e .",
"It is true that Assigned Access only works with Windows Store Apps however these Apps don t have to be in the store necessarily .",
"Windows 8 apps on the other hand will run on both 8 and 8.1 .",
"The page you re referring to is only applicable to Windows Store apps not Windows Phone 8.1 .",
"I followed tutorial TFS Continuous Integration for Windows 8.1 Store Apps with SDK dependencies https : cmatskas.com tfs-continuous-integration-for-windows-8-1-store-apps-with-sdk-dependencies .",
"However it s only available in Windows 8.1 apps not Windows 8.0 .",
"What are the URI schemes supported in Windows 8 apps",
"In .NET for Windows Store Apps both are not available .",
"There is a set of PowerShell cmdlets for managing Windows Store apps .",
"I m working on a test script for Windows Store apps .",
"Is cocoon bootstrap compatible for windows-8.1 store apps",
"For the regular Windows Store apps : .. . .. . 1 .",
"Check out Creating and retrieving resources in Windows Store apps http : msdn.microsoft.com en-us library windows apps hh694557 and sample in ResourceManager http : msdn.microsoft.com en-us library windows apps windows.applicationmodel.resources.core.resourcemanager.aspx .",
"Of course the ToggleSwitch is used in Windows Store and Windows Phone apps .",
"The Universal Windows Platform uses the same basis of technology that was developed for the Windows 8 Store apps .",
"Please see my answer on sideload windows-8 apps to multiple devices",
"Unfortunately that s not the case with Windows 8 Metro js apps .",
"Yes i used it but its only for checkout I need to interact with merchant API in windows-store-apps and windows-phone apps .",
"I understand Windows store apps can also use HTML5 .",
"Microsoft s model with the metro windows-store-apps is a more restricted safer model .",
"I am working on a PDF viewer for Windows 8.1 Store apps .",
"I have one doubt regarding the working of VisualStateManager in Windows Store apps .. .",
"I have a problem with TextBlock text selection Windows Store apps C .",
"It is understood need to get license for publishing and distributing Windows Store Apps .",
"Inside the individual files are thousands of URL s to the web pages of Windows Store apps .",
"There is more to the Windows Store than just apps there are also reviews and lots of them .",
"Conversion of PPT to PDF is not built-in to PDFNet SDK for Windows Store Apps .",
"Windows store apps don t have direct access to the filesystem .",
"Because of this ExifReader doesn t provide a string constructor in Windows Store apps .",
"I know that apps submitted to Windows Store are compiled using .NET Native .",
"msdn.microsoft.com en-us library windows apps br230302.aspx IO http : msdn.microsoft.com en-us library windows apps br230302.aspx IO",
"In Windows 8.1 Apps we can link-to store apps using ms-windows-store protocol .",
"I found that Windows 8 Store Apps fail to detect second screen which is necessary for me .",
"We have several Windows 8 Store C++ apps that need to maintain configuration and data files .",
"The goal of this batch-file is to run Windows 8 Store Apps Unit Tests automatically without user interaction .",
"http : stackoverflow.com questions 26524265 sideload-windows-8-apps-to-multiple-devices 31005993 31005993 for how to sideload apps",
"Finally open the Windows Store click on Apps click the download icon and then check for updates .",
"However this should not prevent Visual Studio from working nor you from being able to write Windows Store apps .",
"Due to the sandbox environment Windows Store apps run in it has been replaced by StorageFile .",
"The store knows that older apps are still compatible and will offer them but not Win 7 apps : Win 7 isn t support Windows Store apps .",
"In Windows 8.1 ApplicationViewState is deprecated and LayoutAwarePage is no longer included in the Visual Studio templates for Windows Store apps .",
"The string constructor is not available in Windows Phone Windows Store apps because they aren t allowed direct filesystem-access .",
"Only Store Apps run from VS gives that error other Store apps work fine .",
"My understanding is : .. . .. . Surface RT : only Metro apps can be installed and only from the Store compare to iPad .. . Surface Pro : Metro apps can be installed from the Store regular apps can be installed from anywhere compare to a Windows 8 PC .",
"Is msdn.microsoft.com en-us library windows apps http : msdn.microsoft.com en-us library windows apps windows.networking.proximity.peerfinder.allowbluetooth.aspx true",
"I am working with Windows Store apps .",
"You can provide the App to your clients via Sideloading http : blogs.msdn.com b windowsstore archive 2012 04 25 deploying-metro-style-apps-to-businesses.aspx .. . .. . If not via the Windows Store how do I deploy LOB Windows 8 apps .. . .. . You can sideload Windows Store apps .",
"Windows 10 mobile users can download Windows Phone 7 and Windows Phone 8 apps as well .",
"Extracted from File access permissions in windows-store-apps http : msdn.microsoft.com en-us library windows apps hh967755.aspx .. . .. . You can access certain file system locations like the app install directory app data locations and the Downloads folder with Windows Store apps by default .",
"There is a nice article Top 10 Differences between developing Windows Phone and Store apps http : www.slideshare.net sharpgis top-10-differences-between-developing-windows-phone-and-store-apps and it recommend GridView as a pair to LongListSelector .",
"Windows Store apps can access only their own directories but not the private files of the admin user .",
"After a thorough investigation we came up with the understanding that you can publish java running apps as desktop apps only .",
"It says that it is possible to upgrade with a APPX package which are exclusive to Windows Runtime apps WP and Windows store apps .",
"It is easily demonstrated that some Windows 8 apps can be found by search so it is definitely wrong to say that Windows 10 will not see any Windows 8.x apps .",
"Petzold from his book about Windows Store Apps : .. . .. . To do something like this in a generalized way you d need access to font metrics which are available to a Windows 8 application only through DirectX .",
"OK WCF service proxies are called and managed differently in Windows Store apps ."
]
}
|
{
"confidence": [
48.67934036254883,
47.28364944458008,
46.923519134521484,
46.76362228393555,
46.75316619873047,
46.693031311035156,
46.52642059326172,
46.50694274902344,
46.48542785644531,
46.061737060546875,
45.83035659790039,
45.72169876098633,
45.4214973449707,
44.926143646240234,
44.68671798706055,
44.6337890625,
44.486572265625,
44.18947982788086,
44.06853485107422,
43.97095489501953
],
"content": [
"Question : Is it possible to use WCF reliable sessions in Windows Store apps I am writing a Windows Store app in Visual Studio 2012 Professional using C . I am trying to access a WCF service using sessions . I can t use WSHttpBinding because Windows Store apps don t support it . I found that Windows Store apps DO support NetHTTPBinding which supports reliable sessions but I can t seem to access the ReliableSession property of the binding nor can I access the constructor that takes bool reliableSessionEnabled as a parameter . Is there ANY binding that supports sessions for Windows Store apps -Joe .. . Answer : As stated in the documentation http : msdn.microsoft.com en-us library windows apps system.servicemodel.nethttpbinding.reliablesession.aspx Version Information section ReliableSession property is not available for Windows Store apps i.e . WCF reliable sessions are not supported . This article http : msdn.microsoft.com en-us library hh556233.aspx describes the complete subset of WCF functionalities available in Windows Store apps . Although NetHttpBinding is included ReliableSessionBindingElement is not . Comment : Damir I just looked a that page and I don t see where it says that it s not available for Windows Store apps . Under Version Information all it says is .NET Framework Supported in : 4.5 Comment : @JoeMjr2 Exactly .NET for Windows Store apps is not .NET Framework 4.5 . If you look at a property that is available for Windows Store apps such as TextEncoding http : msdn.microsoft.com en-us library windows apps system.servicemodel.httpbindingbase.textencoding.aspx it clearly says : .NET for Windows Store apps Supported in : Windows 8 . Comment : Ah that makes sense . Thanks",
"Question : Do Windows 8 Store apps have something like a MessageBox I need something like a popup window to show the user e.g . when a input is wrong or a error happened . Is there something already in the API or do I have to make my own .. . Answer : You re looking for the MessageDialog class http : msdn.microsoft.com en-us library windows apps windows.ui.popups.messagedialog Comment : What I see here is that MessageDialog is only supported on Windows Phone 8.1 . Is there an 8.0 equivalent",
"Question : I am planning to realize apps to be used from Surface Win8 new tablet . Will it be necessary to pass from the new Windows App Store as it happens for iOS or will I be able to distribute the .exe without passing from Microsoft .. . Answer : My understanding is : .. . .. . Surface RT : only Metro apps can be installed and only from the Store compare to iPad .. . Surface Pro : Metro apps can be installed from the Store regular apps can be installed from anywhere compare to a Windows 8 PC . Note that is only from I gathered by reading tech blogs not coming from an official Microsoft source .",
"Question : Can someone please help me learn how to read and navigate the msdn docs Is this not supported in .net 4.0+ http : msdn.microsoft.com query dev11.query appId Dev11IDEF1 l EN-US k k Type.GetTypeCode k GetTypeCode k TargetFrameworkMoniker-.NETCore Version 3Dv4.5 k DevLang-csharp rd true http : msdn.microsoft.com query dev11.query appId Dev11IDEF1 l EN-US k k Type.GetTypeCode k GetTypeCode k TargetFrameworkMoniker-.NETCore Version 3Dv4.5 k DevLang-csharp rd true .. . .. . I m finding it very difficult to find my way through the docs and know what applies to Windows Store Apps specifically.. . .. . Answer : Type.GetTypeCode is supported in full .NET apps and non-Store portable class libraries but not in Windows Store apps . If you look at the Type class documentation in .NET 4.5 http : msdn.microsoft.com en-us library 42892f65.aspx you can see a green shopping bag next to all of the members which are supported in Windows Store apps . You can also look at the bottom of the page for each individual member . For example Type.GetArrayRank http : msdn.microsoft.com en-us library system.type.getarrayrank.aspx has this : .. . .. . Version Information .. . .NET Framework .. . Supported in : 4.5 4 3.5 3.0 2.0 1.1 1.0 .. . .NET Framework Client Profile .. . Supported in : 4 3.5 SP1 .. . Portable Class Library .. . Supported in : Portable Class Library .. . .NET for Windows Store apps .. . Supported in : Windows 8 .. . .. . .. . whereas Type.GetTypeCode http : msdn.microsoft.com en-us library system.type.gettypecode.aspx has : .. . .. . Version Information .. . .NET Framework .. . Supported in : 4.5 4 3.5 3.0 2.0 1.1 1.0 .. . .NET Framework Client Profile .. . Supported in : 4 3.5 SP1 .. . Portable Class Library .. . Supported in : Portable Class Library .. . .. . Note the lack of a mention of Windows Store . Comment : Thanks that s really helpful",
"Question : I m creating a Windows Store app . I need to create a FileStream in order to write some complex data for a proprietary file-format . I add System.IO to my uses but there s no FileStream available . I ve investigating some more and the .NET for Windows Store apps overview guide talks about IsolatedStorage which this library don t even use currently . After some reading I think the real replacement could be FileRandomAccessStream from the nacemspace : Windows.Storage.Streams .. . .. . What is the real equivalent to FileStream to use in a Windows Store app Comment : msdn.microsoft.com en-us library windows apps br230302.aspx IO http : msdn.microsoft.com en-us library windows apps br230302.aspx IO Comment : Why was this downvoted The disappearance of functionalility from the System.IO namespace caught me by suprise too . We are not degrading ourselves to newby bashing are we Comment : @Dabblernl I came late to the party . I was working on a several big sharepoint projects last year and did not have time to try neither the VS2012 previews nor the Windows 8 previews . I now have to catch up and have been reading a lot of articles and the MSDN help these days and I see most articles are dated at near the beginning of 2102 even on late 2011 and all are full of comments and polemic . So for all the folks that participated on that polemic my question looks plain stupid and or lazy . .. . Answer : Due to the sandbox environment Windows Store apps run in it has been replaced by StorageFile . See here for the documentation : - .. . .. . http : msdn.microsoft.com en-us library windows apps windows.storage.storagefile.aspx",
"Question : I am planning to realize apps to be used from Surface Win8 new tablet . Will it be necessary to pass from the new Windows App Store as it happens for iOS or will I be able to distribute the .exe without passing from Microsoft .. . Answer : As far as I aquired information . There are assumptions that the standard Surface have no Desktop mode . That means the pad will be purely comparable with Android and iOS . The Pro version will instead also be delivered with desktop mode also . In normal terms full Windows 8 . If that s the case you can install and run Metro specific applications on Standard or better described Applications developed under WinRT . But with Pro version also windows desktop applications like classic Office and such . UPDATE .. . Based on a few QA from Microsoft they are going to make differences in Windows 8 versions . They are going to offer distribution of apps outside the store . This is an extremely important point in example to business line use and intranet purpose . Though they are about to make this available to an Enterprise version of Windows 8 . ..Only the Enterprise version of Windows 8 will have the capability to Side Load Apps . Side loading bypasses the Windows Store to install custom Enterprise Apps within an organization. . .. . .. . I feel the answer is a little of Yes you are able to distribute the apps outside the store and No for public or world wide use you have to go through the Windows Store . As a distributor it appears to be a work-around . Though the recipients of this side-loaded app have to be aware of that work-around . This is a citate from Microsoft Developer page .. . .. . Preparing other PCs Some business users might not use a PC that supports enterprise sideloading . Common reasons for this are that the edition of Windows that their enterprise uses doesn t support this or the IT admins do not manage the PC . This scenario is becoming increasingly common with the growing trend of personal devices used for work . .. . To enable sideloading of a Metro style app onto a PC : Set Group Policy for Allow all trusted apps to install . If you cannot use Group Policy then you can set this through the following setting : HKEY LOCAL MACHINE Software Policies Microsoft Windows Appx AllowAllTrustedApps 1 Verify that the app is signed by a CA that is trusted on the target machines Activate a special product key by using a script on the target machine to enable sideloading . We ll go into more detail about how the IT admin will acquire the product keys in an upcoming blog post . The product key only needs to be install and activated once on the PC . From link : http : blogs.msdn.com b windowsstore archive 2012 04 25 deploying-metro-style-apps-to-businesses.aspx .. . .. . For Business purpose it appears to be a kind of package distribution where you can select which enterprise users should be eligable for which Windows 8 - metro - applications .",
"Question : Are the DirectX Media Object COM interfaces supported in Windows Store apps I can t seem to find anything that says either way on MSDN . I m thinking of interfaces like IMediaObject http : msdn.microsoft.com en-us library windows desktop dd406926 28v vs.85 29.aspx etc . Comment : I suppose that would be Media Foundation only that is no IMediaObject just IMFTransform . I have no confirmation for this just a guess coming out of announced API availability there . .. . Answer : I ve found a list of supported Win32 and COM APIs in Windows Store apps http : msdn.microsoft.com en-us library windows apps hh452756.aspx and DMO is not on it .",
"Question : I have my Windows 8.0 packages in my Windows Dev Center dashboard . I would like to know if there s a way a Windows 10 user to see and download my app from Windows Store . It seems it isn t working . How to do it Do I have to retarget my project to Windows 10 Comment : Please un-accept my answer as I would like to delete it . If you look at the comments there is some controversy about whether it is correct . I apologize for any trouble . .. . Answer : Windows 10 users can download Windows 8.x and Windows 10 apps from the store . Windows 10 mobile users can download Windows Phone 7 and Windows Phone 8 apps as well . Basically anything that was available for Windows 8 will still be available for Windows 10 . Anything that was available for Windows Phone 8 will still be available for Windows 10 Mobile . You don t need to upload packages for each platform you want to target although it s recommended . The store will pick the best available . Watch the Build Talk Store : Deep Dive on Publishing Universal Windows Apps https : channel9.msdn.com Events Build 2015 3-710 for more background . If your users have trouble finding your app when searching the store then you can provide a direct URL for them : https : www.microsoft.com store apps . See View app identity details https : msdn.microsoft.com en-us library windows apps mt148561.aspx for more info . You can find these URLs expanded in your Dev Center Dashboard under App Management App Identity this is snipped from a Silverlight only app : it still has a URL for Windows 10 and runs on Windows 10 Mobile : .. . .. . shared links image http : i.stack.imgur.com ZyBAf.png Comment : You are technically correct in that if a Win 10 user can find my app that they can download and install it . However the problem is one of search . Win 10 users cannot find my app either by name or by keyword . It works fine on Windows 8 . As for sharing a link that can only go so far . Ultimately I need my app to be searchable from the store . Comment : Yes but that s a different problem from what Leonardo asked and a very different statement from what you answered . Your app having search problems doesn t generalize to all Windows 8.x apps not being offered . That your app is a Windows 8 app may not be related to your problem at all the search heuristic is a black-box to me too . It is easily demonstrated that some Windows 8 apps can be found by search so it is definitely wrong to say that Windows 10 will not see any Windows 8.x apps .",
"Question : I m developing a Windows store app and need to display files in user computer like in file explorer . Everywhere it says windows-store-apps only access library files and not other locations on the hard drives of PC . And I don t mean something like FileOpenPicker I want to show file on may application like explorer . What is the library I should use System.IO class missing those methods on store apps . I know it is possible . Cos I have seen many applications in store has done that . Few examples are .. . .. . https : www.microsoft.com en-us store apps file-browser 9wzdncrfj29m https : www.microsoft.com en-us store apps my-explorer 9wzdncrfj0lm .. . .. . Thanks in advance .. . Answer : Apps like the ones you mention typically use a FolderPicker https : msdn.microsoft.com en-us library windows apps xaml windows.storage.pickers.folderpicker.aspx to let the user pick the root of the file system and then remember that permission in a FutureAccessList https : msdn.microsoft.com en-us library windows apps windows.storage.accesscache.storageapplicationpermissions.futureaccesslist.aspx for later use . Your research was correct : apps cannot get general access to the file system . APps can declare access to the libraries and app have automatic access to their local data but anywhere else requires user permission via a picker or equivalent . See File access permissions https : msdn.microsoft.com en-us library windows apps xaml mt188700.aspx on MSDN .",
"Question : I planned to create a Windows 8 Store App but reluctantly had to switch to desktop application . I found that Windows 8 Store Apps fail to detect second screen which is necessary for me . The intention still is to mimic the behaviour of Windows Store App as much as possible . Partly to educate myself but also to use a modern nice design . I use WPF with very similar design App bars Navigation bar snappy await-async pattern etc .. . .. . Now I come to the point where I need to store settings I would really like to use the very convenient central storage available through Microsoft Live login . Is that possible even if I don t have Windows Store App Clients might be Windows 7 or Windows 8 . Can I make the user login to Microsoft Live and use these facilities .. . Answer : Many WinRT APIs are available from desktop applications in addition to Windows Store applications . Windows.Storage.ApplicationData http : msdn.microsoft.com en-US library windows apps windows.storage.applicationdata appears to support desktop apps . Look under the Requirements section in the documentation : .. . .. . Minimum supported client : Windows 8 Windows Store apps desktop apps .. . .. . Someone at Intel posted on how to use WinRT APIs from desktop apps http : software.intel.com en-us articles using-winrt-apis-from-desktop-applications . The post is from September 2012 and the screenshots appear to be for an older version of the MSDN documentation . Just keep that in mind . Dave Bennett of Microsoft has a useful blog post which will introduce you to roaming your app data http : blogs.msdn.com b windowsappdev archive 2012 07 17 roaming-your-app-data.aspx . I may have misunderstood you but I think what I mention above is what you want instead of using the Live Connect APIs http : msdn.microsoft.com en-us library live hh533665.aspx . Comment : Thanks for your informative answer I did read Dave Bennetts blog post before but missed the Requirement section in MSDN documentation . It is good that it is possible to do but in my case I don t want to exclude Windows 7 applications yet so to ONLY target Windows 8 will not be worth it . Comment : Happy to help . If you want to revisit your initial goal of building a Windows Store app you can get free consultations from aka.ms genappsignup http : aka.ms genappsignup . Feel free to contact me through the link I list in my StackOverflow profile .",
"Question : I m working under the VS2013 ARM Developer Prompt . I m trying to use Microsoft s Cryptography Next Generation CNG but I m experiencing some non-trivial problems . I m trying to compile a simple test program : .. . .. . I attempt to compile it with : .. . .. . When I attempt to include ntstatus.h scrapped from PJ Naughter s blog https : naughter.wordpress.com 2015 05 15 changes-in-the-windows-10-sdk-compared-to-windows-8-1-part-one because I can t seem to find anything useful from Microsoft : .. . .. . I can t make it a LONG because Microsoft macros like BCRYPT SUCCESS cast it to a NTSTATUS code . I can also duplicate the missing NTSTATUS problem under VS2012 ARM Developer Prompt . What header file should I include to get a declaration for NTSTATUS under ARM .. . .. . I think this might be related but I m not certain : fatal-error LNK1104 : cannot open file bcrypt.lib when building for Surface RT tablet http : stackoverflow.com q 36930563 . About all I know is this stuff does not appear to be well tested by Microsoft because there are too many damn problems trying to use it . .. . Answer : The main issue is that BCRYPT is supported for the Universal Windows Platform apps aka Windows 10 Store apps but was not supported for Windows 8.x Store apps . VS 2013 toolset always uses the Windows 8.1 SDK so you were building a Windows 8.1 Store app . When you tried VS 2012 you were using the Windows 8.0 SDK so you were building a Windows 8.0 Store apps . Again neither of this support BCRYPT . If you build with VS 2015 and have the Windows 10 SDK installed then your code builds fine . Note that D MBCS is not an option for Windows Store apps . All Windows Store apps should be built for Unicode DUNICODE D UNICODE and not ANSI Multibyte as you were trying to do . Also be sure to link with windowsapp.lib to make sure you pick up the correct DLLs when you link . You can easily confirm that all the errors you are seeing happen in VS 2012 2013 if you do not have include bcrypt.h in the file at all . The DWINAPI FAMILY WINAPI FAMILY APP ensures that all unsupported APIs are undefined so with Windows 8.x Store that header was basically an empty file . Comment : Thanks Chuck . It appears all of Microsoft s documents are broken . See for example BCryptOpenAlgorithmProvider http : msdn.microsoft.com en-us library windows desktop aa375479 28v vs.85 29.aspx BCryptGenRandom http : msdn.microsoft.com en-us library windows desktop aa375458 28v vs.85 29.aspx and BCryptCloseAlgorithmProvider https : msdn.microsoft.com en-us library windows desktop aa375377 28v vs.85 29.aspx . Comment : They are all say Windows Store apps because these APIs are supported for Windows 10 . I agree it s not helpful to you that it fails to mention UWP or Windows 10 but at this point MSDN is only telling you about UWP not Windows 8.x Store . Comment : Thanks again Chuck . Would you mind taking a look at Preprocessor definitions for Universal Windows Platform http : stackoverflow.com q 36072350 . These questions are holding up the port of a few C C++ libraries I work with OpenSSL Crypto++ Cryptlib and Botan . Comment : Thanks again Chuck . Why does Microsoft state the API is available in NIST documents http : csrc.nist.gov groups STM cmvp documents 140-1 140sp 140sp1893.pdf The documents on file with NIST are legally binding unlike broken MSDN documentation . Here are the platforms they claim to provide the API : Microsoft Windows 8 Microsoft Windows Server 2012 Microsoft Windows RT Microsoft Surface Windows RT Microsoft Surface Windows 8 Pro Microsoft Windows Phone 8 Microsoft Windows Storage Server 2012 . Comment : All those platforms support the BCrypt APIs but they aren t available to Windows Store apps aka Metro style apps in Windows 8.x directly . Instead you can use the Windows Runtime class HashAlgorithmProvider https : msdn.microsoft.com en-us library windows.security.cryptography.core.hashalgorithmprovider.aspx . There is also a limited form of Win32 development for ARM devices for OEMs . That said I m not an expert in government compliance so you should contact Microsoft directly . For the Universal Windows Platform the original Win32 BCrypt APIs are exposed to UWP apps .",
"Question : I am trying to develop xaml app for Windows Store . During development I faced a problem . I want to save a generic list of object to the local store but each time I try to save the list it fires an exception of type not supported . Can anybody help me out on saving and restoring generic list in the localstore in windows-8 app . Comment : How did you try to save it And what type your objects have Comment : ApplicationData.Current.LocalSettings.Values.Add key-value here value : is the object i want to save which is the list of class-object .. . Answer : Take a look on this article Accessing app data with the Windows Runtime Windows Store apps http : msdn.microsoft.com en-us library windows apps xaml hh464917.aspx you cannot store in App Settings anything except Windows Runtime base types http : msdn.microsoft.com en-us library windows apps xaml br205768.aspx . I tried to approaches for myself : a use serialization with JSON.net http : json.codeplex.com serialize data to file on suspending and restore it on startup . b use sqlite http : sqlite.org and sqlite-net https : github.com praeclarum sqlite-net to just use simple db in my app .",
"Question : OK first I shall point that I am completely new to Windows Apps Development which is good since I am trying to develop a Windows Store App for PC to use a PrimeSense Scanner connected via USB . I have asked a more specific question about this here http : stackoverflow.com questions 24312668 primesense-scanner-with-openni-doesnt-initialize-on-windows-8 . This time I have a more generic question which is more related to Windows Store app development . I am using VS2013 Express and compiling for Win32 . When I compile my application for VS2012 and run it as an execcutable file I can connect to the scanner perfectly . But I can t do the same with VS2013 and running it as a Store app . I know the device is connected and the drivers are updated and all dlls file placed in the Widnows System 32 directory . I have also added all Capabilities to the App Manifest and also added the following Device Capability .. . .. . The vid and pid obviously match the corresponding codes of the device . One of the errors I recieve when trying to conenct to the scanner using OpenNI is : .. . .. . This error is quite frustrating since I know the device is connected . So I tend to think that there is some level os specificity on the Windows Store App side of the game that is not enabling my to connect to the device . As I said I am compiling for Win32 . Is there a chance that the drivers will not work for a Windows Store App . Is there some extra stuff I should do inside the Windows Store App logic that I am not doing and that is necessary to connect the USB device I am sorry but I am completely new to Windows Store App development . Thank you . Comment : Please can you confirm that your title ask for Windows store app but in the middle you say VS2013 desktop app will not find the scanner . I am a little confused . Do you mean VS2013 Store App will not find the scanner Comment : Yes I meant VS2013 Store App . Thanks for pointing that out . .. . Answer : You can t do that from metro apps . You typically create a handle to that usb device by calling CreateFile with that object mananger path http : en.wikipedia.org wiki Object Manager 28Windows 29 as the file to create . CreateFile http : msdn.microsoft.com en-us library windows desktop aa363858 28v vs.85 29.aspx is not allowed http : blogs.microsoft.co.il pavely 2012 05 03 win32-and-metrocreatefile2 in metro apps - desktop apps only - and its replacement CreateFile2 specifically doesn t allow opening object manager objects . Furthermore the documentation for CreateFile2 states that in metro apps this function can only open files and directories and not things like pipes mailslots consoles etc . . See also this post on social.msdn http : social.msdn.microsoft.com Forums windowsapps en-US 29c363f4-9873-4890-9379-22e5b4f73f6f opening-hid-device-stream-from-a-metroapp-createfile2-failed- forum tailoringappsfordevices .. . .. . Unless I missed something I don t think this is possible . Comment : Ok I suppose it s not possible to do that by now.. . Hope there s a change in the future . thanks Comment : @MobileCushion - Unfortunately I don t think this is scheduled to change . Microsoft s model with the metro windows-store-apps is a more restricted safer model . There is potentially one workaround - if you re allowed to install a desktop program along side your metro app you could have the desktop program handle shuttling data to the usb device from your metro app . But I don t know how you d distribute that .",
"Question : I have a program that is written in Java and is wrapped by an installer . It requires Java 1.7 . If I run the certification with Windows App Certification it passes with one warning for the case Java 1.7 is already installed . But if Java 1.7 is not installed the certification stops as the installer will ask for the Java installation . Does someone know if it is possible to add this Java app to the Windows store Unfortunately I haven t found any information on that . I could just go for the certification but If Microsoft would not accept it it would not be worth the effort . After a view phone calls and emails it seems that even Microsoft itself seems not be able to answer this questions : - .. . Answer : in a mail Microsoft told me they do allow Java programs as Desktop apps . After a thorough investigation we came up with the understanding that you can publish java running apps as desktop apps only . You will need to sign up as a company in order to do so . The reason that you can publish java running apps as desktop apps is due to the fact that desktop apps are usually just advertised in the store . The description page usually contains a link that brings you to the developer s webpage in order for you to download the app . It is different from windows-8 apps that can be directly downloaded from the store . Please let me know if this answers your question . Sincerely .. . .. . Joel name removed for his privacy olivier .. . .. . @microsoft.com .. . .. . 4697756905 .. . .. . Monday : 8 AM to 5 PM CST .. . .. . Tue-Fri : 1 PM to 10 PM CST .. . .. . Tier 3 Marketplace Escalation Engineer .. . .. . Microsoft Las Colinas Comment : This is interesting as I got told from support that it is not allowed . The question is do you need to bundle Java VM with your APP Which would be a license problem . Have you tried it We did not try as you also need to buy and use the special certificate from Mircrosoft and Symantec . Comment : For now I do not think it is necessary . When testing my app with the ToolKit there were no warnings failures coming up that a Java VM is missing . I am in the process of trying right now . After this automated test it will be tested by actual people from microsoft too when I submit it to them . Then the need to pack a Java VM might come up anyway . When I know more I will update this answer .",
"Question : What s the difference between Windows Store apps introduced in Windows 8 and Universal Windows Platform apps introduced in Windows 10 . How much do they share from development point of view . If I spent time learning how to build Windows Store apps can this knowledge be transferred to UWP development .. . Answer : The Universal Windows Platform uses the same basis of technology that was developed for the Windows 8 Store apps . This includes AppX packaging with manifests the App Container security context CoreWindow presentation model same appmodels XAML XAML+DirectX DirectX etc . The difference is that UWP apps can run as is on a Windows 10 PC the Xbox One and Windows 10 Mobile . The main differences in the development model are that UWP supports more APIs . There are some APIs that have changed particularly from Windows phone 8.x but if you have written a Windows 8 Store app moving it to Windows 10 is mostly a recompile . You use the VS 2015 toolset rather than the VS 2012 or VS 2013 toolset . Unless you have some compelling need to support Windows 8 Store I d suggest just going with UWP . There s less code churn for existing codebases as a number of Win32 APIs that were not supported for Windows 8 Store apps are supported for UWP . See Dual-use Coding Techniques for Games https : blogs.msdn.microsoft.com chuckw 2012 09 17 dual-use-coding-techniques-for-games-part-1",
"Question : I am using Visual Studio 2013 Professional with a Store developer account connected and I have a Windows 8.1 Lenovo tablet for which I d like to try developing Store apps . I am stuck right now because when I connect my tablet to my laptop which has Visual Studio using the USB port and open Windows Phone Development Registration tool my Windows tablet device is not recognized by it . Any help in letting me know what I am missing would be greatly apprciated . Thanks . Comment : Tablets are not phones Comment : I am coming from Android background where the difference between an Android phone tablet from the point of view of development deployment is not as big . Comment : Yes in the Windows world a tablet is more like a PC than like a phone as opposed to iOS or Android . Please make sure to accept one of the answers or add your own so someone might benefit from this question and answers in the future . .. . Answer : Windows systems aren t locked in the same way as Windows Phones are . You will need a free developer license to run development test packages on the system but don t need to use an external tool to generate it . You can install a developer license with PowerShell by using the Show-WindowsDeveloperLicenseRegistration cmdlet . If you create a package for testing in Visual Studio then the Add-AppDevPackage.ps1 script will request the developer license if the system doesn t already have one . Visual Studio will also request a license for you if you run it on the local system or if you launch the app via the remote debugger . Documentation links : Run Windows Store apps on a remote machine from Visual Studio http : msdn.microsoft.com en-us library windows apps hh441469.aspx Deploy Windows Store apps from Visual Studio http : msdn.microsoft.com en-us library windows apps hh771031.aspx and Get a developer license Store apps http : msdn.microsoft.com en-us library windows apps xaml hh974578.aspx Comment : Thanks for replying . I tried to create an app-package from within Visual Studio 2013 Professional but it created only .appx .appxsym and .appxupload files . I googled a bit more and it does look like it should have created Add-AppDevPackage.ps1 script as well as my development license certificate but these last two things are not created for me . Could you tell me what I am missing Thanks . Comment : PS : I created my app package with Do you want to build packages to upload to Windows Store as No - because with Yes it says Your Microsoft Account is not registered to submit apps to Windows Phone Store . I only have a new free Store Developer account and I want to try out learn for now between my dev machine test device Comment : Found the reason why it was not creating the Add-AppDevPackage.ps1 script with a temporary dev cert - because I was choosing Windows Phone Apps from the Visual Studio templates every time I switched to Windows Apps because I am trying the apps on a tab and not it generates both the cert and the powershell script and I am able to install the app on tab and launch it . Thanks a lot for your inputs guidance",
"Question : What is the best way to go about reading and writing simple configuration data like we used to use App.config and Web.config appsettings available through ConfigurationManager before for use within your Windows 8 Windows RT Windows Store Windows Modern UI App .. . Answer : Metro apps don t have exact equivalent of app.config web.config . Instead you should use package.appxmanifest http : msdn.microsoft.com en-us library windows apps hh464929.aspx package manifest to configure windows store specific values . For local settings you should use ApplicationData http : msdn.microsoft.com en-us library windows apps xaml hh700361.aspx api . If you want to configure application after it is deployed you could simply load remote xml or json file at application-start up . Comment : Thanks Denis you and Akinwale were very close on answers .",
"Question : What s the difference between Windows Store apps introduced in Windows 8 and Universal Windows Platform apps introduced in Windows 10 . How much do they share from development point of view . If I spent time learning how to build Windows Store apps can this knowledge be transferred to UWP development .. . Answer : In my point of view - UWP apps ARE Windows Store apps as soon as you publish or plan to publish them in the Windows Store I was more confused between the terms - Windows Runtime vs . Universal Windows Platform UWP . I now believe the latter is simply an evolution of the former and more of a marketing term . The big difference is that if you want - you can run same binaries on multiple platforms . Most of what you learned about the Windows Runtime of the Windows 8 8.1 days still applies to Windows 10 . You just tend to look for solutions that scale to different target platforms within the same code file rather than having separate project and code files for different targets .",
"Question : What is the best way to go about reading and writing simple configuration data like we used to use App.config and Web.config appsettings available through ConfigurationManager before for use within your Windows 8 Windows RT Windows Store Windows Modern UI App .. . Answer : In addition to the technical answers above its important to understand why there is no config file for these apps . WinRT Windows store apps are client applications so unlike your ASP.NET applications that run on the server and require admin configuration changes end users are not expected to tinker with these changes SQL connection timeouts appSettings you name it hence there is no need for such a config file for these apps .. . .. . Hope it makes sense Comment : .config files were not exclusive to web-applications so I have no idea what your answer is in reference to .",
"Question : null .. . Answer : I am trying to create Windows 8.1 Store Apps using Paypal Merchant API in Visual Studio 2013 update 2 but not able to add Paypal Merchant API using Visual Studio Nuget manger . Here is the link for Paypal Merchant API - https : github.com paypal merchant-sdk-dotnet Comment : You need to use the windows-8 version of the sdk github.com paypal Windows8SDK https : github.com paypal Windows8SDK Comment : Yes i used it but its only for checkout I need to interact with merchant API in windows-store-apps and windows-phone apps ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
windows-8.1
|
UNK_RELATION
|
|
clipboarddata@clipboard@59
|
clipboarddata -- questions dealing with editing and using @placeholder data .
|
{
"confidence": [
25.236480712890625,
25.23322296142578,
24.178756713867188,
24.112112045288086,
23.274982452392578,
22.781164169311523,
22.781164169311523,
22.781164169311523,
22.781164169311523,
21.648269653320312,
21.609142303466797,
21.42315673828125,
21.41969871520996,
21.280452728271484,
19.883888244628906,
19.883888244628906,
19.883888244628906,
19.883888244628906,
19.73834228515625,
19.73834228515625,
19.514266967773438,
19.28061866760254,
18.754201889038086,
18.754201889038086,
18.754201889038086,
18.754201889038086,
18.754201889038086,
18.754201889038086,
18.754201889038086,
18.754201889038086,
18.754201889038086,
18.61397361755371,
18.61397361755371,
18.47522735595703,
18.350574493408203,
18.233627319335938,
18.233627319335938,
18.233627319335938,
18.233627319335938,
18.15625,
18.101369857788086,
17.99292755126953,
17.629833221435547,
17.629833221435547,
17.49343490600586,
17.428569793701172,
17.428569793701172,
17.428569793701172,
17.428569793701172,
17.428569793701172,
17.428569793701172,
17.428569793701172,
17.428569793701172,
17.428569793701172,
17.428569793701172,
17.428569793701172,
17.428569793701172,
17.428569793701172,
17.428569793701172,
17.428569793701172,
17.41193199157715,
17.41193199157715,
17.403396606445312,
17.1092586517334,
16.852035522460938,
16.644134521484375,
16.61725616455078,
16.61725616455078,
16.61725616455078,
16.61725616455078,
16.61725616455078,
16.61725616455078,
16.61725616455078,
16.473461151123047,
16.473461151123047,
16.304201126098633,
16.304201126098633,
16.304201126098633,
16.304201126098633,
16.282245635986328,
16.282245635986328,
16.090030670166016,
16.090030670166016,
15.962289810180664,
15.827627182006836,
15.761672019958496,
15.708553314208984,
15.708553314208984,
15.708553314208984,
15.708553314208984,
15.708553314208984,
15.708553314208984,
15.6856050491333,
15.650175094604492,
15.49288558959961,
15.426847457885742,
15.302743911743164,
15.021479606628418,
14.979084014892578,
14.979084014892578
],
"content": [
"I m implementing copy-paste functionality into a browser application using the ClipboardData API as explained in this answer .",
"In Chrome I see the clipboardData object in Firefox I do not .",
"This doesn t help because CKEditor doesn t include support for the clipboardData object in Chrome you can t read the image data that s why I want to go straight to the base event .",
"I used following code : .. . .. . using the above code in Chrome and Firefox i am getting Clipboarddata undefined in case of image .",
"http : stackoverflow.com questions 5551338 how-to-read-clipboard-data-in-cross-browser",
"I m trying to read the clipboardData attribute of a paste event for a plugin that I m developing for CKEditor 4 .",
"Here I want to know whether the copied text not selected is retrievable through the clipboarddata object or not .",
"I tried a lot with the HTML5 Clipboard API but besides text and HTML nothing works the clipboardData is always emtpy.. .",
"But when I tried to find documentation for it in a Javascript reference http : www.w3schools.com jsref obj window.asp clipboardData was nowhere to be found .",
"Possible duplicate of stackoverflow.com questions 7635994 http : stackoverflow.com questions 7635994 getting-data-off-the-clipboard-inside-a-backgroundworker .",
"To avoid doing that you can try using the XML Spreadsheet Format : C Add excel text-formatted data to clipboard http : stackoverflow.com questions 15764828 c-sharp-add-excel-text-formatted-data-to-clipboard",
"Is it possible to put binary-data in the clipboard with a specific data flavor",
"Before you get data from the clipboard using the GetClipboardData function you have to check that the clipboard contains data in the format that you expect .",
"I ve established that in Chrome if I listen to the document object for a paste event then the event object I get passed in the handler will contain the clipboardData attribute .",
"Then I would expect the problem is you re asking for bitmap data but using a console window handle .",
"So depending on the data format which you have already determined using IsClipboardFormatAvailable you have to cast it to the corresponding type .",
"So depending on the data format which you have already determined using isClipboardFormatAvailable you have to cast it to the corresponding type .",
"We are using a 3D CAD application which allows to copy the 3D data in a special format to the clipboard .",
"Not working for me - clipboard still have text data",
"It seems custom data formats for the clipboard are not directly supported .",
"In my search http : stackoverflow.com questions 5277882 how-to-select-all-webview-content-using-javascript for a Javascript way to programmatically select WebView content I encountered this Javascript code snippet http : stackoverflow.com questions 4567687 javascript-click-copy-the-content-to-the-clipboard which uses a method named setData in a member named clipboardData in the window object .",
"The problem is i sometimes need to copy-paste passwords or other sensitive data from 1Password for example and i was wondering if there was a way to not log this type of data .",
"There is a voluntary methodology for password programs to notify clipboard monitors to NOT capture the data .",
"Console windows don t recognize bitmap data only text .",
"I m trying to clear the Clipboard data in android as follow but its not clearing it .",
"Check this out.. . How to read clipboard data in cross-browser",
"Is it possible to copy the data into a separate memory than the global clipboard .",
"If it is different you can perform the action you want with the new data .",
"It works great to intercept clipboard data for one element with an id .",
"In my context I cannot have the data of foooo1 and foooo2 in one place .",
"But I don t see anything about other data flavors .",
"does clipboard data also has n or t",
"You can get copied files but not data .",
"Apart from that the specs appear state that clipboardData should just be a dataTransfer object so to me it would make sense that the files attribute shouldn t have length 0 .",
"Please create an answer instead of editing your question .",
"When I use str clipboard paste in MatLab all text data copied from excel are fine but the numerical data copied loss some decimal places .",
"I would like to add also that if the handle returned from GetClipboardData is itself a pointer to the first byte of the data such as when the data format is CF BITMAP then GlobalLock should not be called .",
"Place text on clipboard with the appropriate OS clipboard format description .. . .. . Otherwise if data is of a type listed in the mandatory data types list .. . .. . Place part on clipboard with the appropriate OS clipboard format description .. . .. . Otherwise .. . .. . This is left to the implementation. .",
"Firefox copies only text and html to clipboard .. . Chromium copies b Hello binary b but as data flavor org.chromium.web-custom-data and embeds the custom binary in zero-padded hexadecimal in the text .",
"var data merry christmas n .. . .. . if n t .test data alert contains tab or new line .. . .. . wich would be like that in your code :",
"Do you also happen to know the answer for stackoverflow.com questions 5277882 http : stackoverflow.com questions 5277882 how-to-select-all-webview-content-using-javascript",
"Didn t tired to put data by myself",
"It will prevent Excel from trying to interpret the data when you paste it .",
"Another thought here is that there is no file name since there is no file just clipboard data .",
"Searching has not helped me. . Code to get the HBITMAP from the clipboard : .. . .. . Output : Error getting clipboard data .. . .. . I tried using GetLastError with formatting and everything and it says file-not-found .",
"1Password itself has an option to remove the clipboard data after a certain period of time 90 seconds by default I believe .",
"The sleep is to wait for me to press print screen to be sure the clipboard has some data .",
"You should play with clipboard data on paste event : .. . .. . You can modify event.data.dataValue to manipulate pasted content .",
"So is not very use full change force Excel s cells format to text only for data copy .",
"http : stackoverflow.com a 6338207 1214731 .. . .. . The FileReader : : readAsDataURL blob provides asynchronous reading of the file data which is great .",
"However there is absolutely no reason to make this asynchronous - a reference to the File is quickly constructed and does not incorporate any data shoveling .",
"@Mel Burslan I made a function GetClipboardSize to be able to detect both the size of Clipboard and ClipboardAll Raw Binary Data",
"I need to store data copied from an app into another app s memory than letting Android store it in global clipboard .",
"Do you also want to explicitly stop the data being posted to global clipboard",
"Yes i need to explicitly stop data from being posted on global clipboard .",
"Can someone tell me how I can exit gracefully if there is no CF TEXT data in the clipboard",
"Only on success you can safely access the data .. . .. . The return-type of GlobalLock is a void pointer .",
"In this case GetClipboardData will only fail if the format of the data in the clipboard is different from or cannot be implicitly converted to the specified format .",
"We now want to paste this 3D data basically it s structured as XML in the browser .",
"Safari copies b Hello binary b as data flavor dyn.ah62d4rv4gu81k3p2su10e4psqf3hw and does not include custom binary at all .",
"I am using below code to copy data from DataGridView and then pasting in an excel file .",
"In Javascript I am putting billing shipping address data on the clipboard using clipboard.js .",
"The true in Clipboard.SetDataObject allows the data to remain on the clipboard when you exit the program so if the user were to select a file and exit before pasting they would not have lost their selection .",
"If the Clipboard contains an Excel Worksheet Range you can access that Range s Data with the DataObject Object .. . .. . Can you also find the actual Source Range ie Worksheet Row Column of that Data",
"In this case the specific goal is copying an Office object which is a ZIP file containing XML and other embedded files with data flavor GVML Office clipboard format http : stackoverflow.com questions 855165 office-clipboard-format .. . .. . The answers I can find indicate text is text is definitely possible .",
"Example code modified from JavaScript get clipboard data on paste event Cross browser http : stackoverflow.com questions 2176861 javascript-get-clipboard-data-on-paste-event-cross-browser .. . .. . Updated : I have come up with a workaround by triggering a popup for users to paste text .",
"Thanks I really shouldn t have related this question to CKEditor because it s paste method doesn t have support for the getting the clipboard data I need .",
"2 . use ng-click in your view to feed the value to the controller scope like : data-ng-click copyUrlToClipboard file.webContentLink .. . 3 .",
"You can use the ClipBoardManager http : developer.android.com reference android text ClipboardManager.html class to get clipboard data and save it to a file perhaps",
"Windows data types are documented here https : msdn.microsoft.com en-us library windows desktop aa383751 28v vs.85 29.aspx .",
"Unless you ve already opened the clipboard the data can change between the time you check and the time you actually call GetClipboardData .",
"The clipboard data may come from any Windows application at all so no one expects complete consistency but this seems to get the job done .",
"According to the specification in W3C https : www.w3.org TR clipboard-apis writing-contents-to-the-clipboard : .. . .. . If data type is text plain : .. . .. . 1 .",
"stackoverflow.com questions 6998506 http : stackoverflow.com questions 6998506 text-file-with-0d-0d-0a-line-breaks",
"This should help you : stackoverflow.com questions 8190770 http : stackoverflow.com questions 8190770 detect-a-paste-event-in-a-contenteditable",
"I have button in my c application that should format and copy data from few sources .",
"Is it possible to format my text so excel will understand that copied data is text and not date time",
"In the Excel document where you are going to paste the data you need to select and set the format of the destination cells as Text .",
"HTML : .. . .. . JS : .. . .. . Safari doesn t implement DataTransfer.items so there s no way to extract image data i.e .",
"Any idea how to handle this and display data instead of picture in all machines",
"What you need is not the execCommand but you need to read the data from the clipboard .",
"source https : developer.chrome.com apps declare permissions .. . .. . To clarify : I am not trying to copy data to the clipboard or paste data from it .",
"If their data has formatting it will be lost not in the act of storing the data but in the effort to restore it after I erase in the other operation .",
"stackoverflow.com questions 6333814 http : stackoverflow.com questions 6333814 how-does-the-paste-image-from-clipboard-functionality-work-in-gmail-and-google-c",
"I also tried below link from stackoverflow : Paste an image from clipboard using JavaScript http : stackoverflow.com questions 490908 paste-an-image-from-clipboard-using-javascript also the below link : .. . .. . http : strd6.com 2011 09 html5-javascript-pasting-image-data-in-chrome .. . .. . http : codepen.io netsi1964 pen IoJbg .. . .. . can any one help me with complete example how to achieve It",
"How can I format the data from Javascript so it shows up as-if each line ended with a soft line break press shift-Enter in MS Word when I paste the data into MS Word",
"Edit : .. . .. . I should have made this clear from the start but I m trying to develop support for pasting images so I need to read the clipboard data as a file .",
"If you want to get clipboard data in paste event these can help you : .. . .. . The W3C Standard Chrome : .. . .. . You cant get type frome event.clipboardData.types which is usually text plain .",
"Also note that priority matters because pasted data is pre-processed during pasting phases https : github.com ckeditor ckeditor-dev blob master plugins clipboard plugin.js L75-L79 .",
"I m writing a MatLab programm under windows-7 x64 that takes the clipboard with mixed data copied from Microsoft Excel and import it directly to MatLab into a single char array .",
"If you save the data copied from the clipboard with a timestamp you can make the other app open the file and see if the timestamp is different to the one it previously has saved .",
"Even if I log the type besides text and HTML it s empty : console.log event.clipboardData.types .. . .. . Retrieving data with event.clipboardData.getData application x-egr-eai-basket-cutbuffer-uncompressed doesn t work too .",
"How to read clipboard data in cross-browser",
"Questions : .. . 1 Is there a way to make the DataTransferItem : : getAsFile method asynchronous",
"There are more clipboard data types that contain less weird characters like ObjectLink or Link but they come with the same limitation for non-rectangular ranges .",
"This can be done using the IsClipboardFormatAvailable https : msdn.microsoft.com en-us library windows desktop ms649047 v vs.85 .aspx function as follows : .. . .. . Then you have to open the clipboard and obtain a handle to the clipboard buffer as follows assuming the clipboard contains ANSI string : .. . .. . Then you have to obtain exclusive access to the data using the GlobalLock https : msdn.microsoft.com en-us library windows desktop aa366584 v vs.85 .aspx function .",
"Example http : jsfiddle.net 7o8qzckp 1 .. . .. . I have read that copying plain text from clipboardData to a content editable element isn t supported in Chrome on Android like this post https : github.com yabwe medium-editor issues 623 .",
"It seems Gmail is using the Source URL instead of the Image clipboard data if you don t mind that the image is hosted elsewhere then you could go that route - i.imgur.com 4fHp2xB.jpg http : i.imgur.com 4fHp2xB.jpg",
"Using CF TEXT worked .",
"Using Python 2.7 ."
]
}
|
{
"confidence": [
31.18683433532715,
30.842241287231445,
29.63878631591797,
29.636505126953125,
29.03005599975586,
28.42632484436035,
27.994733810424805,
26.958751678466797,
26.923250198364258,
24.268308639526367,
20.377849578857422,
20.094270706176758,
18.877614974975586,
18.861839294433594,
18.81999397277832,
18.55618667602539,
18.48029327392578,
17.824661254882812,
17.79236602783203,
17.588573455810547
],
"content": [
"Question : I m trying to read the clipboardData attribute of a paste event for a plugin that I m developing for CKEditor 4 . I ve established that in Chrome if I listen to the document object for a paste event then the event object I get passed in the handler will contain the clipboardData attribute . I was surprised to see the same is not true of Firefox v20 . This is the code I m using in my CKEditor plugin although I don t believe this to be an question relevant only to CKEditor . In Chrome I see the clipboardData object in Firefox I do not . I can t see anything on the MDN site confirming if this is yet supported I also believe that IE10 is meant to support this but will it work on a standard API Edit : .. . .. . I should have made this clear from the start but I m trying to develop support for pasting images so I need to read the clipboard data as a file . Comment : Some slightly dated detail about support here : quirksmode.org dom events cutcopypaste.html http : www.quirksmode.org dom events cutcopypaste.html . The standard API is here : dev.w3.org 2006 webapi clipops http : dev.w3.org 2006 webapi clipops Still a draft . If you re happy to go code diving have a look at the discussion on Github around detecting clipboard API support for Modernizr github.com Modernizr Modernizr pull 659 https : github.com Modernizr Modernizr pull 659 Comment : Hint : read about contentDom event http : docs.ckeditor.com api CKEDITOR.editor-event-contentDom because you are not adding listener correctly or at least not optimally . Comment : @Reinmar - I m using that snippet from within the contentDom event . This issue really wasn t meant to be about CKEditor Comment : I know I know : P But as a core dev I feel to be obligated to help : P . Anyway if you re using it inside contentDom then a it won t be removed on contentDomUnload b it may stop working after setData switching modes . You should rather use editable.attachListener to avoid issues which sometimes are really surprising . Comment : Awesome Thanks for the tip . Mind if I run my plugin by you once it s a little more functional .. . Answer : It is indeed a CKEditor only question . The thing is that your reading the base Javascript event . But your missing the CKEditor layer that the developers of CKEditor made for you. . They already took care of the difference between the browsers . And the only thing that you need to do : Comment : This doesn t help because CKEditor doesn t include support for the clipboardData object in Chrome you can t read the image data that s why I want to go straight to the base event .",
"Question : I m trying to read the clipboardData attribute of a paste event for a plugin that I m developing for CKEditor 4 . I ve established that in Chrome if I listen to the document object for a paste event then the event object I get passed in the handler will contain the clipboardData attribute . I was surprised to see the same is not true of Firefox v20 . This is the code I m using in my CKEditor plugin although I don t believe this to be an question relevant only to CKEditor . In Chrome I see the clipboardData object in Firefox I do not . I can t see anything on the MDN site confirming if this is yet supported I also believe that IE10 is meant to support this but will it work on a standard API Edit : .. . .. . I should have made this clear from the start but I m trying to develop support for pasting images so I need to read the clipboard data as a file . Comment : Some slightly dated detail about support here : quirksmode.org dom events cutcopypaste.html http : www.quirksmode.org dom events cutcopypaste.html . The standard API is here : dev.w3.org 2006 webapi clipops http : dev.w3.org 2006 webapi clipops Still a draft . If you re happy to go code diving have a look at the discussion on Github around detecting clipboard API support for Modernizr github.com Modernizr Modernizr pull 659 https : github.com Modernizr Modernizr pull 659 Comment : Hint : read about contentDom event http : docs.ckeditor.com api CKEDITOR.editor-event-contentDom because you are not adding listener correctly or at least not optimally . Comment : @Reinmar - I m using that snippet from within the contentDom event . This issue really wasn t meant to be about CKEditor Comment : I know I know : P But as a core dev I feel to be obligated to help : P . Anyway if you re using it inside contentDom then a it won t be removed on contentDomUnload b it may stop working after setData switching modes . You should rather use editable.attachListener to avoid issues which sometimes are really surprising . Comment : Awesome Thanks for the tip . Mind if I run my plugin by you once it s a little more functional .. . Answer : You should play with clipboard data on paste event : .. . .. . You can modify event.data.dataValue to manipulate pasted content . Also note that priority matters because pasted data is pre-processed during pasting phases https : github.com ckeditor ckeditor-dev blob master plugins clipboard plugin.js L75-L79 . So you can inject your changes at different stages by specifying a numerical listener priority : Comment : Thanks I really shouldn t have related this question to CKEditor because it s paste method doesn t have support for the getting the clipboard data I need . I ll edit the question",
"Question : I m trying to read the clipboardData attribute of a paste event for a plugin that I m developing for CKEditor 4 . I ve established that in Chrome if I listen to the document object for a paste event then the event object I get passed in the handler will contain the clipboardData attribute . I was surprised to see the same is not true of Firefox v20 . This is the code I m using in my CKEditor plugin although I don t believe this to be an question relevant only to CKEditor . In Chrome I see the clipboardData object in Firefox I do not . I can t see anything on the MDN site confirming if this is yet supported I also believe that IE10 is meant to support this but will it work on a standard API Edit : .. . .. . I should have made this clear from the start but I m trying to develop support for pasting images so I need to read the clipboard data as a file . Comment : Some slightly dated detail about support here : quirksmode.org dom events cutcopypaste.html http : www.quirksmode.org dom events cutcopypaste.html . The standard API is here : dev.w3.org 2006 webapi clipops http : dev.w3.org 2006 webapi clipops Still a draft . If you re happy to go code diving have a look at the discussion on Github around detecting clipboard API support for Modernizr github.com Modernizr Modernizr pull 659 https : github.com Modernizr Modernizr pull 659 Comment : Hint : read about contentDom event http : docs.ckeditor.com api CKEDITOR.editor-event-contentDom because you are not adding listener correctly or at least not optimally . Comment : @Reinmar - I m using that snippet from within the contentDom event . This issue really wasn t meant to be about CKEditor Comment : I know I know : P But as a core dev I feel to be obligated to help : P . Anyway if you re using it inside contentDom then a it won t be removed on contentDomUnload b it may stop working after setData switching modes . You should rather use editable.attachListener to avoid issues which sometimes are really surprising . Comment : Awesome Thanks for the tip . Mind if I run my plugin by you once it s a little more functional .. . Answer : If you want to get clipboard data in paste event these can help you : .. . .. . The W3C Standard Chrome : .. . .. . You cant get type frome event.clipboardData.types which is usually text plain . http : www.w3.org TR clipboard-apis .. . .. . IE : .. . .. . Type can only be Text or URL : http : msdn.microsoft.com en-us library ie ms536436 28v vs.85 29.aspx .. . .. . Firefox : .. . .. . There is no api to access clipboard in ff.If you want to realize it you can try some other way which is depending on what you want to do .",
"Question : In my search http : stackoverflow.com questions 5277882 how-to-select-all-webview-content-using-javascript for a Javascript way to programmatically select WebView content I encountered this Javascript code snippet http : stackoverflow.com questions 4567687 javascript-click-copy-the-content-to-the-clipboard which uses a method named setData in a member named clipboardData in the window object . But when I tried to find documentation for it in a Javascript reference http : www.w3schools.com jsref obj window.asp clipboardData was nowhere to be found . Why Isn t window.clipboardData not part of Javascript or DOM .. . Answer : No it s not part of any standard . Except for IE most browsers don t allow clipboard access because of security concerns you don t want arbitrary webpages reading something sensitive information that you put into your clipboard . Comment : So if I understand you correctly window.clipboardData is only recognized by Internet Explorer Comment : @Regex Rookie : As far as I know yes only IE supports it . Comment : Thanks . You seem very knowledgeable in Javascript . Do you also happen to know the answer for stackoverflow.com questions 5277882 http : stackoverflow.com questions 5277882 how-to-select-all-webview-content-using-javascript Comment : @Regex Rookie : I m afraid not I don t know anything about Android .",
"Question : I m implementing copy-paste functionality into a browser application using the ClipboardData API as explained in this answer . http : stackoverflow.com a 6338207 1214731 .. . .. . The FileReader : : readAsDataURL blob provides asynchronous reading of the file data which is great . Questions : .. . 1 Is there a way to make the DataTransferItem : : getAsFile method asynchronous 2 Is there a way to get FileReader to take a DataTransferItem as an argument so it can do the async itself like it does already with blobs 3 Am I out of luck .. . Answer : Is there a way to make the DataTransferItem : : getAsFile method asynchronous No . It s specified http : www.w3.org TR html editing.html dom-datatransferitem-getasfile as synchronous . However there is absolutely no reason to make this asynchronous - a reference to the File is quickly constructed and does not incorporate any data shoveling . Just as input.files does synchronously get you references to not-yet-read-in files . Is there a way to get FileReader to take a DataTransferItem as an argument so it can do the async itself like it does already with blobs No . It just takes the item.getAsFile blob and can read that in asynchronously .",
"Question : I m trying to read the clipboardData attribute of a paste event for a plugin that I m developing for CKEditor 4 . I ve established that in Chrome if I listen to the document object for a paste event then the event object I get passed in the handler will contain the clipboardData attribute . I was surprised to see the same is not true of Firefox v20 . This is the code I m using in my CKEditor plugin although I don t believe this to be an question relevant only to CKEditor . In Chrome I see the clipboardData object in Firefox I do not . I can t see anything on the MDN site confirming if this is yet supported I also believe that IE10 is meant to support this but will it work on a standard API Edit : .. . .. . I should have made this clear from the start but I m trying to develop support for pasting images so I need to read the clipboard data as a file . Comment : Some slightly dated detail about support here : quirksmode.org dom events cutcopypaste.html http : www.quirksmode.org dom events cutcopypaste.html . The standard API is here : dev.w3.org 2006 webapi clipops http : dev.w3.org 2006 webapi clipops Still a draft . If you re happy to go code diving have a look at the discussion on Github around detecting clipboard API support for Modernizr github.com Modernizr Modernizr pull 659 https : github.com Modernizr Modernizr pull 659 Comment : Hint : read about contentDom event http : docs.ckeditor.com api CKEDITOR.editor-event-contentDom because you are not adding listener correctly or at least not optimally . Comment : @Reinmar - I m using that snippet from within the contentDom event . This issue really wasn t meant to be about CKEditor Comment : I know I know : P But as a core dev I feel to be obligated to help : P . Anyway if you re using it inside contentDom then a it won t be removed on contentDomUnload b it may stop working after setData switching modes . You should rather use editable.attachListener to avoid issues which sometimes are really surprising . Comment : Awesome Thanks for the tip . Mind if I run my plugin by you once it s a little more functional .. . Answer : In Ie We can use all clipboard API while in chrome and firefox can only be used where fire paste event.So users can t user clipboard api to copy something from the website while use in there office msn. .",
"Question : null .. . Answer : Example http : jsfiddle.net 7o8qzckp 1 .. . .. . I have read that copying plain text from clipboardData to a content editable element isn t supported in Chrome on Android like this post https : github.com yabwe medium-editor issues 623 . When you run the example above on mobile which aims to remove all formatting from pasted text the text variable returns an empty string . This only happens in Chrome on Android . So I d like to know if there is a workaround for that . Example code modified from JavaScript get clipboard data on paste event Cross browser http : stackoverflow.com questions 2176861 javascript-get-clipboard-data-on-paste-event-cross-browser .. . .. . Updated : I have come up with a workaround by triggering a popup for users to paste text . Not ideal but could get the job done removing formatting . I m looking for more workarounds suggestions .",
"Question : In my search http : stackoverflow.com questions 5277882 how-to-select-all-webview-content-using-javascript for a Javascript way to programmatically select WebView content I encountered this Javascript code snippet http : stackoverflow.com questions 4567687 javascript-click-copy-the-content-to-the-clipboard which uses a method named setData in a member named clipboardData in the window object . But when I tried to find documentation for it in a Javascript reference http : www.w3schools.com jsref obj window.asp clipboardData was nowhere to be found . Why Isn t window.clipboardData not part of Javascript or DOM .. . Answer : I believe only IE lets you access the clipboard . Older versions of other browsers used to but this has been switched off by default as a security measure . Users can explicitly turn it on via settings options preferences but this is obviously not ideal in most situations . The workaround is to use a flash object on the page . Since Flash 10 added more security layers user interaction is also required now with the flash object e.g . a click rather than say onload event . I found and implemented the good work from the well written article at the bottom of my answer . He explains the issue in more detail with links to official statements from Adobe Mozilla and supplies a usable and a downloadable example and the source code to the fla . This is handy if you want to reskin redesign his button . I have tested successfully on Windows7 using latest as at 7 7 2011 Chrome Safari RockMelt FF IE7 IE8 IE9 and MacOSX SL Safari FF . The only downside is that it uses flash which is mostly fine except for some mobile platforms and a small portion of ab normal users . Also I found you need to access over http a web server opening and using the demo page via the file system i.e . double clicking the html file in Explorer won t work . Thanks for sharing Rahul awesome job . http : www.rahulsingla.com blog 2010 03 cross-browser-approach-to-copy-content-to-clipboard-with-javascript",
"Question : We are using a 3D CAD application which allows to copy the 3D data in a special format to the clipboard . We now want to paste this 3D data basically it s structured as XML in the browser . I tried a lot with the HTML5 Clipboard API but besides text and HTML nothing works the clipboardData is always emtpy.. . Even if I log the type besides text and HTML it s empty : console.log event.clipboardData.types .. . .. . Retrieving data with event.clipboardData.getData application x-egr-eai-basket-cutbuffer-uncompressed doesn t work too . Is it even possible to paste such a custom format in the browser .. . Answer : It seems custom data formats for the clipboard are not directly supported . According to the specification in W3C https : www.w3.org TR clipboard-apis writing-contents-to-the-clipboard : .. . .. . If data type is text plain : .. . .. . 1 . Ensure encoding is correct per OS and locale conventions .. . 2 . Normalize line endings according to platform conventions .. . 3 . Place text on clipboard with the appropriate OS clipboard format description .. . .. . Otherwise if data is of a type listed in the mandatory data types list .. . .. . Place part on clipboard with the appropriate OS clipboard format description .. . .. . Otherwise .. . .. . This is left to the implementation. . This suggests to me that any custom types will be ignored by browsers . As such I d advise simply saving the XML as a string to the clipboard and retrieving it using event.clipboardData.getData text plain Comment : Yeah I was reading the same specification and already feared that it is like it is . Using text plain isn t working maybe because of the way the 3D applications puts the contents into the clipboard not as text . But thanks anyway now it seems clearer to me . Comment : @AndreasRemdt . Maybe log this as an issue on the 3D application s forum . It may be a common issue with that application and they may have workarounds .",
"Question : Hi i am creating an web chat application in that i want user can copy-paste the image from desktop or can paste directly the screen shot but i am unable to achieve it . I used following code : .. . .. . using the above code in Chrome and Firefox i am getting Clipboarddata undefined in case of image . I tried lots of links on google but not able to reach the target . I also tried below link from stackoverflow : Paste an image from clipboard using JavaScript http : stackoverflow.com questions 490908 paste-an-image-from-clipboard-using-javascript also the below link : .. . .. . http : strd6.com 2011 09 html5-javascript-pasting-image-data-in-chrome .. . .. . http : codepen.io netsi1964 pen IoJbg .. . .. . can any one help me with complete example how to achieve It Comment : Have you noticed that you ve missed a semicolon at the end Comment : If you use the divs id your code works . Comment : Please can you add working fiddle or code pen the code only works with Printscreen coping the desktop image doesnot works Comment : A combined version using the code from @pareshm for Chrome and my code for Firefox may be found in this updated fiddle jsfiddle.net SaschaKluth togafu5s 1 https : jsfiddle.net SaschaKluth togafu5s 1 Tested with clipboard content created via system screendump by ctrl+print and copy image part from gimp .. . Answer : Demo http : jsfiddle.net KJW4E 754 .. . .. . Works on latest chrome firefox . Chrome implementation is simple . Firefox has restrictions that user must give command to do paste like keyboard event and editable input must be focused so we do tricks here - on ctrl down we focusthat input field on release unfocus . HTML : .. . .. . JS : .. . .. . Safari doesn t implement DataTransfer.items so there s no way to extract image data i.e . a screenshot copied to the clipboard in Javascript . You can get copied files but not data . From stakeoverflow post Comment : i voted up because it is working like a charme Comment : Its working with only Print screen its not working with the copying image from Desktop and pasting on canvas.. . : Comment : Its working properly for me . I have tested it in Firefox by Copy from Desctop and paste . What is your firefox version Comment : @MayurPatel : It only works in Firefox but not on Chrome browser copy from Desktop and paste can you try on Chrome... . Comment : Ok i will check it and if works i will let you know.. .",
"Question : Hi i am creating an web chat application in that i want user can copy-paste the image from desktop or can paste directly the screen shot but i am unable to achieve it . I used following code : .. . .. . using the above code in Chrome and Firefox i am getting Clipboarddata undefined in case of image . I tried lots of links on google but not able to reach the target . I also tried below link from stackoverflow : Paste an image from clipboard using JavaScript http : stackoverflow.com questions 490908 paste-an-image-from-clipboard-using-javascript also the below link : .. . .. . http : strd6.com 2011 09 html5-javascript-pasting-image-data-in-chrome .. . .. . http : codepen.io netsi1964 pen IoJbg .. . .. . can any one help me with complete example how to achieve It Comment : Have you noticed that you ve missed a semicolon at the end Comment : If you use the divs id your code works . Comment : Please can you add working fiddle or code pen the code only works with Printscreen coping the desktop image doesnot works Comment : A combined version using the code from @pareshm for Chrome and my code for Firefox may be found in this updated fiddle jsfiddle.net SaschaKluth togafu5s 1 https : jsfiddle.net SaschaKluth togafu5s 1 Tested with clipboard content created via system screendump by ctrl+print and copy image part from gimp .. . Answer : Chrome .. . .. . Add your code to he code from codepen http : codepen.io netsi1964 pen IoJbg and give an id to the div line 50 .. . .. . Include your script as posted above with the divs id .. . .. . Make a screenshot select the first div that one with the id one hit ctrl+v the screenshot appears in the div and the imagedata is loged to console . Firefox Use the code I prepeared you within this fiddle https : jsfiddle.net SaschaKluth togafu5s .. . .. . fiddle http : i.stack.imgur.com Ww7Xw.png .. . .. . Chrome Firefox combined .. . .. . A combined version using the code from @pareshm for Chrome and my code for Firefox may be found in this updated fiddle https : jsfiddle.net SaschaKluth togafu5s 1 Tested with clipboard content created via system screendump by ctrl+print and copy image part from gimp Comment : Uncomment delet the snapshoot call in line 137 to get rid of the undefined error Comment : But it will paste the screen shot I want to paste the image copied from desktop or any other computer location . Comment : The posted code of my answer works execept that it will throw an error cause of the undefined snapshot function wich you l have to add or remove its call to get rid of the error message Comment : I left the call in the code because it ll be the entrypoint for your extra funtionality Comment : It does not work with the image copied from Desktop and also fails to work in firefox gets undefined console.log event.target.result",
"Question : null .. . Answer : Currently I am learning javascript as a beginner and following the book Professional Javascript for Web Developers by Nicholas Zakas . There I came across clipboard events and tried to implement few scripts from the book . What I observed is event.clipboardData.getData text plain can retrieve the text for paste event but not for copy event . To explain more I put an alert for copy event : alert event.clipboardData.getData text plain .. . .. . When I tried to copy the corresponding field s value a blank alert pop-up is shown above code is not being able to retrieve the copied value . Next I have put the same alert for the paste event . Now when I copied and pasted some text in the corresponding field the alert pop-up is able to show the copy pasted value properly . My question is : Is this desired behavior Am I missing something Can anybody please explain this behavior Comment : Thanks for your comment @RaymondChen I am aware of selection object event . Here I want to know whether the copied text not selected is retrievable through the clipboarddata object or not . And if not then what is the reason behind that Comment : This is spelled out in the specification http : dev.w3.org 2006 webapi clipops clipops.html event-types-and-details . The text is copied to the clipboard if you leave the event unhandled . You get the event first so you can override the default .",
"Question : null .. . Answer : Is it possible to put binary-data in the clipboard with a specific data flavor Even a subset of browsers with hacks is okay . In this case the specific goal is copying an Office object which is a ZIP file containing XML and other embedded files with data flavor GVML Office clipboard format http : stackoverflow.com questions 855165 office-clipboard-format .. . .. . The answers I can find indicate text is text is definitely possible . Posts about binary are mostly about images which is also kind of possible . But I don t see anything about other data flavors . UPDATE .. . .. . It appears that this may not be possible . The following code runs in Chrome 51 Firefox 46 and Safari 9.0 and is triggered by a Cmd Ctrl+C keyboard event . Firefox copies only text and html to clipboard .. . Chromium copies b Hello binary b but as data flavor org.chromium.web-custom-data and embeds the custom binary in zero-padded hexadecimal in the text . Safari copies b Hello binary b as data flavor dyn.ah62d4rv4gu81k3p2su10e4psqf3hw and does not include custom binary at all . document.addEventListener copy function e e.clipboardData.setData text plain Hello world e.clipboardData.setData text html b Hello html b e.clipboardData.setData custom binary b Hello binary b e.preventDefault .. . .. . Above code from Example 1 at https : www.w3.org TR clipboard-apis .. . .. . How do I copy to the clipboard in JavaScript http : stackoverflow.com questions 400212 how-do-i-copy-to-the-clipboard-in-javascript .. . .. . https : www.lucidchart.com techblog 2014 12 02 definitive-guide-copying-pasting-javascript",
"Question : I have looked at many posts but could not find a clear current answer to the following two questions as it seems standards and browser support has been constantly changing . 1 . Is it a legal operation according to the standard to change the clipboard with event.clipboardData.setData inside a copy event handler 2 . Do latest versions of Chrome FF Safari IE Chrome iOS Android iPhones support this correctly Thanks .. . Answer : Clipboard APIs are indeed in active development as of 2016 but here s my understanding of the current state of affairs . Using event.clipboardData.setData is supported .. . .. . Changing the clipboard with event.clipboardData.setData inside a copy event handler is allowed by the spec as long as the event is not synthetic https : developer.mozilla.org en-US docs Web Guide Events Creating and triggering events . Note that you need to prevent the default action in the event handler to prevent your changes from being overwritten by the browser : .. . .. . To trigger the copy event use execCommand .. . .. . If you need to trigger the copy event and not just handle the copy requests made by the user via the browser UI you must use document.execCommand copy . It will only work in certain handlers such as the click handler : .. . .. . Browser support varies .. . .. . Firefox supports both clipboardData in the copy cut paste events since Firefox 22 https : bugzilla.mozilla.org show bug.cgi id 407983 and execCommand copy from user actions since Firefox 41 https : bugzilla.mozilla.org show bug.cgi id 1012662 .. . Chrome also supports both the latter was added in Chrome 43 https : www.chromestatus.com feature 5223997243392000 - or perhaps 42 https : bugs.chromium.org p chromium issues detail id 437908 c10 .. . caniuse.com claims that Safari as of 9.1 doesn t support the latter http : caniuse.com feat clipboard . MS Edge Platform Status https : developer.microsoft.com en-us microsoft-edge platform status clipboardapi lists IE Edge as not supporting the Clipboard APIs the link-to details is broken at the moment . You can test this using the snippet below please comment with the results . More resources .. . .. . Specification : Clipboard API and events https : www.w3.org TR clipboard-apis .. . The Definitive Guide to Copying and Pasting in JavaScript https : www.lucidchart.com techblog 2014 12 02 definitive-guide-copying-pasting-javascript 2014 - more information on clipboard API interoperability in browsers including support for the copy-paste events without a selection and support for multiple formats . Pages tagged Clipboard API on MDN https : developer.mozilla.org en-US docs tag Clipboard 20API .. . .. . Testcase .. . .. . .. . window.onload function .. . document.addEventListener copy function e .. . console.log copy handler .. . if document.getElementById enableHandler .checked .. . e.clipboardData.setData text plain Current time is + new Date .. . e.preventDefault default behaviour is to copy any selected text .. . .. . This is just to simplify testing : .. . setTimeout function .. . var tb document.getElementById target .. . tb.value .. . tb.focus .. . 0 .. . .. . document.getElementById execCopy .onclick function .. . document.execCommand copy only works in click handler or other user-triggered thread .. . .. . document.getElementById synthEvt .onclick function .. . var e new ClipboardEvent copy dataType : text plain data : bar .. . document.dispatchEvent e .. . .. . .. . .. . .. . html .. . input id enableHandler type checkbox checked .. . label for enableHandler Run clipboardData.setData text plain .. . in the copy handler label .. . p Try selecting this text and triggering a copy using p .. . ul .. . li button id execCopy document.execCommand copy button - should work . li .. . li button id synthEvt document.dispatchEvent clipboardEvent button - should NOT work li .. . li with keyboard shortcut - should work li .. . li or from the context menu - should work li .. . ul .. . p If the copy handler was triggered the focus will move to the textbox below automatically so that you can try pasting from clipboard : p .. . input type text id target size 80 Comment : seems to work in safari and IE as well . . more testing needed",
"Question : I have button in my c application that should format and copy data from few sources . And i have a problem to paste my text from clipboard to excel . In excel all text like 1.12.1 is transfromed to 01.12.2001 datetime-format And i dont want to do like that Is it possible to format my text so excel will understand that copied data is text and not date time .. . Answer : In the Excel document where you are going to paste the data you need to select and set the format of the destination cells as Text . It will prevent Excel from trying to interpret the data when you paste it . To avoid doing that you can try using the XML Spreadsheet Format : C Add excel text-formatted data to clipboard http : stackoverflow.com questions 15764828 c-sharp-add-excel-text-formatted-data-to-clipboard",
"Question : I was actually looking to get the content of clipboard using angular JS to simulate a copy-paste thing . Comment : Highly recommend angular-zeroclipboard https : github.com lisposter angular-zeroclipboard it is better documented than ng-clip . Also I failed to make ng-clip working . Comment : ng-clip depends on ZeroClipboard at least in some modes of operation and made it much easier to integrate Copy to Clipboard functionality in my case . I followed these few steps https : github.com asafdav ng-clip usage to get it working . .. . Answer : Use a module made for that.. . .. . .. . ng-clip : http : ngmodules.org modules ng-clip .. . .. . Keep this in mind : Copy to clipboard without Flash http : stackoverflow.com questions 6355300 copy-to-clipboard-without-flash .. . .. . BUT Check this out.. . How to read clipboard data in cross-browser http : stackoverflow.com questions 5551338 how-to-read-clipboard-data-in-cross-browser Comment : I have already gone through these links before but my concern is do we have any inbuilt function or method in Angular JS like we do have in JS to get content of clipboard . Like in JS it can be done as window.clipboardData.getData Text",
"Question : Overview .. . .. . When dragging and dropping a file onto a page you can get the file via event.dataTransfer.files when going through all the drag drop related events . Each file object then has a name attribute . When pasting a file onto a page you get the item via event.clipboardData.items which isn t quite an array or an normal object but I digress in the onpaste event . The item object then has a getAsFile method but this returns a Blob not a File so the name attribute is missing . What I m trying to do .. . .. . I would like to get to the filename so I can send it along to store as metadata with the image when I upload the image later . Is Chrome just buggy .. . .. . You would think that they would just reuse event.dataTransfer for this purpose but that s undefined . You would also think that getAsFile would return a File but again the browser makers decided against the obvious . Here are the specs for what getAsFile should do : http : www.w3.org TR html editing.html dom-datatransferitem-getasfile .. . .. . Pre-empting some of the inevitable comments : .. . .. . All this is true at least in Chrome . Let s just say I only care about Chrome and maybe the latest versions of Safari and Firefox for now . I ve seen in comments elsewhere that people seem to think browsers would never allow files to be copy pasted due to obvious security concerns yet they do allow them to be dragged and dropped so let s please skip past that flawed argument . Conclusion : .. . .. . Is there any way to get to the pasted file s name Is this just a bug in Chrome s implementation UPDATE .. . .. . I created a pen on codepen that demonstrates the issue : http : codepen.io lerouxb pen hiLux It also looks like Chrome is at fault here so I submitted a bug : https : code.google.com p chromium issues detail id 361145 Comment : Could you please create a jsfiddle .. . Answer : Chrome is the only browser that fully implements the Clipboard API . And as you have noticed the pasted item is made available as a Blob . It s not 100 clear if this is an error in the implementation of the Clipboard API in Chrome . The spec suggests that it may be but this has been in-place for some time in Chrome so you ll need to work around it . Another thought here is that there is no file name since there is no file just clipboard data . If you want to name pasted items you ll need to solicit input from the user . Comment : Thanks . I ended up filing a bug report because it appears to be wrong according to the specs : code.google.com p chromium issues detail id 361145 https : code.google.com p chromium issues detail id 361145 Comment : Apart from that the specs appear state that clipboardData should just be a dataTransfer object so to me it would make sense that the files attribute shouldn t have length 0 . It is all in the specs and if you look at the objects in Chrome they have the right types and attributes talking about event attributes not getAsFile s return-type they just aren t filled in . Comment : I think the chances of this being fixed are close to zero . In fact there s a better chance that the clipboard API will be dropped from the spec entirely since it has not been adopted by any browser other than Chrome . This is all just speculation on my part though so take with a grain of salt . Comment : Yeah yeah but what else can one do :",
"Question : I need to store data copied from an app into another app s memory than letting Android store it in global clipboard . Is it possible to copy the data into a separate memory than the global clipboard . Any help would be appreciated . Thanks Nibs .. . Answer : You can use the ClipBoardManager http : developer.android.com reference android text ClipboardManager.html class to get clipboard data and save it to a file perhaps which the other app can access . See Copy and Paste http : developer.android.com guide topics text copy-paste.html for an example . Comment : yes @umair its obvious that i would be using ClipboardManager but how would i avoid lettting it store in the global clipboard and how would i be saving it in another apps memory Comment : If you save the data copied from the clipboard with a timestamp you can make the other app open the file and see if the timestamp is different to the one it previously has saved . If it is different you can perform the action you want with the new data . Do you also want to explicitly stop the data being posted to global clipboard Comment : The timestamp in my case wont work . I do not see as a solution to my problem . Yes i need to explicitly stop data from being posted on global clipboard . Comment : Another idea : implement a background listener in the second app that listens for a clip with a particular tag you set in the first app using OnPrimaryClipChangeListener getPrimaryClipDescription and getPrimaryClip . When it s a match you can save it to a local variable in the second app . Users don t copy often enough for this small check to be heavy . Maybe you can reset the clipboard to a blank string using OnPrimaryClipChangedListener in the first app get its description and post another item to the clipboard with the same description but empty content .",
"Question : I m a complete beginner at C++ but I ve managed to modify other people s code and finally put together a program that writes the Windows clipboard to a text file with the text encoded in the codepage specified as a command-line parameter for the program for example MyProg.exe 437 will write the text in codepage 437 . If no codepage is specified the program writes a text file in the standard Windows codepage 1252 . The trouble is that the program crashes if the clipboard contains for example a shortcut or file not text . Can someone tell me how I can exit gracefully if there is no CF TEXT data in the clipboard Or have I completely misunderstood the problem I ve searched for an answer with no success . Here is my VC2010 code which I don t entirely understand but it seems to work when the clipboard contains CF TEXT it doesn t work with CF UNICODETEXT by the way - the output is simply a few bytes . : .. . .. . I ll be grateful for any suggestions on how to fix this last problem . .. . Answer : Before you get data from the clipboard using the GetClipboardData function you have to check that the clipboard contains data in the format that you expect . This can be done using the IsClipboardFormatAvailable https : msdn.microsoft.com en-us library windows desktop ms649047 v vs.85 .aspx function as follows : .. . .. . Then you have to open the clipboard and obtain a handle to the clipboard buffer as follows assuming the clipboard contains ANSI string : .. . .. . Then you have to obtain exclusive access to the data using the GlobalLock https : msdn.microsoft.com en-us library windows desktop aa366584 v vs.85 .aspx function . Only on success you can safely access the data .. . .. . The return-type of GlobalLock is a void pointer . So depending on the data format which you have already determined using IsClipboardFormatAvailable you have to cast it to the corresponding type . Windows data types are documented here https : msdn.microsoft.com en-us library windows desktop aa383751 28v vs.85 29.aspx . Comment : IsClipboardFormatAvailable is useful for setting the UI for example determining whether a drop-down menu should offer a Paste option but using it to ensure that GetClipboardData will succeed is sketchy . Unless you ve already opened the clipboard the data can change between the time you check and the time you actually call GetClipboardData . The real fix which this answer shows without comment is to check the return-value from GetClipboardData before trying to dereference it . Comment : @AdrianMcCarthy Yes . That s why OpenClipboard has to be called before GetClipboardData to prevent other programs from modifying the clipboard until CloseClipboard is called . In this case GetClipboardData will only fail if the format of the data in the clipboard is different from or cannot be implicitly converted to the specified format . Comment : I would like to add also that if the handle returned from GetClipboardData is itself a pointer to the first byte of the data such as when the data format is CF BITMAP then GlobalLock should not be called . That pointer however should be checked against NULL . Comment : If you call 1 IsClipboardFormatAvailable 2 OpenClipboard and 3 GetClipboardData as your answer suggests then there s a race-condition between 1 and 2 which is the point I was trying to make . Comment : If you read my original comment carefully you ll find that s exactly what I said .",
"Question : I m using the Quicksilver clipboard history plugin to record the last 15 items . The problem is i sometimes need to copy-paste passwords or other sensitive data from 1Password for example and i was wondering if there was a way to not log this type of data . Thanks for your help .. . Answer : Quicksilver and or Alfred would need to be aware of where those clips came from i.e . from 1Password etc in order to exclude them . 1Password itself has an option to remove the clipboard data after a certain period of time 90 seconds by default I believe . I don t think there s an easy automated way to do what you want though . Comment : Ok . I thought i was maybe possible not to trigger the clipboard plugin by using some sort of key combination . Thanks for you reply"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
clipboard
|
UNK_RELATION
|
djnativeswing@s@175
|
djnativeswing -- the dj native swing library allows an easy integration of some native components into swing applications and provides some native utilities to enhance swing @placeholder apis .
|
{
"confidence": [
72.18673706054688,
72.13188171386719,
65.39860534667969,
64.96286010742188,
64.96286010742188,
57.99580001831055,
57.86075973510742,
56.7724494934082,
56.7724494934082,
56.05465316772461,
55.38358688354492,
55.30623245239258,
55.30623245239258,
55.30623245239258,
55.30623245239258,
52.08573532104492,
49.39616775512695,
49.39616775512695,
49.30488586425781,
47.19103240966797,
42.77668380737305,
41.77881622314453,
41.710350036621094,
40.77883529663086,
39.82006072998047,
39.01006317138672,
37.897804260253906,
37.0561408996582,
37.0561408996582,
36.780189514160156,
36.342002868652344,
35.325469970703125,
34.36612319946289,
33.652435302734375,
29.43936538696289,
29.43936538696289,
27.797250747680664,
27.345863342285156,
27.171247482299805,
26.662443161010742,
25.4390926361084,
25.172256469726562,
24.925064086914062,
24.503854751586914,
23.706924438476562,
21.899459838867188,
21.690563201904297,
21.690563201904297,
20.834407806396484,
20.794349670410156,
20.5848445892334,
20.456504821777344,
20.456504821777344,
19.297412872314453,
19.126615524291992,
18.932008743286133,
18.851552963256836,
18.749000549316406,
18.195045471191406,
18.012197494506836,
17.996566772460938,
17.996566772460938,
17.73859214782715,
17.73859214782715,
17.73859214782715,
17.73859214782715,
17.73859214782715,
17.048526763916016,
16.892078399658203,
16.773216247558594,
16.773216247558594,
16.350324630737305,
16.217437744140625,
16.11931610107422,
16.116416931152344,
16.046993255615234,
16.014934539794922,
15.467812538146973,
15.46689510345459,
15.46689510345459,
15.46689510345459,
15.086235046386719,
14.919824600219727,
14.513339042663574,
13.953193664550781,
13.953193664550781,
13.953193664550781,
13.953193664550781,
13.953193664550781,
13.953193664550781,
13.953193664550781,
13.953193664550781,
13.953193664550781,
13.953193664550781,
13.953193664550781,
13.953193664550781,
13.953193664550781,
13.953193664550781,
13.953193664550781,
13.953193664550781
],
"content": [
"DJ Native Swing enforces the Swing approach to threading : manipulate the components in the AWT Event Dispatch thread a.k.a .",
"The java application uses DJ Native Swing browser .",
"I have a Java application made with Swing and I have used one DJ Native Swing Browser .",
"Is it possible enable Chrome Frame in the DJ Native Swing browser",
"Im using DJ native swing to make a web browser .",
"I would like to know if there is any work around for capturing the mouse events on Flex in DJ Native Swing JWebBrowser .",
"First SWT control for Browser is what DJ Native Swing is using but it also has all sorts of glue code to make it thread safe with Swing .",
"I m working with netbeans and trying to implement DJ Native Swing JWebBrowser inside a panel but I cant do that .",
"when running the DJ Native Swing JWebBrowser as stand alone code it works fine and open a new jframe and display the browser .",
"I have created a java application embedding the native swing browser .",
"i wanna to call youtubeviewer from a window by actionlistener .. . .. . jframe example for testing .. . .. . YouTubeViewer include class of DJ Native Swing api library .",
"But when I navigate to the site through a Java application that uses DJ Native Swing the add-on is not activated .",
"I am asking if i can make Chrome Frame work with DJ Native Swing browser",
"About Google Chrome Frame in SWT and thus in DJ Native Swing there is currently no support in SWT itself .",
"I have no idea on what kind of variable name value to pass to DJ Native Swing to enable the chrome frame plugin .",
"I want to execute my javascript code in DJ native swing jwebbrowser but I should wait for the page loading how can I set listener for it",
"See this bug : https : bugs.eclipse.org bugs show bug.cgi id 317322 .. . .. . SWT and DJ Native Swing allow to create one s own ActiveX bridge .",
"Yes I see I cant get Chrome work with DJ Native Swing therefore I am trying to make it work with the Chrome Frame add-on .",
"I am using DJ Native Web Browser .",
"I want to run full screen you tube video in Swing Native browse But i am not able to run .",
"Maybe you could create your own component for Google Chrome Frame ActiveX on windows similar to what DJ Native Swing does for the Windows Media Player component .",
"This code is all Swing there is no SWT code .",
"I have use a browser that is DJ enabled Browser http : djproject.sourceforge.net ns of Swing .",
"That made build for Windows only but it worked and eliminated some Swing bugs .",
"I want to manupulate link using this.Can i acheive this thing using this dj native web browser .",
"I m making an app with GoogleMap inside DJ Native webBrowser component .",
"Nowadays I am working on a java swing application using DJ NativeSwing as my embed browser to do something automatic work .",
"My Gui is like that : I have buttons on the left which has jpanel for each button every button i press show me a different jpanel I want to implement DJ Native Swing JWebBrowser inside one of those panels but cant do that .",
"I have java Swing Dj Native application and i tried to run it in ubuntu and its Running but when i tried same in windows 64 bit its giving error so what error is that can any body suggest me solution",
"And do you use mainly Swing or SWT",
"@trashgod i know that but i need to open it into swing browser only .",
"Last time in Swing project when we had to integrate browser into Swing application we finally used Eclipse SWT component that defaulted to IE .",
"I think it is using the native IE support .",
"Try imbedding WebKit layout engine with V8 JavaScript engine into Swing .",
"I am using chrriis.dj.nativeswing.swtimpl.components.JWebBrowser in my swing application to open web page of a jupyter-notebook .",
"I guess when you are using Swing it opens browser with all plugins disabled that is the reason that it doesn t work .",
"I think the problem stems from the quotation marks DjNative language javascript error language javascript I try all version of Dj native library .. . .. . Fatal Error : 2 : 18 : Open quote is expected for attribute 1 associated with an element type language .",
"According to the documentation at JavaDoc : JWebBrowser http : djproject.sourceforge.net ns documentation javadoc chrriis dj nativeswing swtimpl components JWebBrowser.html it only supports IE and Mozilla : .. . .. . A native web browser using Internet Explorer or Mozilla on Windows and Mozilla on other platforms .",
"in my native browser screen only black color cross button is display on the top left corner of my jFarme .",
"When you add or remove a component to a visible GUI the basic code is : .. . .. . The above is for Swing which you question says you are using but the example code appears to be using a Frame instead of a JFrame .",
"at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse Unknown Source at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse Unknown Source .. . .. . When I try to get page source code a html page via DJNative Swing .. . .. . If source like below html parse is work well",
"The LGPL is primarily used for software libraries although it is also used by some stand-alone applications .",
"Using the DJNativeSwing JFlashPlayer I need to intercept in Java a simple event generated by flash actionscript .",
"New a notebook in DJNativeSwing JWebBrowser http : i.stack.imgur.com FeKGj.png .. . .. . DJNativeSwing JWebBrowser got the 404 page http : i.stack.imgur.com stqXe.png .. . .. . I think maybe it did not execute the javascript api in jupyter-notebook can anyone help me make the DJNativeSwing JWebBrowser work under jupyter-notebook",
"With the DJ NativeSwing demo I could execute my js in the loadingProgressChanged .",
"1.Dj is using ie as default .",
"So I wonder that after webbrowser.executeJavascript the DJ NativeSwing thread will wait my thread",
"I heard something like 64 bit xulrunner which supports dj browser are not there and all .",
"After some debugging I find it .",
"That is why the author of dj made internal webserver for editors .",
"Thanks Thomas K http : stackoverflow.com questions 36837979 how-can-i-use-djnativeswing-jwebbrowser-as-the-browser-for-the-jupyter-notebook comment61249307 36837979 .",
"Nowadays I am really stuck by this problem after I replaceed JDIC with DJ NativeSwing and look forward to your response anxiously.Thanks again",
"I am using Eclipse SWT http : www.eclipse.org swt and DJ Project http : sourceforge.net projects djproject to open youtube using java .",
"2.In dj you can not always setting the content and expect it run .",
"@user3053430 is the library you are instead using also LGPL",
"Can you show us some code",
"The library you are considering using is licensed under LGPL which means you are licensed to link against the library but not include any source from it .",
"The scenario of my application is that a user click start button and the embed browser auto click some position of the current page and then redirect to another one and then execute some other operations like click or something other .",
"Please help me if you know something about my problem .. . .. . Jar s i used : .. . .. . DJNativeSwing.jar DJNativeSwing-SWT.jar org.eclipse.swt.win32.win32.x86 64-4.3.jar .. . .. . Tryed URL s .. . .. . https : www.youtube.com v hk5IMmEDWH4 .. . .. . https : www.youtube.com v b-cr0ewwatk fs 1 .. . .. . Code",
"thanks : Thats why I add some extra seconds .",
"Second I define a thread class to do some logic computing and execute my browser operations as mentioned above by webbrowser.executeJavascript .",
"For the same purpose I have downloaded a 64 bit SWT jar and some xul runners which are labelled to be 64 bit .",
"I am considering using this library http : djproject.sourceforge.net ns index.html in my closed-source java program .",
"How can I include this library in my JARfile and how can I give credit legally",
"EDIT : I have decided not to use this library and will create another question for the one I switched to .",
"I think it only reasonable to acknowledge the use of the library source in your own code even though you are not distributing it .",
"For proprietary software LGPL-parts are usually in the form of a shared library such as a DLL so that there is a clear separation between the proprietary and LGPL parts .",
"Getting Chrome Browser in java Applications http : stackoverflow.com questions 7244653 getting-chrome-browser-in-java-applications",
"This seems to be LGPL code.For LGPL from enter link description here http : en.wikipedia.org wiki GNU Lesser General Public License .. . .. . The license allows developers and companies to use and integrate LGPL software into their own even proprietary software without being required by the terms of a strong copyleft license to release the source code of their own software-parts .",
"Now there is one problem left : If the user pauses the youtube video the timer continues and the next video starts after some time .",
"Can some one please tell me what I am doing wrong",
"The JWebBrowser component from The DJ project http : djproject.sourceforge.net main index.html as used in the very nice example http : stackoverflow.com a 20441296 1694043 by Jk1 http : stackoverflow.com users 1196603 jk1 supports a listener that you can add to it to receive browser events .",
"Oh blah the multiplatform thing is only for WebStart applications https : www.eclipse.org swt jws .",
"I used DJNativeSwing-SWT-1-0-2 http : sourceforge.net projects djproject files latest download source typ redirect and swt-4.5-win32-win32-x86 64 https : www.eclipse.org downloads download.php file eclipse downloads drops4 R-4.5-201506032000 swt-4.5-win32-win32-x86 64.zip mirror id 1186 : .. . .. . And here the output for a short test : .. . .. . On my machine the statusChanged event where the status text of the webBrowser field is Downloading picture res : ieframe.dll background gradient.jpg.. . seems to indicate that the video is finished .",
"Since this solution will be library specific I m not sure anyone can help you unless they know that library and since the number of folks in that pool are small you will want to study the library in depth yourself to gain this understanding yourself .",
"You have to call it through an address for editor ck and tinymce dj calls localhost http : 127.0.0.1 tinymce . . but the structure is too complex to be detailed here .",
"Here is the modified code of the above mentioned example which adds a listener for the browser events implementing only two of the ten available WebBrowserListener methods and some logging .",
"You will be able to solve this if this library can notify you when the video is done .",
"In my thread class browser will execute js code by webbrowser.executeJavascript document.getElementById target .click to click the target position and then java code while globalflag false Thread.sleep 500 to detect if the current page was loaded completely and then execute some other java code .",
"I should override loadingProgressChanged WebBrowserEvent arg0 not statusChanged WebBrowserEvent arg0 .. . .. . @Override public void loadingProgressChanged WebBrowserEvent arg0 TODO Auto-generated method stub if webBrowser.getLoadingProgress 100 webBrowser.executeJavascript some js code .. . .. . but still it takes time to load my html",
"this is the way how we say to flash to give us a chance to run something when some event happened and finished : put this at the end of your event in your class .. . .. . and this is how we use that point to run sth else where you have called and used the class :",
"Why do you prefer one type of URL over another since it s easy to convert from one type to the other",
"Requesting focus on the component may not give focus to the you tube video element unless the JWebBrowser component provides you a means to focus a given element I don t think you ll get much luck",
"Christopher Thank you very much.But I really don t understant what you mean.And I paste my code in my question.When I click the start button in my application main page I will execute the following code : new Timer .schedule new TimerTask public void run new Thread MyVisit .start would you give me some more detail suggestions",
"For eg : even on clicking any link i want it to open google.com only .",
"You can manipulate links in the DOM via Javascript executed by JWebBrowser .",
"I want to distribute this program as a single JARfile .",
"I am using eclipse IDE and am willing to use the tools it comes with if I can .",
"The website says its license is the LGPL .",
"I recommend researching that .",
"Check the license carefully .",
"It s listed as GNU or LGPL .",
"If it s GNU then you may not include it in your closed-source program .",
"If it s LGPL then you can - I suggest you confirm with the author .",
"gnu.org licenses lgpl-java.html https : www.gnu.org licenses lgpl-java.html",
"If so it might just be better to edit this question",
"However you should acknowledge your usage with a parts of this work are copyright .. . in your own small print",
"The license requires that only the LGPL software-parts be modifiable by end-users via source code availability .",
"so how can I include this in my JARfile under these terms",
"@user3053430 You may not include it into your jar file ."
]
}
|
{
"confidence": [
79.91108703613281,
77.95101928710938,
75.56610870361328,
73.96138763427734,
71.8948974609375,
66.09609985351562,
64.82640838623047,
62.5595703125,
61.98356628417969,
61.770233154296875,
57.278526306152344,
56.7490348815918,
56.60331726074219,
52.80058288574219,
50.093536376953125,
48.011207580566406,
47.5748405456543,
47.43149948120117,
47.36747741699219,
44.156856536865234
],
"content": [
"Question : I have Google Chrome Frame installed on my Windows XP + IE8 machine . When I navigate to chrome frame enabled page using IE8 it works . But when I navigate to the site through a Java application that uses DJ Native Swing the add-on is not activated . The application uses SWT version 3.740 . Is it possible enable Chrome Frame in the DJ Native Swing browser Comment : I guess you don t need Chrome frame but just embed IE browser . Is it right Comment : And do you use mainly Swing or SWT Comment : I need Chrome frame to work in the java application . The java application uses DJ Native Swing browser . I am asking if i can make Chrome Frame work with DJ Native Swing browser .. . Answer : Try imbedding WebKit layout engine with V8 JavaScript engine into Swing . Getting Chrome Browser in java Applications http : stackoverflow.com questions 7244653 getting-chrome-browser-in-java-applications",
"Question : I have Google Chrome Frame installed on my Windows XP + IE8 machine . When I navigate to chrome frame enabled page using IE8 it works . But when I navigate to the site through a Java application that uses DJ Native Swing the add-on is not activated . The application uses SWT version 3.740 . Is it possible enable Chrome Frame in the DJ Native Swing browser Comment : I guess you don t need Chrome frame but just embed IE browser . Is it right Comment : And do you use mainly Swing or SWT Comment : I need Chrome frame to work in the java application . The java application uses DJ Native Swing browser . I am asking if i can make Chrome Frame work with DJ Native Swing browser .. . Answer : First SWT control for Browser is what DJ Native Swing is using but it also has all sorts of glue code to make it thread safe with Swing . Thus changing to pure SWT would yield the same problems plus threading issues to solve . About Google Chrome Frame in SWT and thus in DJ Native Swing there is currently no support in SWT itself . See this bug : https : bugs.eclipse.org bugs show bug.cgi id 317322 .. . .. . SWT and DJ Native Swing allow to create one s own ActiveX bridge . Maybe you could create your own component for Google Chrome Frame ActiveX on windows similar to what DJ Native Swing does for the Windows Media Player component .",
"Question : I have Google Chrome Frame installed on my Windows XP + IE8 machine . When I navigate to chrome frame enabled page using IE8 it works . But when I navigate to the site through a Java application that uses DJ Native Swing the add-on is not activated . The application uses SWT version 3.740 . Is it possible enable Chrome Frame in the DJ Native Swing browser Comment : I guess you don t need Chrome frame but just embed IE browser . Is it right Comment : And do you use mainly Swing or SWT Comment : I need Chrome frame to work in the java application . The java application uses DJ Native Swing browser . I am asking if i can make Chrome Frame work with DJ Native Swing browser .. . Answer : According to the documentation at JavaDoc : JWebBrowser http : djproject.sourceforge.net ns documentation javadoc chrriis dj nativeswing swtimpl components JWebBrowser.html it only supports IE and Mozilla : .. . .. . A native web browser using Internet Explorer or Mozilla on Windows and Mozilla on other platforms . However according to the code it implements the XULRunner Runtime NSOption which according to The XULRunner Wikipedia article http : en.wikipedia.org wiki XULRunner XULRunner appears in the credits for Chrome therefore it may suit your requirements to use Mozilla but it wont be Chrome . The methods JWebBrowser.useWebkitRuntime and JWebBrowser.useXULRunnerRuntime seem to be the only built-in options but you can use the NSOption class to define your own options if you know the correct variable names to pass . I hope this helps Comment : Yes I see I cant get Chrome work with DJ Native Swing therefore I am trying to make it work with the Chrome Frame add-on . Also I dont want to assume the clients of my program have Chrome installed on their computers but I can assume IE is installed and Frame add-on can easily be installed by visiting www.google.com chromeframe . Comment : I have no idea on what kind of variable name value to pass to DJ Native Swing to enable the chrome frame plugin . Can you suggest any links or code Comment : Sorry looked through and I have nothing",
"Question : I have Google Chrome Frame installed on my Windows XP + IE8 machine . When I navigate to chrome frame enabled page using IE8 it works . But when I navigate to the site through a Java application that uses DJ Native Swing the add-on is not activated . The application uses SWT version 3.740 . Is it possible enable Chrome Frame in the DJ Native Swing browser Comment : I guess you don t need Chrome frame but just embed IE browser . Is it right Comment : And do you use mainly Swing or SWT Comment : I need Chrome frame to work in the java application . The java application uses DJ Native Swing browser . I am asking if i can make Chrome Frame work with DJ Native Swing browser .. . Answer : Last time in Swing project when we had to integrate browser into Swing application we finally used Eclipse SWT component that defaulted to IE . That made build for Windows only but it worked and eliminated some Swing bugs . Try using Eclipse SWT control for browser . Comment : Does Google Chrome Frame work inside Eclipse SWT control Comment : This answer suggest that you don t use Google Chrome Frame . Google Chrome Frame is a way of running Microsoft Internet Explorer IE inside Chrome . But you can use other ways to do that . Currently all widgets toolkits have WebView widget that is actually platform built-it browser . Comment : I disagree with your statement of : Google Chrome Frame is a way of running Microsoft Internet Explorer IE inside Chrome . I think it should be Google Chrome Frame is a way of running Chrome Javascript engine inside Microsoft Internet Explorer IE . It works on IE . Comment : From the beginning this thread lacks links . Yes you are right . en.wikipedia.org wiki Google Chrome Frame http : en.wikipedia.org wiki Google Chrome Frame Google Chrome Frame is a plug-in designed for Internet Explorer Comment : I guess when you are using Swing it opens browser with all plugins disabled that is the reason that it doesn t work .",
"Question : null .. . Answer : I m working with netbeans and trying to implement DJ Native Swing JWebBrowser inside a panel but I cant do that . My Gui is like that : I have buttons on the left which has jpanel for each button every button i press show me a different jpanel I want to implement DJ Native Swing JWebBrowser inside one of those panels but cant do that . when running the DJ Native Swing JWebBrowser as stand alone code it works fine and open a new jframe and display the browser . ant help will be appreciated . Comment : The code gives you 2 panels so just adjust your buttons. . Comment : why you can t do that are you getting any errors did you check out the project site for examples Comment : I dont get any error but the gui freezes and cant be closed . Comment : Can you show us some code Comment : Code : when calendar button is pressed : card calendar it call for a card named calendar.when the calendar JPanel is shown the code is : browser br new browser this.add br on the main class : NativeInterface.open java.awt.EventQueue.invokeLater new Runnable public void run login log new login log.setVisible true log.setLocationRelativeTo null how do i set the text as code",
"Question : I have a Java application made with Swing and I have used one DJ Native Swing Browser . When I tried to use that on OS X its throwing a NoClassDefFoundError all the time even though I have added swt.jar . Can some one please tell me what I am doing wrong this is my stack-trace . Comment : I am trying to run this application on mac .. . Answer : After waiting long finally i found jar files for that . here .. . .. . http : download.eclipse.org eclipse downloads drops4 S-4.4M5-201401231600 .. . .. . in that .. . .. . that is for 64 bit mac systems . I run in mac With that swt.jar",
"Question : i wanna to call youtubeviewer from a window by actionlistener .. . .. . jframe example for testing .. . .. . YouTubeViewer include class of DJ Native Swing api library . if i call directly by main function it will work.but if i call from actionlistener it will stop responding at the time i press it i guess it is the problem of running issue how to solve any idea thanks any idea .. . Answer : Your code blocks the EDT NativeInterface.runEventPump . So you should do it in a different thread . Comment : thanks you very much it works",
"Question : null .. . Answer : I want to run full screen you tube video in Swing Native browse But i am not able to run . i am not getting any exception . in my native browser screen only black color cross button is display on the top left corner of my jFarme . in my 32-bit windows machine its working file . but when i try it on 64 bit windows machine its not working . Please help me if you know something about my problem .. . .. . Jar s i used : .. . .. . DJNativeSwing.jar DJNativeSwing-SWT.jar org.eclipse.swt.win32.win32.x86 64-4.3.jar .. . .. . Tryed URL s .. . .. . https : www.youtube.com v hk5IMmEDWH4 .. . .. . https : www.youtube.com v b-cr0ewwatk fs 1 .. . .. . Code",
"Question : null .. . Answer : I have created an undecorated JFrame window which contains JWebBrowser loading Flex SWF . I am trying to capture mouse events to drag JFrame window . I realized that mouse events on JFrame cannot be captured because of Flex SWF . I would like to know if there is any work around for capturing the mouse events on Flex in DJ Native Swing JWebBrowser .",
"Question : I want to execute my javascript code in DJ native swing jwebbrowser but I should wait for the page loading how can I set listener for it I try the following but after loading it always run the script also it operate late what should i do .. . Answer : I should override loadingProgressChanged WebBrowserEvent arg0 not statusChanged WebBrowserEvent arg0 .. . .. . @Override public void loadingProgressChanged WebBrowserEvent arg0 TODO Auto-generated method stub if webBrowser.getLoadingProgress 100 webBrowser.executeJavascript some js code .. . .. . but still it takes time to load my html",
"Question : I have a Java application made with Swing and I have used one DJ Native Swing Browser . When I tried to use that on OS X its throwing a NoClassDefFoundError all the time even though I have added swt.jar . Can some one please tell me what I am doing wrong this is my stack-trace . Comment : I am trying to run this application on mac .. . Answer : ya i too faced the same problem initially while executing on ubuntu.B coz swt jar changes from OS to OS for Mac OS X mac download appropriate swt jar.Event Swt changes for 32-bit and 64 bit architecture so make sure you use proper swt jar .. . .. . for msc go to below link .. . .. . http : www.eclipse.org downloads download.php file eclipse downloads drops4 R-4.3-201306052000 swt-4.3-cocoa-macosx.zip Comment : ya m doing that will let u know Comment : But still any chances that if i have 64 bit mac how can i run that into that",
"Question : null .. . Answer : I have created a java application embedding the native swing browser . It s running perfectly fine on 32-bit JVM on windows . I want to make it run on 64 bit JVM windows . For the same purpose I have downloaded a 64 bit SWT jar and some xul runners which are labelled to be 64 bit . But i am getting target exception . Exception : .. . .. . The exception seems to be lengthy . So only posting a part of the same . I know the exception is regarding the lack of required xulrunner . But how can I solve the issue Please help . Comment : Post the full exception traceback Comment : I have posted a cut down version of the same . I heard something like 64 bit xulrunner which supports dj browser are not there and all . I am really confused . Comment : If I am not creating the JBrowser without a xulrunner it is running properly . I think it is using the native IE support . But I want to get the firefox support . So that I used xulrunner . And it was working fine on 32-bit JVM . Comment : possible duplicate of Creating a SWT.MOZILLA browser on Windows 64 bit and SWT 4.3 http : stackoverflow.com questions 21378295 creating-a-swt-mozilla-browser-on-windows-64-bit-and-swt-4-3",
"Question : I have an error htmlparsing . I think the problem stems from the quotation marks DjNative language javascript error language javascript I try all version of Dj native library .. . .. . Fatal Error : 2 : 18 : Open quote is expected for attribute 1 associated with an element type language . org.xml.sax.SAXParseException lineNumber : 2 columnNumber : 18 Open quote is expected for attribute 1 associated with an element type language . at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse Unknown Source at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse Unknown Source .. . .. . When I try to get page source code a html page via DJNative Swing .. . .. . If source like below html parse is work well .. . Answer : I solve this problem with Jsoup-1.7.3.jar Ex :",
"Question : I have java Swing Dj Native application and i tried to run it in ubuntu and its Running but when i tried same in windows 64 bit its giving error so what error is that can any body suggest me solution Error log in windows . What error is this how to resolve it Comment : A better question would be why is it trying to load swt-gtk on Windows since the Windows version of swt is swt-win32 and yes it s named swt-win32 for both the 32-bit and 64-bit versions . Comment : yes U right i Resolved this Question by taking out that jar from class path u can put it as ans i will accept : .. . Answer : The Windows version of SWT is named swt-win32 even on 64-bit platforms . So you have to change the classpath to point to the correct name for SWT on the platform you re using . Comment : +1 for right ans : Comment : Still I thought I saw somewhere on the SWT site how to configure the dependencies in the jar itself if you re turning your app into a jar for different platforms.. . if I find it I ll probably add it to the answer . Comment : Oh blah the multiplatform thing is only for WebStart applications https : www.eclipse.org swt jws .",
"Question : Nowadays I am working on a java swing application using DJ NativeSwing as my embed browser to do something automatic work . The scenario of my application is that a user click start button and the embed browser auto click some position of the current page and then redirect to another one and then execute some other operations like click or something other . Now here is my solution . First I will define a webbrowser class extends JWebBrowser and webbrowser listener class implements WebBrowserListener which represents a webbrowser and contains loadingProgressChanged windowOpening and so on separately . Second I define a thread class to do some logic computing and execute my browser operations as mentioned above by webbrowser.executeJavascript . At last I add mouseListener for start and stop button to start or stop the task . When I open my application the JFrame add the browser and its listener class . I click the start button the browser works and will click the target position as I expected and then the page will redirect to another one . As we all konw js code can t be executed until the page was loaded completely . So I set a global flag to check whether the page has loaded completely or not in loadingProgressChanged code : if e.getWebBrowser .getLoadingProgress 100 globalflag true within webbrowser listener class . And in the thread class I use code while globalflag false Thread.sleep 500 after first click to detect if the current page was loaded completely . However when browser first click the target position and the page redirects successfully I find that the current page has changed but blocked . After some debugging I find it . In my thread class browser will execute js code by webbrowser.executeJavascript document.getElementById target .click to click the target position and then java code while globalflag false Thread.sleep 500 to detect if the current page was loaded completely and then execute some other java code . I find that the globalflag will never change and the current page s loadingProgressChanged listener will never work because the java code while globalflag false . Because after I remove all java code after the first webbrowser.executeJavascript document.getElementById target .click the current page s loadingProgressChanged listener works and the page was not blocked . With the DJ NativeSwing demo I could execute my js in the loadingProgressChanged . However I want to do a series of operations with my browser and also want to stop the task whenever need . So I prefer to my solution for my demand rather than the provided one by demo . So I wonder that after webbrowser.executeJavascript the DJ NativeSwing thread will wait my thread And in my software architecture does anyone could have any suggestions Thanks a lot . Any suggestion is appreciated PS.my application works fine with jdic-0.9.5 but it supports IE7 only . I paste my code here to demonstrate my problem : After I click the start button in JFrame I will new a thread as follow .. . .. . .. . public class MyVisit implements Runnable .. . private void doClick1 .. . webbrowser.executeJavascript document.getElementById n .value test .. . webbrowser.executeJavascript document.getElementById f .submit .. . .. . public void run .. . globalFlag false .. . webbrowser.executeJavascript document.getElementById t .click .. . while globalFlag .. . Thread.sleep 500 .. . .. . this.doClick1 .. . .. . .. . .. . .. . public class MyListener implements WebBrowserListener .. . .. . public void loadingProgressChanged WebBrowserEvent e .. . if e.getWebBrowser .getLoadingProgress 100 .. . globalFlag true .. . .. . .. . .. . Answer : DJ Native Swing enforces the Swing approach to threading : manipulate the components in the AWT Event Dispatch thread a.k.a . UI thread . But also do not block that thread because listeners are triggered in that thread too . So you should not have a while-loop in the UI thread but should instead spawn a new thread . I hope your global variable is volatile or AtomicBoolean or all accesses to it protected by synchronized block otherwise you might have interesting threading side effects . Comment : Christopher Thank you very much.But I really don t understant what you mean.And I paste my code in my question.When I click the start button in my application main page I will execute the following code : new Timer .schedule new TimerTask public void run new Thread MyVisit .start would you give me some more detail suggestions Nowadays I am really stuck by this problem after I replaceed JDIC with DJ NativeSwing and look forward to your response anxiously.Thanks again",
"Question : I am using DJ Native Web Browser . I want to manupulate link using this.Can i acheive this thing using this dj native web browser . For eg : even on clicking any link i want it to open google.com only . .. . Answer : You can manipulate links in the DOM via Javascript executed by JWebBrowser .",
"Question : null .. . Answer : Im using DJ native swing to make a web browser . After my browser gathers certain information I would like it to change to another website . Does anyone know how to do this I ve tried : .. . .. . I d like to change the webpage from outside of .. . .. . public static JComponent createContent .. . Comment : 1 For better help sooner post a MCTaRE http : stackoverflow.com help mcve Minimal Complete Tested and Readable Example . 2 Always copy-paste error exception output . -- My best guess would be that it is out of scope by that point . ..But I don t like guessing . Comment : I added all the code. . I just fiddled with it to put the webBrowser.navigate yahoo.com https : www.yahoo.com 22 in a reachable area but its in a messy loop which never lets the contentPane start.. . but that s kinda what I want to do if it worked . Comment : I added all the code. . Why I suggested you post a MCTaRE . Comment : Forgive me I added a link-to the minimal code its complete and tested and readable . I just want the program to change the page after a minute for example without user interaction . Comment : When I wrote ..post a MCTaRE I did not mean post a link-to a MCTaRE . I meant ..post a MCTaRE as an edit to the question",
"Question : I am using chrriis.dj.nativeswing.swtimpl.components.JWebBrowser in my swing application to open web page of a jupyter-notebook . Now my problem is when I click New- Python 3 button JWebBrowser to new a file it always return the 404 page . New a notebook in DJNativeSwing JWebBrowser http : i.stack.imgur.com FeKGj.png .. . .. . DJNativeSwing JWebBrowser got the 404 page http : i.stack.imgur.com stqXe.png .. . .. . I think maybe it did not execute the javascript api in jupyter-notebook can anyone help me make the DJNativeSwing JWebBrowser work under jupyter-notebook The code I used : Comment : I don t know what engine jwebbrowser is using but Jupyter requires a fairly modern web browser - it s possible that it doesn t support something Jupyter needs . Comment : The java app ran under windows8.1 I think it use IE11 . .. . Answer : Thanks Thomas K http : stackoverflow.com questions 36837979 how-can-i-use-djnativeswing-jwebbrowser-as-the-browser-for-the-jupyter-notebook comment61249307 36837979 . I changed the engine of jwebbrowser to Xulrunner-24.0.en-US and the problem disappeared .",
"Question : I have use a browser that is DJ enabled Browser http : djproject.sourceforge.net ns of Swing . I have jars for the Windows and Linux that is swt.jars and but which jar will I need to run same program for the MAC OS using Java Comment : Why not Desktop browse Comment : @trashgod m asking about jar dude . Comment : If you don t find a better solution Desktop browse has been in the JRE since version 6 . Comment : @trashgod i know that but i need to open it into swing browser only . my requirement is just like that . and ya so m asking for required jar files .. . Answer : After waiting long finally i found jar files for that . here .. . .. . http : download.eclipse.org eclipse downloads drops4 S-4.4M5-201401231600 .. . .. . in that .. . .. . Mac OSX Mac Cocoa x86-64 that is for 64 bit mac systems . I run in mac With that swt.jar",
"Question : I have use a browser that is DJ enabled Browser http : djproject.sourceforge.net ns of Swing . I have jars for the Windows and Linux that is swt.jars and but which jar will I need to run same program for the MAC OS using Java Comment : Why not Desktop browse Comment : @trashgod m asking about jar dude . Comment : If you don t find a better solution Desktop browse has been in the JRE since version 6 . Comment : @trashgod i know that but i need to open it into swing browser only . my requirement is just like that . and ya so m asking for required jar files .. . Answer : you can use swt-mac.jar you can download latest version http : download.eclipse.org eclipse downloads drops4 R-4.2.2-201302041200 index.php SWT Comment : R u sure that it will run on this Comment : and how do i run that . and ya shell i have to put that swt.jar and swt-debug.jar into the lib folder in that or classpath Comment : what u have given link that giving 400 error"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
s
|
UNK_RELATION
|
asadmin@server@80
|
asadmin -- asadmin is a tool for administrative tasks for the oracle glassfish @placeholder which is commonly used in the command-line .
|
{
"confidence": [
55.71281433105469,
48.06730270385742,
47.70763397216797,
47.69120788574219,
47.408409118652344,
43.71092987060547,
42.86307144165039,
41.64490509033203,
41.58527374267578,
41.58527374267578,
41.07410430908203,
40.99571228027344,
40.91773986816406,
40.91773986816406,
40.91773986816406,
40.587303161621094,
40.53116989135742,
40.53116989135742,
40.395851135253906,
39.28697204589844,
39.23217010498047,
39.23217010498047,
39.23217010498047,
39.23217010498047,
39.20360565185547,
39.20360565185547,
39.154197692871094,
39.07034683227539,
37.83468246459961,
37.58272933959961,
36.07114028930664,
36.07114028930664,
36.07114028930664,
36.07114028930664,
36.07114028930664,
35.9464111328125,
35.9464111328125,
35.9464111328125,
35.928977966308594,
35.706356048583984,
35.595909118652344,
35.319923400878906,
34.90119934082031,
34.8326416015625,
34.68268585205078,
34.46998977661133,
33.57679748535156,
33.57679748535156,
33.030635833740234,
32.53484344482422,
32.06972122192383,
31.81325340270996,
31.81325340270996,
31.81325340270996,
31.81325340270996,
31.81325340270996,
31.81325340270996,
31.81325340270996,
31.81325340270996,
31.729406356811523,
31.625080108642578,
31.625080108642578,
31.52189064025879,
31.52189064025879,
30.970876693725586,
30.970876693725586,
30.858932495117188,
30.760272979736328,
30.643310546875,
30.643310546875,
30.391836166381836,
30.391836166381836,
30.236003875732422,
30.236003875732422,
30.09250259399414,
29.293195724487305,
29.293195724487305,
29.24110221862793,
29.207334518432617,
29.207334518432617,
29.070035934448242,
28.381732940673828,
28.21991539001465,
28.052154541015625,
28.052154541015625,
27.40807342529297,
27.306493759155273,
26.667827606201172,
26.635183334350586,
26.635183334350586,
26.54916763305664,
26.36882209777832,
26.288612365722656,
24.461620330810547,
24.461620330810547,
24.22344970703125,
24.053741455078125
],
"content": [
"Which asadmin command with",
"They aren t the GlassFish administration and asadmin are 99 9 equal in GlassFish 3 and 4 .",
"i think asadmin command may tell us which port belong to glassfish instance .",
"Would you know of such an asadmin command",
"Make sure to configure the ASADMIN variable with the path to asadmin .",
"I can t run asadmin command as well .",
"But how to do the same with domain which starts with asadmin",
"If I delete argument deploy argument and change executable asadmin executable to executable asadmin deploy executable maven fails with asadmin deploy : not found .",
"Oddly enough running asadmin stop-domain will stop the two DAS java.exe processes but then running asadmin start-domain starts Glassfish as a non-service .",
"Is there any additional service wrapper configuration that needs to be done or asadmin options that need to be passed in when running asadmin commands on GlassFish 4.0 running as a service",
"The asadmin command tells you if it has successfully added or deleted an option .",
"Or to log asadmin commands as they are being created via the GUI",
"Is there a way in glassfish v2 asadmin utility to copy jar files into the server lib or the domain s lib",
"asadmin deploy moves your deployable code to the autodeploy directory making glassfish aware of its existence to deploy .",
"So my question is : Does anybody know how to install only the asadmin tools without installing the whole Glassfish server",
"As per Oracle documentation I started glassfish using .. . .. . asadmin start-domain --verbose .. . .. . There was no error in logs but there was no success message too and the command did not end execution control did not return to dos prompt .",
"You can also use the asadmin utility to change this setting : .. . .. . asadmin set configs.config.server-config.admin-service.property.adminConsoleStartup ALWAYS",
"I ve tried asadmin create-jvm-options and asadmin create-system-properties - it didn t help me .",
"The error given by asadmin is somehow misleading .",
"How do I run asadmin commands and specify which domain to be affected",
"Only tha asadmin deploy parameter --contextroot helped .",
"The quick answer : use asadmin get and set .",
"Also useful : asadmin get domain.resources.jdbc-connection-pool.POOLNAME .",
"I m starting asadmin directly via admin-cli.jar .",
"glassfish@6b99de007186 asadmin delete-jvm-options -client : -XX : MaxPermSize 192m : -Xmx512m Deleted 3 option s Command delete-jvm-options executed successfully .",
"glassfish@6b99de007186 asadmin create-jvm-options -server : -XX : MaxPermSize 256m : -Xmx1024m Created 3 option s Command create-jvm-options executed successfully .",
"Due to project limitations I need to configure my GlassFish installation using asadmin within a shell script linux .",
"I can not deploy an application-client in GlassFish with the asadmin command and the option java-web-start enabled .",
"What is the correct way to escape whitespaced so that asadmin console will understand it .",
"Such as : .. . .. . asadmin desc-jdbc-connection-pool sample derby pool .. . .. . name : sample derby pool .. . databaseName : oracle .. . portNumber : 1521 .. . serverName : test .. . user : testUser .. . .. .",
"I thought asadmin create-ssl would be what I needed but unfortunately it was not .",
"This tells me that I should be able to configure it via asadmin .",
"The actual problem is in the bin-directory there are two files : asadmin.bat and asadmin Linux-Executable .",
"You can t specify a domain directly for most of the asadmin commands .",
"How does asadmin tell me this return code output .. .",
"I have looked many places but cannot find the correct asadmin command to make these changes .",
".. . .. . asadmin list-jdbc-connection-pools .. . sample derby pool .. . TimerPool .. . Command list-jdbc-connection-pools executed successfully .",
"Now open command-prompt and go to the bin folder and run asadmin start-domain domain1 .",
"After doing a bit more research I gave up on trying to install asadmin without the full Glassfish installation and instead used Glassfish s REST admin interface .",
"I m trying to create a new domain with the asadmin tool but it fails every time reporting that all ports are in use .",
"First the asadmin command-line format : .. . .. . asadmin asadmin options command command options . .. . .. . First specify the asadmin options : .. . .. . asadmin --passwordfile password --user admin --host localhost command command options .. . .. . Next specify the command you are interested in : .. . .. . asadmin --passwordfile password --user admin --host localhost deploy command options .. . .. . Next specify command options .",
"At the moment I am using asadmin for this and it works fine but this option requires me to have Glassfish installed on the build-server as well - which I would like to avoid as I do not need it there .",
"The problem is installer fail creating admin account through asadmin .",
"I did the following but output from terminal is : .. . .. . .. . No command asadmin found did you mean : Command amadmin from package amanda-server universe Command acsadmin from package ion universe asadmin : command not found .. . .. . .. . I have Ubuntu 14.04 Trusty Tahr .",
"The command path I used is : .. . .. . glassfish-install-dir bin asadmin create-domain domain-name .. . .. . The output it shows below on configuration step is : .. . .. . CREATING DOMAIN .. . .. .",
"If you try to delete an option which doesn t exist asadmin will tell you that no option was deleted because it didn t exist .",
"You can try to use SSH and run asadmin utilities from remote machine .",
"But it is not the prefered solution : because it runs in a build envronment that do all the stuff with asadmin REST interface .",
"If I open the cmd I need to run : cd C : Program Files x86 glassfish-3.1.2 bin and then asadmin start-domain domain1 .",
"Go to asenv.bat file in config directory .. . .. . 2 . remove line set AS JAVA C : Program Files x86 Java .. . 3 . retry asadmin .",
"What my ssl section needs to look like is this : .. . .. . As I have said I have looked for a couple of days now and I cannot find the correct command-line commands to use with asadmin to set these parameters .",
"Normally I would use asadmin undeploy --target target appname for each application .",
"To add the proxiedProtocols property : asadmin set server-config.http-service.http-listener.http-listener-2.property.proxiedProtoco ls ws tcp",
"The asadmin docs http : docs.oracle.com cd E18930 01 html 821-2416 gepzd.html scrolltoc also warns about it .",
"Then I simply ran in . . glassfish4 galssfish sudo . bin asadmin start-domain and then it worked again.. .",
"I don t really have to parse and evaluate the output of asadmin list-jvm-options do I",
"To your second point : How does asadmin tell me this return code output .. .",
"So for multiple options you could do this : asadmin create-jvm-options -XX : +UnlockCommercialFeatures : -XX : +FlightRecorder",
"When I ve uploaded my war by scp logged on VPS by SSH and deployed by asadmin deploy JEE.war everything worked .",
"Is there an option parameter to deploy an application-client with java-web-start enabled with the asadmin command",
"The glassfish administation guide states that JVM options ought to be added with asadmin create-jvm-options -Dkey value : -Dkey value https : glassfish.java.net docs 4.0 administration-guide.pdf S . 120 .",
"Try use .. . .. . asadmin .. . --upload false .. . .. . .. . More information : here https : java.net jira browse GRIZZLY-1713 and here https : java.net jira browse GLASSFISH-21180",
"I m trying to run a number of commands such as : asadmin create-custom-resource however I have multiple-domains and I wish to specify which domain to be affected .",
"Invoking asadmin create-jvm-options -XX : MaxPermSize 1024m : -Xmx4096 adds the two options without removing which correctly prevents the wrong option to be recognized .",
"I want to do a remote deployment using hudson on a different box so i have a script that executes a bunch of asadmin commands .",
"When I want to create a resource of any kind using the asadmin CLI I run into troubles when I have whitespaces in strings .",
"Number of operands should be equal to 1 . .. . .. . but just before it fails it logs this line : .. . .. . DEBUG Executing command-line : asadmin deploy --user admin --type ejb --libraries pedra-signon-ejb-1.0.jar target my-ejb-1.0.jar .. . .. . which is the same command that I executed manually .",
"If the option name is specified with the same value asadmin create-jvm-options complains that the option is already present the another value is specified the values are both present - which one is used .",
"After some more googling I logged into the asadmin and at the prompt typed start-domain .",
"In Ubuntu and Linux in gener l you run commands from current directory like this : . asadmin ie .",
"Update : .. . .. . In order to delete option I have to know both key and value what do I do if the option set is -XX : MaxPermSize 193m - it won t be deleted but asadmin will produce a second option the order is unclear therefore I would have to parse the output of asadmin list-jvm-options .",
"In order to delete option I have to know both key and value what do I do if the option set is -XX : MaxPermSize 193m - it won t be deleted but asadmin will produce a second option the order is unclear therefore I would have to parse the output of asadmin list-jvm-options .",
"I always lauch the server trough the IDE facility but now I m trying to do it trough the shell but the asadmin command is not supported where i wrong",
"The problem is that if I use the asadmin restart-domain command two new java.exe processes spawn and the two old ones do not die .",
"Hi I have got question about glassfish and command-line .",
"I can install the realm using the create-auth-realm asadmin http : docs.oracle.com cd E18930 01 html 821-2433 create-auth-realm-1.html scrolltoc command .",
"Define MyLoginModule in that config login.conf file : .. . .. . .. . MyLoginModule .. . fr.mycompany.security.MyLoginModule required .. . .. . .. . .. . I can edit the login.conf file by hand but would like to use an asadmin command to automate this step .",
"The application that is deployed works fine but with enough restarts using asadmin the memory starts to fill up from zombie java.exe s .",
"Use asadmin to update the The HTTP Network Listener named admin-listener http : docs.oracle.com cd E18930 01 html 821-2416 ggnfu.html giwls .",
"Same question here : I don t really have to parse and evaluate the output of asadmin list-jvm-options before and after adding options do I",
"I can t find any download that installs only the asadmin tools and also my attempt to manually copy over only the required files failed as there are some dependencies to certain .jars that I don t know of so it always fails unless I copy the whole glassfish installation folder to the build-server .",
"I ve written a small file containing a Glassfish domain creation sequence that looks like this : .. . .. . I usually run all thoses steps through Glassfish asadmin http : download.oracle.com docs cd E19798-01 821-1758 asadmin-1m index.html multimode http : download.oracle.com docs cd E19798-01 821-1758 multimode-1 index.html .",
"After googling around I d thought that the possible solution would be to extend asadmin utility http : docs.oracle.com cd E18930 01 html 821-2415 ghmza.html which doesn t seem too hard .",
"In any event I don t think the asadmin deploy would have access to your domain lib or server lib directory but rather only your application directory structure itself .",
": .. . .. . asadmin create-jms-resource --restype javax.jms.ConnectionFactory --description a description jms testFactory .. . .. . I get an error message saying create-jms-resource only accepts one operand .",
"For that I first had to import the Glassfish certificate into the keystore .. . .. . The pom-file with the maven-jarsigner-plugin plugin looks like : .. . .. . Now I can deploy the application with a asadmin deployment script and java-web-start is enabled",
"asadmin enable-secure-admin-principal http : docs.oracle.com cd E18930 01 html 821-2433 enable-secure-admin-principal-1.html Instructs GlassFish Server when secure admin is enabled to accept admin requests from clients identified by the specified SSL certificate .",
"I am trying to automatically deploy our Java EE application from our build-server Jenkins to a remote Glassfish server via the command-line .",
"When I try to create a new domain with asadmin as root user : .. . .. . I have the following error .. . .. . Any idea how to solve this problem",
"Also the only way to stop the DAS java.exe processes is with asadmin stopping the service using sc stop domain1 stalls and does not work .",
"@SiamandMaroufi You can set the command used to start the Glassfish server in the Run configurations see the screenshot http : i.imgur.com rLgE4oP.png",
"asadmin enable-secure-admin http : docs.oracle.com cd E18930 01 html 821-2433 enable-secure-admin-1.html scrolltoc enables secure admin if it is not already enabled optionally changing the alias used for DAS-to-instance admin messages or the alias used for instance-to-DAS admin messages .",
"You have to delete the JVM option with asadmin delete-jvm-options : .. . .. . Then add the option again with the new value : .. . .. . A restart of the server is always required after changing JVM options .",
"Alternatively I would also be happy to use any other command-line tools as long as they allow me to deploy to a remote Glassfish instance using secure communication .",
"I need a way to use Glassfish 3.1.2.2 admin service REST call to deploy and configre from a remote machine and from local machine command-line and applications .",
"My glassfish instance s port not 8080 .",
"In your case the desired configuration file would look like this : .. . .. . You can find further details in section GlassFish Server Deployment Descriptor Files of Oracle GlassFish Server Application Deployment Guide ."
]
}
|
{
"confidence": [
61.98369216918945,
60.37398910522461,
60.32636642456055,
59.427677154541016,
59.213375091552734,
58.87722396850586,
58.79522705078125,
58.228641510009766,
58.1665153503418,
57.3931884765625,
56.90213394165039,
55.97019577026367,
55.6761474609375,
54.42316436767578,
54.0068244934082,
53.90272903442383,
53.61457824707031,
53.086570739746094,
52.244285583496094,
51.96875
],
"content": [
"Question : The glassfish administation guide states that JVM options ought to be added with asadmin create-jvm-options -Dkey value : -Dkey value https : glassfish.java.net docs 4.0 administration-guide.pdf S . 120 . Of course the examples don t include the interesting and pedagogical important case of adding options containing : and options starting with -XX instead of -D . It is explained to escape : with though . Invoking asadmin create-jvm-options -XX : MaxPermSize 1024m : -Xmx4096 adds the two options without removing which correctly prevents the wrong option to be recognized . What is the correct way to proceed here How to overwrite existing options If the option name is specified with the same value asadmin create-jvm-options complains that the option is already present the another value is specified the values are both present - which one is used . I don t really have to parse and evaluate the output of asadmin list-jvm-options do I How do I find out whether the options have been added or not i.e . whether I have to restart the domain Same question here : I don t really have to parse and evaluate the output of asadmin list-jvm-options before and after adding options do I .. . Answer : What is the correct way to proceed here You have to delete the JVM option with asadmin delete-jvm-options : .. . .. . Then add the option again with the new value : .. . .. . A restart of the server is always required after changing JVM options . .. . .. . How to overwrite existing options If the option name is specified with the same value asadmin create-jvm-options complains that the option is already present the another value is specified the values are both present - which one is used . I don t really have to parse and evaluate the output of asadmin list-jvm-options do I I guess this problem is obsolete if you follow the above instructions . How do I find out whether the options have been added or not i.e . whether I have to restart the domain Same question here : I don t really have to parse and evaluate the output of asadmin list-jvm-options before and after adding options do I The asadmin command tells you if it has successfully added or deleted an option . If you try to delete an option which doesn t exist asadmin will tell you that no option was deleted because it didn t exist . Update : .. . .. . In order to delete option I have to know both key and value what do I do if the option set is -XX : MaxPermSize 193m - it won t be deleted but asadmin will produce a second option the order is unclear therefore I would have to parse the output of asadmin list-jvm-options . Why should it have the value 193m if you didn t set that before and then you probably know it And if it has this value yes you are right you would have to parse the output of list-jvm-options to find it out . You could also write a script which tries to delete the value by increasing the parameter 192m 193m 194m and so on but that would take a long time to complete . How does asadmin tell me this return code output .. . It outputs human-readable messages like this : .. . .. . or .. . .. . Try for yourself to see the different messages . I m referring to GF 4.0 so links to the 3.0.1 admin guide are obsolete . They aren t the GlassFish administration and asadmin are 99 9 equal in GlassFish 3 and 4 . What about the escaping issue I can t reproduce that maybe it helps to set only one value at a time or to wrap param and value in quotation marks . See also : .. . .. . Oracle GlassFish Server 3.0.1 Administration Guide - To Delete JVM Options http : docs.oracle.com cd E19798-01 821-1751 ggnfi index.html .. . Oracle GlassFish Server 3.0.1 Administration Guide - Administering JVM Options http : docs.oracle.com cd E19798-01 821-1751 gepzd index.html Comment : In order to delete option I have to know both key and value what do I do if the option set is -XX : MaxPermSize 193m - it won t be deleted but asadmin will produce a second option the order is unclear therefore I would have to parse the output of asadmin list-jvm-options . To your second point : How does asadmin tell me this return code output .. . I m referring to GF 4.0 so links to the 3.0.1 admin guide are obsolete I m even referencing the right version in my question.. . . What about the escaping issue Comment : I ve updated my answer : Comment : Thank you : The result is the worst I expected . 1 What s the sense in specifying different -Xmx options overwriting should occur based on keys and evict all values 2 Unspecified return codes almost are a kind of sadism by the developer s I was hoping for input beyong the admin guide towards a sophisticated technical specification . I think my question and you answer show that this admin guide is quite unusable useless . Comment : If you use single quotes don t escape inline colons otherwise the create will fail . So for multiple options you could do this : asadmin create-jvm-options -XX : +UnlockCommercialFeatures : -XX : +FlightRecorder",
"Question : The only relevant command that I found is : .. . .. . NAME list-jdbc-connection-pools - lists all JDBC connection pools .. . .. . EXAMPLES This example lists the existing JDBC connection pools . .. . .. . asadmin list-jdbc-connection-pools .. . sample derby pool .. . TimerPool .. . Command list-jdbc-connection-pools executed successfully . .. . .. . What I want is to display the information about particular connection pool . Such as : .. . .. . asadmin desc-jdbc-connection-pool sample derby pool .. . .. . name : sample derby pool .. . databaseName : oracle .. . portNumber : 1521 .. . serverName : test .. . user : testUser .. . .. . .. . Answer : Try running : .. . .. . asadmin get more .. . .. . The above command will display all GlassFish attributes . Pipe it to grep to get just the pool properties you are interested in : .. . .. . asadmin get grep TimerPool .. . .. . Hope this helps . Comment : Thanks for the answer . After googling around I d thought that the possible solution would be to extend asadmin utility http : docs.oracle.com cd E18930 01 html 821-2415 ghmza.html which doesn t seem too hard . Comment : Yeah you could do that but it seems a bit overkill unless there are pretty specific requirements . Comment : Thanks John . Also useful : asadmin get domain.resources.jdbc-connection-pool.POOLNAME .",
"Question : The glassfish administation guide states that JVM options ought to be added with asadmin create-jvm-options -Dkey value : -Dkey value https : glassfish.java.net docs 4.0 administration-guide.pdf S . 120 . Of course the examples don t include the interesting and pedagogical important case of adding options containing : and options starting with -XX instead of -D . It is explained to escape : with though . Invoking asadmin create-jvm-options -XX : MaxPermSize 1024m : -Xmx4096 adds the two options without removing which correctly prevents the wrong option to be recognized . What is the correct way to proceed here How to overwrite existing options If the option name is specified with the same value asadmin create-jvm-options complains that the option is already present the another value is specified the values are both present - which one is used . I don t really have to parse and evaluate the output of asadmin list-jvm-options do I How do I find out whether the options have been added or not i.e . whether I have to restart the domain Same question here : I don t really have to parse and evaluate the output of asadmin list-jvm-options before and after adding options do I .. . Answer : glassfish@6b99de007186 asadmin delete-jvm-options -client : -XX : MaxPermSize 192m : -Xmx512m Deleted 3 option s Command delete-jvm-options executed successfully . glassfish@6b99de007186 asadmin create-jvm-options -server : -XX : MaxPermSize 256m : -Xmx1024m Created 3 option s Command create-jvm-options executed successfully .",
"Question : I m using Java EE with Glassfish . I can t run asadmin command as well . I did the following but output from terminal is : .. . .. . .. . No command asadmin found did you mean : Command amadmin from package amanda-server universe Command acsadmin from package ion universe asadmin : command not found .. . .. . .. . I have Ubuntu 14.04 Trusty Tahr . I should be in bin directory of glassfish so I m in opt glassfish4 bin . But always nothing happend just error message above . Comment : My solution is here : when I add sh before whole command it works . .. . Answer : In Ubuntu and Linux in gener l you run commands from current directory like this : . asadmin ie . you must prepend . to make it explicit that you run a command I current directory . This is traditionally for some security reasons .",
"Question : I am trying to automatically deploy our Java EE application from our build-server Jenkins to a remote Glassfish server via the command-line . At the moment I am using asadmin for this and it works fine but this option requires me to have Glassfish installed on the build-server as well - which I would like to avoid as I do not need it there . The build-server is really only running the builds and the deployment so I would like to keep the server as clean as possible . I can t find any download that installs only the asadmin tools and also my attempt to manually copy over only the required files failed as there are some dependencies to certain .jars that I don t know of so it always fails unless I copy the whole glassfish installation folder to the build-server . So my question is : Does anybody know how to install only the asadmin tools without installing the whole Glassfish server Alternatively I would also be happy to use any other command-line tools as long as they allow me to deploy to a remote Glassfish instance using secure communication . .. . Answer : After doing a bit more research I gave up on trying to install asadmin without the full Glassfish installation and instead used Glassfish s REST admin interface . I now made it work using CURL in a simple batch-file : .. . .. . The REST API is fairly straight forward once you know what you need to do but just in case somebody else needs this here a couple of important points : .. . .. . --insecure is required by CURL to allow self-signed and untrusted SSL certificates .. . The header attributes for Accept and X-Requested-By must be set otherwise Glassfish doesn t process the request and simply returns a blank document as an ansower . No idea why but setting these parameters made it work . The content of the war file is passed as the id parameter on the POST .. . The URL needs to be exactly as shown in the snipped above i.e . do not replace domain with your domain-name or application with your application name . This is the actual REST interface endpoint . There is no need to specify the domain application name anywhere . Comment : what is the file set that you are physically deploying can t you just drop the war file on the server and done deal is there more to it Comment : In my situation the build-server does not have access to any shared drive on the application server . In order to allow a simple file drop with autodeploy we would have to share the respective autodeploy folder but this is not an option here . The use of CURL allows us to do this via HTTPS .",
"Question : Due to project limitations I need to configure my GlassFish installation using asadmin within a shell script linux . I have all of my parameters configured except one . The section I need to configure is the network listener section . Here is what the section of the default domain.xml file looks like : .. . .. . For the http-listener-2 section I need to make changes to the ssl section . I have looked many places but cannot find the correct asadmin command to make these changes . What my ssl section needs to look like is this : .. . .. . As I have said I have looked for a couple of days now and I cannot find the correct command-line commands to use with asadmin to set these parameters . I thought asadmin create-ssl would be what I needed but unfortunately it was not . In looking at the web interface for GlassFish I see the parameters I need to set . This tells me that I should be able to configure it via asadmin . Any assistance in helping me with this would be greatly appreciated . Thanks for reading and have a great day . .. . Answer : The quick answer : use asadmin get and set . here is a bit of output from commands to make it clearer.. . I hope . Let s take a look at the output from get .. . .. . .. . Now use set to alter the value of one of the other properties.. . .. . .. . Use get to verify that the value took .. . Comment : Very cool .. . thank you . It worked like a charm . I searched everywhere for this but couldn t find the correct method . I thought I might have to use the set command but I couldn t figure out how to use it . Thanks again . Comment : To add the proxiedProtocols property : asadmin set server-config.http-service.http-listener.http-listener-2.property.proxiedProtoco ls ws tcp",
"Question : I m using Glassfish 3+ and deploying the applications to application server . My glassfish instance s port not 8080 . when i enter the Glassfish Admin Console and going to Running Applications i can see the port-number which works . For example : 43888 . How i can see the port numbers running applications on command-prompt Which asadmin command with Comment : how about checking domain.xml .. . Answer : The quick and dirty way is to use the following command on UNIX Linux : .. . .. . This gets you most all the port values that are being used in a domain . Comment : im using win . i think asadmin command may tell us which port belong to glassfish instance . Comment : Never heard of this get command and I am running on a UNIX system OS X FreeBSD . -bash : get : command not found Comment : Rahman : you should install CygWin anyway . It saves you a lot of time when using Windows . Comment : This wont work if you have enabled secure admin .",
"Question : I need a way to undeploy all my applications from Glassfish . Normally I would use asadmin undeploy --target target appname for each application . My problem is that I don t know the name of all applications that are present on the server . Is there a command that would allow me to just undeploy everything Thanks . .. . Answer : You can create a bash script like this one : .. . .. . When you run it it will undeploy all deployed applications automatically . It needs awk . Make sure to configure the ASADMIN variable with the path to asadmin .",
"Question : For some monitoring purposes I need to start Glassfish domain with custom java agent attached . If I start domain directly with command : .. . .. . it works as expected . But how to do the same with domain which starts with asadmin I ve tried asadmin create-jvm-options and asadmin create-system-properties - it didn t help me . Any ideas Comment : The create-jvm-options should be working . What does list-jvm-options say to you Have you restasted the domain Comment : Actually I don t have a GF instance in front of me but you can check the startup scripts of the Glassfish probably there is an environment variabla e.g . JAVA OPTS or similar where you can set it . Comment : Well . I m starting asadmin directly via admin-cli.jar . Comment : But anyway restarting of domain helps . Thanks . Comment : You can try to make a wrapper then and you can set your agent jar in that . .. . Answer : Try restarting the domain . If you set anything JVM-related that will not be effective until you restart the domain . The GF Admin Console also warns about it it you do it on the web UI . The asadmin docs http : docs.oracle.com cd E18930 01 html 821-2416 gepzd.html scrolltoc also warns about it .",
"Question : Is there a way in glassfish v2 asadmin utility to copy jar files into the server lib or the domain s lib I want to do a remote deployment using hudson on a different box so i have a script that executes a bunch of asadmin commands . Comment : Can t hudson copy the files to a share or to the server iteself .. . Answer : asadmin deploy moves your deployable code to the autodeploy directory making glassfish aware of its existence to deploy . I believe copying a simple library out there won t net any effect without proper deployment descriptors . In any event I don t think the asadmin deploy would have access to your domain lib or server lib directory but rather only your application directory structure itself . To do what you are trying to achieve it sounds more like writing a simple ant script .",
"Question : I m trying to run a number of commands such as : asadmin create-custom-resource however I have multiple-domains and I wish to specify which domain to be affected . How do I run asadmin commands and specify which domain to be affected I m using Glassfish 3.1.2.2 .. . Answer : You can t specify a domain directly for most of the asadmin commands . But you can specify the Domain Administration Server which controls the domain . It identifies the domain indirectly . To do this just use --host and --port parameters : .. . .. . See also : .. . .. . Glassfish 3.1.1 - How to enable secure admin for different domains http : stackoverflow.com questions 8619063 glassfish-3-1-1-how-to-enable-secure-admin-for-different-domains .. . How to specify domain-name while creating jdbc resource connection pool in glassfish-3 http : stackoverflow.com questions 20189162 how-to-specify-domain-name-while-creating-jdbc-resource-connection-pool-in-glass",
"Question : After installing Java EE6 SDK I installed tutorial with update tool etc . As per Oracle documentation I started glassfish using .. . .. . asadmin start-domain --verbose .. . .. . There was no error in logs but there was no success message too and the command did not end execution control did not return to dos prompt . Last line in logs was .. . .. . 2012-05-28T19 : 48 : 31.213+0530 INFO glassfish3.1.2 javax.enterprise.system.jmx.org.glassfish.admin.mbeanserver ThreadID 40 ThreadName Thread-2 JMX005 : JMXStartupService had Started JMXConnector on JMXService URL service : jmx : rmi : WIN-PZ021TGFDU4 : 8686 jndi rmi : WIN-PZ021TGFDU4 : 8686 jmxrmi .. . .. . Any idea what may have gone wrong Am able to access server and admin console on 8080 and 4848 resp . .. . Answer : This is normal behavior . The Glassfish verbose mode prints server log messages to System.out in addition to the log file and you can see it in the console window . If you don t get an error message everything is ok . .. . .. . Ctrl-C will stop the server running in verbose mode and you get back to your command-prompt . If you want to see the success message just start the server without the verbose option .",
"Question : I m currently implementing a Glassfish realm backed by a neo4j DB for which I ve defined a Realm and a LoginModule class . I can install the realm using the create-auth-realm asadmin http : docs.oracle.com cd E18930 01 html 821-2433 create-auth-realm-1.html scrolltoc command . But the realm is recognized by Glassfish only if it is associated to a LoginModule defined in the config login.conf file . For instance in my case I have to do the following : .. . .. . 1 . Create the authentication realm : .. . create-auth-realm --classname com.mycompany.security.MyRealm --property jaas-context MyLoginModule myrealm .. . and then .. . .. . 2 . Define MyLoginModule in that config login.conf file : .. . .. . .. . MyLoginModule .. . fr.mycompany.security.MyLoginModule required .. . .. . .. . .. . I can edit the login.conf file by hand but would like to use an asadmin command to automate this step . Would you know of such an asadmin command .. . Answer : It seems that at the moment the Glassfish CLI does not support this . Quote from here http : java.net jira browse GLASSFISH-4757 : .. . .. . glassfish has a pretty good CLI which is actually one of the reasons why I switched over from JBoss . However there is no CLI cmd for modifying the login.conf of an instance i.e . add remove an entry in a reliable way . .. . I m wondering about why the realm is not added removed automatically to from the login.conf when one creates deletes a realm using the create-auth-realm delete-auth-realm command .. . I have requested http : java.net jira browse GLASSFISH-4757 focusedCommentId 352888 page com.atlassian.jira.plugin.system.issuetabpanels 3acomment-tabpanel action 352888 for an update . Comment : Hi . Is there any command now to do this please Comment : @OlivierJ . The Glassfish CLI does not currently support this . Check out the links in my answer . Comment : Thank you for your quick answer . I don t have account on java.net so I can t see the link . I will just copy-paste so",
"Question : I am using GlassFish 4.0 in a cluster configuration with two nodes and each node has one instance . The DAS and two instances are setup as Window 7 services that use a logon account that has administrator privileges . Upon starting the machine the service starts and the DAS is up along with the instances . From Windows Task Manager this appears as two java.exe processes per service for a total of 6 java.exe s . The problem is that if I use the asadmin restart-domain command two new java.exe processes spawn and the two old ones do not die . The application that is deployed works fine but with enough restarts using asadmin the memory starts to fill up from zombie java.exe s . Oddly enough running asadmin stop-domain will stop the two DAS java.exe processes but then running asadmin start-domain starts Glassfish as a non-service . The only way to start the DAS back as a service is to run sc start domain1 or restart the machine . Also the only way to stop the DAS java.exe processes is with asadmin stopping the service using sc stop domain1 stalls and does not work . It is also odd that each service DAS instance 1 and 2 starts two java.exe s vs starting only one each when running as a non-service . Is there any additional service wrapper configuration that needs to be done or asadmin options that need to be passed in when running asadmin commands on GlassFish 4.0 running as a service .. . Answer : These may be helpful . The implementation for 4 is the same as 3.1 .. . .. . https : blogs.oracle.com foo entry automatic starting of servers in .. . .. . https : blogs.oracle.com foo entry automatic starting implementation details for Comment : I saw the explanation of the two java processes . Thanks .",
"Question : I m using Mac OS 10.5.8 and Maven 3.0.3 . If I run this command from the command-line it works : .. . .. . But if I try executing this same command with Maven Exec Plugin mvn exec : exec with these configurations : .. . .. . it fails with : .. . .. . CLI019 Invalid number of operands . Number of operands should be equal to 1 . .. . .. . but just before it fails it logs this line : .. . .. . DEBUG Executing command-line : asadmin deploy --user admin --type ejb --libraries pedra-signon-ejb-1.0.jar target my-ejb-1.0.jar .. . .. . which is the same command that I executed manually . How can I execute this command using Maven Exec plugin If I delete argument deploy argument and change executable asadmin executable to executable asadmin deploy executable maven fails with asadmin deploy : not found . .. . Answer : The command options such as --user --type in the maven configuration need to have an character between them and their values like this :",
"Question : null .. . Answer : When I want to create a resource of any kind using the asadmin CLI I run into troubles when I have whitespaces in strings . e.g . : .. . .. . asadmin create-jms-resource --restype javax.jms.ConnectionFactory --description a description jms testFactory .. . .. . I get an error message saying create-jms-resource only accepts one operand . The same thing also happens when I try to pass properties to the CLI . I already tried all kind of escape-characters but nothing worked . What is the correct way to escape whitespaced so that asadmin console will understand it . I m working in linux Comment : I have no troubles even with the command you provided in your question . I can run it on both windows and nix based system . Maybe your problem related to shell What shell are you using Comment : I m using bash 4.2.25 1 and glassfish 3.1.2.2 Comment : My bash version is 4.2.45 and I m using the same GF version . No troubles with your command on ubuntu OS . Is it possible that your problem relates to encoding somehow Is it possible that you are using wrong quotation marks like instead of",
"Question : I would like to control when and where the admin service is accessible .. . .. . How do I do one of the following if possible .. . .. . 1 . Enable the admin console only from localhost I know about disable-secure-admin but still I don t want anyone to see the console login page when they add 4848 in the end I will use SSH tunnle to connect .. . .. . 2 . Or be able to use a certificate so only certified clients will be able to even see the console .. . .. . 3 . Or be able on demand to start stop the admin service when needed not opening it to the outside world e.g . start stop asadmin virtual-server .. . .. . Is any of the above possible Comment : I know it s on the border of serverfault although similar questions on command-line server admin were posted here and kept open if you think it should move there please comment I ll close and copy it there.. . .. . Answer : 1 . Use asadmin to update the The HTTP Network Listener named admin-listener http : docs.oracle.com cd E18930 01 html 821-2416 ggnfu.html giwls . 2 . asadmin enable-secure-admin-principal http : docs.oracle.com cd E18930 01 html 821-2433 enable-secure-admin-principal-1.html Instructs GlassFish Server when secure admin is enabled to accept admin requests from clients identified by the specified SSL certificate . 3 . asadmin enable-secure-admin http : docs.oracle.com cd E18930 01 html 821-2433 enable-secure-admin-1.html scrolltoc enables secure admin if it is not already enabled optionally changing the alias used for DAS-to-instance admin messages or the alias used for instance-to-DAS admin messages . Also a good blog https : blogs.oracle.com quinn entry securing adminstration in glassfish server1 on the subject . This doesn t turn admin on off but enables disables for remote-access to the admin console without the complications of 1 . Comment : Thanks a lot Command 3 solved my problem . I guess that Glassfish 3 3.1.2.2 build 5 in default does not enable secure-admin so the console is not available .",
"Question : I use Netbeans 7.1 and during its installation I setted up a glassfish server 3.1 . I always lauch the server trough the IDE facility but now I m trying to do it trough the shell but the asadmin command is not supported where i wrong thanks .. . Answer : If you are using Windows you have navigate to the bin directory of glassfish . For e.g . : My glassfish is installed into : C : Program Files x86 glassfish-3.1.2 bin . If I open the cmd I need to run : cd C : Program Files x86 glassfish-3.1.2 bin and then asadmin start-domain domain1 . Then it works . Comment : perfect thanks for your time . Comment : You are welcome : You can accept the answers that you helped you solve your issues .",
"Question : I tried to follow The Java EE 6 Tutorial http : docs.oracle.com javaee 6 tutorial doc javaeetutorial6.pdf and start GlassFish with the command below . But I got an error message . How to solve this .. . Answer : 1 . Go to asenv.bat file in config directory .. . .. . 2 . remove line set AS JAVA C : Program Files x86 Java .. . 3 . retry asadmin . It will work this time . Comment : As long as you have the system variable path set correctly ofcourse",
"Question : I have VPS on OVH lets say it s vpsXXXX.ovh.net with Debian 7 . I ve installed Java 8 Glassfish 4.1 and enabled secure admin : .. . .. . I ve checked that vpsXXXX.ovh.net : 8080 and vpsXXXX.ovh.net : 4848 works . When I ve uploaded my war by scp logged on VPS by SSH and deployed by asadmin deploy JEE.war everything worked . Then I ve undeployed it and tried to deploy it from remotely by command : .. . .. . I gave admin password and after a long time 30 sec i got : .. . .. . My server.log on VPS : .. . .. . Alternatively this commands runs without problems : list domains from remote : .. . .. . deploy on localhost : Comment : @Andrew Glassfish is one of the good ones my friend . Try working at a WebSphere shop for 6 months and revisit this comment . Glassfish is like a tall glass of cool water in a desert compared to that horse dookey they call WebSphere . .. . Answer : I have the same problem . Try use .. . .. . asadmin .. . --upload false .. . .. . .. . More information : here https : java.net jira browse GRIZZLY-1713 and here https : java.net jira browse GLASSFISH-21180"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
server
|
UNK_RELATION
|
aquamacs@emacs@62
|
aquamacs -- aquamacs is an aqua-native build of the powerful @placeholder text-editor .
|
{
"confidence": [
44.335487365722656,
42.62668228149414,
41.52954864501953,
41.52954864501953,
41.504390716552734,
41.504390716552734,
40.886661529541016,
40.39009475708008,
40.20358657836914,
40.20358657836914,
40.20358657836914,
40.20358657836914,
40.20358657836914,
40.20358657836914,
40.20358657836914,
40.20358657836914,
40.20358657836914,
40.01752853393555,
40.01752853393555,
39.85060119628906,
39.5104866027832,
39.268775939941406,
38.75347137451172,
38.73134994506836,
38.54979705810547,
38.54979705810547,
38.54979705810547,
38.54979705810547,
38.54979705810547,
38.54979705810547,
38.54979705810547,
38.54979705810547,
38.54979705810547,
38.54979705810547,
38.54979705810547,
38.54979705810547,
38.54979705810547,
37.656211853027344,
37.452667236328125,
37.452667236328125,
37.452667236328125,
37.452667236328125,
37.452667236328125,
37.452667236328125,
37.07756423950195,
37.07756423950195,
37.07756423950195,
37.07756423950195,
37.07756423950195,
37.03817367553711,
37.03817367553711,
37.03817367553711,
37.03817367553711,
37.03817367553711,
37.03817367553711,
36.0921516418457,
35.980430603027344,
35.3843879699707,
35.3843879699707,
35.3843879699707,
35.3843879699707,
35.3843879699707,
35.3843879699707,
35.3843879699707,
35.3843879699707,
35.36378860473633,
35.36378860473633,
35.36378860473633,
35.36378860473633,
34.8941650390625,
34.287254333496094,
34.287254333496094,
34.287254333496094,
34.287254333496094,
34.287254333496094,
34.250511169433594,
34.13700866699219,
33.85300064086914,
33.709999084472656,
33.410728454589844,
32.972312927246094,
32.941917419433594,
32.941917419433594,
32.774383544921875,
32.774383544921875,
32.774383544921875,
32.774383544921875,
32.774383544921875,
32.774383544921875,
32.774383544921875,
32.774383544921875,
32.774383544921875,
32.774383544921875,
32.774383544921875,
32.63716506958008,
32.01484680175781,
31.350997924804688,
31.350997924804688,
31.350997924804688,
31.297927856445312
],
"content": [
"I tried the nightly-build Aquamacs 3.3 same .",
"I ve never used Aquamacs .",
"This works out of the box in Aquamacs .",
"Is it possible to install Clojure on Aquamacs",
"I discovered Aquamacs requires that latex be installed separately if you want the latex button to compile latex is not included in Aquamacs .",
"Pretty much all key-bindings in Aquamacs are bound in osx-key-mode-map see Aquamacs FAQ .",
"Added .. . .. . This is what I found with Aquamacs .",
"Aquamacs makes some additional custom changes to nsterm.m e.g . for the native OSX spell checker : github.com davidswelt aquamacs-emacs blob aquamacs24 src https : github.com davidswelt aquamacs-emacs blob aquamacs24 src nsterm.m",
"Also which version of Aquamacs do you have",
"In your spare time play around with Aquamacs .",
"I use both GNU Emacs for OSX and Aquamacs .",
"everything seems to be taking more time in aquamacs .",
"Have you asked on the aquamacs mailing list",
"Problem currently solved by moving from aquamacs to emacsformacosx",
"The problem is Aquamacs intercepts that mouse button event .",
"How to open ECB context menu in Aquamacs",
"Is there a way to disable Aquamacs default context menu",
"To solve that problem open up Terminal and type in the following commands : .. . .. . ln -s Applications Aquamacs.app Applications Aquamacs Emacs.app ln -s Applications Aquamacs.app Contents MacOS Aquamacs Applications Aquamacs.app Contents MacOS Aquamacs Emacs .. . .. . This of course assumes that you have put Aquamacs in applications .",
"Loading Volumes Aquamacs Emacs Aquamacs.app Contents Resources lisp aquamacs edit-modes auctex.el source ...done Loading plugins .. . Loading Volumes Aquamacs Emacs Aquamacs.app Contents Resources lisp aquamacs site-start.el source ...done .. . done .",
"Help - Diagnose and report bug - Start Aquamacs without customizations to get a pristine Aquamacs window .",
"Does anyone know if disabling tabbed buffers in aquamacs is possible",
"It just Aquamacs won t keep the selection starting where I placed the cursor but break it as new text appears in the window .",
"I installed the ESK for Aquamacs http : github.com walter aquamacs-emacs-starter-kit and it installs ELPA at .emacs.d elpa .",
"Aquamacs has a million things that are customized based upon the developer s decisions and I haven t spent time with Aquamacs for several months now .",
"I am using Aquamacs on OSX 10.9 .",
"I m running Aquamacs on Mac OS X 10.9.5 .",
"@jpkotta I take it your experience of Aquamacs is limited .",
"@njlarsson You re right I ve never used Aquamacs .",
"Is there any way to tell Aquamacs not to use .emacs.d for ELPA",
"In one account Aquamacs runs just fine .",
"How do I stop aquamacs from doing this",
"I m using aquamacs 3.0 and OS X 10.7.5 .",
"I am using Aquamacs on OS X 10.9.4 .",
"Version information : Aquamacs 3.2 GNU Emacs 24.4.51.2 .",
"Although I used vanilla GNU Emacs not Aquamacs .",
"It did the trick after restarting Aquamacs @Chris",
"PS I m using Aquamacs on OSX if that matters .",
"Unless you cannot live without the OSX native spellchecker you should do yourself a favor and forget about using Aquamacs -- there is really no other reason to use Aquamacs in my opinion .",
"Is it possible to use ELPA to install Conjure on Emacs Aquamacs",
"Success - Running Aquamacs Clojure with lein swank .",
"@vpit3833 : The ELPA is a part of both ESK and ESK for Aquamacs .",
"I have Aquamacs running on my Mac .",
"my Aquamacs is running locally on my machine .",
"Again this is running in Aquamacs with Slime using SBCL .",
"The problem is that Cocoa emacs and Aquamacs uses the same .emacs.d but the ELPA of Cocoa emacs and that of Aquamacs are not compatible so that some files are overwritten and not usable for both of them .",
"I use Aquamacs Starter Kt http : github.com walter aquamacs-emacs-starter-kit but it seems that the .emacs directory is used in init.el .",
"Aquamacs reads Preference Aquamacs Emacs Preference and it has add-to-list load-path kitfiles-dir require init which reads start kit .",
"Aquamacs 3.2 GNU Emacs 24.4.51.2 x86 64-apple-darwin14.0.0 NS apple-appkit-1343.14 of 2014-11-07 Aquamacs-3.2",
"Running Aquamacs emacs on a Mac OS X 10.11 in my .el file I have .. . .. . On startup Aquamacs will open both files but in separate windows .",
"Now if you have installed Aquamacs3 Mozart will not be able to find Aquamacs .",
"That s because the Aquamacs has changed the directory names a bit .",
"It seems Aquamacs default Python interpreter is pyhton.el and not python-mode.el .",
"I have the simple cran R gui and aquamacs with ESS installed on a mac .",
"This doesn t happen if I start aquamacs without any customizations .",
"Press C-h k then the right mouse button over an Aquamacs window .",
"Mark set 26 times Loading Users greggold Library Preferences Aquamacs Emacs frame-positions.el source ...done file-error : Opening directory no such file or directory Users greggold Library Logs CrashReporter Mark set 5 times .. . .. . MY USER FILE clump present4.tex WAS THEN LOADED Mark set 3 times Auto-saving...done Auto-saving...done Mark set No connection file var folders q v6d8z7t96x911lskqblhg 680000gn T emacs501 server Automatic display of crossref information was turned on Applying style hooks.. . Loading Volumes Aquamacs Emacs Aquamacs.app Contents Resources lisp aquamacs edit-modes auctex style article.elc...done Loading Volumes Aquamacs Emacs Aquamacs.app Contents Resources lisp aquamacs edit-modes auctex style graphicx.elc...done Loading Volumes Aquamacs Emacs Aquamacs.app Contents Resources lisp aquamacs edit-modes auctex style amssymb.elc...done Loading Volumes Aquamacs Emacs Aquamacs.app Contents Resources lisp aquamacs edit-modes auctex style amsmath.elc...done Loading Volumes Aquamacs Emacs Aquamacs.app Contents Resources lisp aquamacs edit-modes auctex style amstext.elc...done Loading Volumes Aquamacs Emacs Aquamacs.app Contents Resources lisp aquamacs edit-modes auctex style amsbsy.elc...done Loading Volumes Aquamacs Emacs Aquamacs.app Contents Resources lisp aquamacs edit-modes auctex style amsopn.elc...done Loading Volumes Aquamacs Emacs Aquamacs.app Contents Resources lisp aquamacs edit-modes auctex style fancyhdr.elc...done Applying style hooks.. . done is undefined 3 times .. . .. . CLICK ON LATEX compile command Type C L to display results of compilation .",
"Paul Barry http : paulbarry.com articles 2008 07 02 getting-started-with-clojure-and-aquamacs gives an lecture how to use Aquamacs and Clojure .",
"But after closing and reopening Aquamacs it s back to the initial difference .",
"I tried copying Applications Emacs to Applications Aquamacs but had no luck .",
"I use Aquamacs and I use ELPA that installs files in .emacs.d elpa",
"Besides please consider to update Aquamacs or use GNU Emacs .",
"How can fci-mode be enabled on startup using Aquamacs",
"Most of the forum participants will have easy access to the generic Emacs but not Aquamacs .",
"I have a short python program that I want to run in Aquamacs .",
"What is a clever way to keybind copying and pasting inside Aquamacs emulated Terminal",
"Using version .. . .. . Aquamacs 3.0preview4 GNU Emacs 24.3.50.2 x86 64-apple-darwin13.0.0 NS apple-appkit-1265.00 of 2013-12-31 Aquamacs-3.0preview3-32-gc3bb9a0-dirty on watson.local",
"I have a new macbook pro OSX 10.10 and I installed Aquamacs 3.2 GNU Emacs 24.4.51.2 I have used aquamacs on an old machine for over a year with few problems .",
"To put it another way I d like Aquamacs to behave the same when I C-x C-f an existing pathname as when I double-click on an Aquamacs-associated file icon in the Finder .",
"There is a second approach in-place to return mouse-3 to its vanilla Emacs behavior : In the Aquamacs help manual section 4.3 Customizing Aquamacs behavior under Want some GNU Emacs 23 behavior back",
"The only really useful feature of Aquamacs is the native spellchecker but you ll find that Aspell with keyboard spell correction is more efficient than the mouse .",
"Or can you guess why Clojure on Aquamacs doesn t work",
"Is it normal that Emacs and Aquamacs can t share the same ELPA http : tromey.com elpa",
"I have emacs23.2.1 and Aquamacs 2.0 which is based on emacs23.2.1 .",
"Aquamacs most definitely works with Clojure since the author of Clojure uses it .",
"I ve been struggling to make a simple task working on my aquamacs .",
"I am not sure if this is a bug in Aquamacs GNU Emacs 23.4.1 or what but it seems I can t something very simple : bring the cursor somewhere in the text by click then press SHIFT and DOWN ARROW to select multiple line of text .",
"I initially gravitated to Aquamacs because of the native OSX spell check and the right-click context menu .",
"The only really useful special feature I am aware of that Aquamacs has which cannot be configured after the build is spellcheck using nsspellchecker .",
"Library Preferences Aquamacs Emacs aquamacs-emacs-starter-kit vendor has the package.el .. . .. . I guess the initialization files are not changed but the package manager reads the .emacs.d elpd to initialize automatically as I see -autoloads.el in each of it .",
"I am trying to write R scripts in aquamacs but whenever I type an underscore as part of a variable name the editor automatically changes this to - .",
"This works very nicely in Aquamacs Emacs org-mode EXCEPT : 1 .",
"Aquamacs has a million things that have been customized by the developer s beyond that of the vanilla build .",
"My advice would be to forget about Aquamacs and use emacsformacosx.com http : emacsformacosx.com and eventually you can build your own .",
"I m getting a Process Oz Emulator exited abnormally with code 139 whilst trying to test a program using Mozart Aquamacs .",
"I m on a Macbook 10.7.5 I have XCode installed I installed Mozart and Aquamacs correctly it seems .",
"I learned a lot figuring out what makes Aquamacs tick but in the end the vanilla version is the way to go .",
"Since my installation of Aquamacs I encountered problems with changing the color themes : .. . .. . 1 .",
"If I type rnorm 100000 and wait for the output the simple cran gui gives the output way faster than aquamacs .",
"I guess my point is that the cran gui seems more responsive aquamacs seems a bit lagged",
"I m using Aquamacs 3.2 GNU Emacs 2.4.4.51.2 .. . .. . Though I have had this same problem with previous versions .",
"Suits my needs much better than the last four versions or so of aquamacs have .",
"When we click right mouse button in Aquamacs it opens its own context menu .",
"Answers http : thread.gmane.org gmane.emacs.macintosh.osx 6538 from the mailing list of Aquamacs http : aquamacs.org support.shtml : .. . .. . 1 .",
"there is a list of Aquamacs-specific settings that can be customized including OS X Key Mode Mouse-3 Behavior .",
"For future users ensure that you put the above line in Library Preferences Aquamacs Emacs Preferences.el or one of the other packages that that file includes .",
"Step 1 Install ESK for Aquamacs http : github.com walter aquamacs-emacs-starter-kit .. . .. . Copy the files to Library Preference Aquamacs Emacs .. . Modify Library Preferences Aquamacs Emacs Preferences.el to add the following .. . .. . Step2 Follow the same step as before to install all the same packages but M-x slime gives me the following error message .",
"In Aquamacs it looks like this : .. . .. . In GNU Emacs for OSX it looks like this : .. . .. . Is there a way to specify these key-bindings in a way that both GNU Emacs and Aquamacs will understand so that I don t have to maintain and update two separate .emacs files every time I add a new key binding",
"Wrote Users greggold Library Preferences Aquamacs Emacs Packages .nosearch Shell : bin bash Loading Users greggold Library Preferences Aquamacs Emacs Recent Files.el source ...done Cleaning up the recentf list...done 0 removed 16 environment-variables imported from login shell bin bash .",
"Here s my config file Preferences.el : .. . .. . I know this has been asked here : .. . .. . Emacs Aquamacs web-mode not automatically activating for HTML files http : stackoverflow.com questions 23682845 emacs-aquamacs-web-mode-not-automatically-activating-for-html-files .. . .. . But there didn t seem to be a concrete answer .",
"I followed the instructions given at https : docwhat.org aquamacs-2-3a-and-marmalade using Aquamacs 3.0 but when installing the ecb-snapshot package I get the following errors : .. . .. . Any help with this would be greatly appreciated ."
]
}
|
{
"confidence": [
51.21692657470703,
49.8880615234375,
49.68762969970703,
49.3681640625,
48.382347106933594,
48.27092361450195,
48.24818420410156,
48.177574157714844,
48.12516784667969,
48.02983856201172,
47.5380973815918,
47.294349670410156,
46.982688903808594,
46.952003479003906,
46.952003479003906,
46.952003479003906,
46.77088165283203,
46.50654602050781,
46.334747314453125,
46.104251861572266
],
"content": [
"Question : I am trying to write R scripts in aquamacs but whenever I type an underscore as part of a variable name the editor automatically changes this to - . One answer is to just stop using the underscore but I m working with some pre-existing R code all of which is rife with underscores in the variable names . How do I stop aquamacs from doing this I m using aquamacs 3.0 and OS X 10.7.5 . Thanks .. . Answer : Another walk-around is to type underscore again in emacs and ESS will switch - to .",
"Question : ECB Emacs Code Browser has context menu to add file delete file etc . The context menu is opened when clicking right mouse button . The problem is Aquamacs intercepts that mouse button event . When we click right mouse button in Aquamacs it opens its own context menu . In the Emacs downloaded from emacsformacosx.com the context menu is opened correctly . How to open ECB context menu in Aquamacs Is there a way to disable Aquamacs default context menu Or is there a way to tell ECB to use other way to open its context menu .. . Answer : Answers http : thread.gmane.org gmane.emacs.macintosh.osx 6538 from the mailing list of Aquamacs http : aquamacs.org support.shtml : .. . .. . 1 . Pretty much all key-bindings in Aquamacs are bound in osx-key-mode-map see Aquamacs FAQ . The mouse button bindings aren t any different . Press C-h k then the right mouse button over an Aquamacs window . This should bring up a help screen that explains that this key is called down-mouse-3 and that it is bound to a function described as this : .. . .. . osx-key-mode-down-mouse-3 EVENT optional PREFIX .. . .. . Activate context menu when osx-key-mode-mouse-3-behavior is set to aquamacs-popup-context-menu or nil .. . .. . Looking up the documentation for this customization variable doesn t bring up anything useful but we can undo the key binding see Aquamacs FAQ probably using define-key : .. . .. . define-key osx-key-mode-map down-mouse-3 nil .. . .. . 2 . There is a second approach in-place to return mouse-3 to its vanilla Emacs behavior : In the Aquamacs help manual section 4.3 Customizing Aquamacs behavior under Want some GNU Emacs 23 behavior back there is a list of Aquamacs-specific settings that can be customized including OS X Key Mode Mouse-3 Behavior . Try customizing that setting as described in the help -- that may allow ECB to behave as in vanilla Emacs .",
"Question : I have a new macbook pro OSX 10.10 and I installed Aquamacs 3.2 GNU Emacs 24.4.51.2 I have used aquamacs on an old machine for over a year with few problems . The installation seemed simple and straightforward basically double click the dmg file and move the icon to Applications . MESSAGES WHILE STARTING UP ACQAMACS : .. . .. . Loading prestart plugin files .. . .. . done . Wrote Users greggold Library Preferences Aquamacs Emacs Packages .nosearch Shell : bin bash Loading Users greggold Library Preferences Aquamacs Emacs Recent Files.el source ...done Cleaning up the recentf list...done 0 removed 16 environment-variables imported from login shell bin bash . Loading Volumes Aquamacs Emacs Aquamacs.app Contents Resources lisp aquamacs edit-modes auctex.el source ...done Loading plugins .. . Loading Volumes Aquamacs Emacs Aquamacs.app Contents Resources lisp aquamacs site-start.el source ...done .. . done . Loading custom-file failed . Loading Users greggold Library Preferences Aquamacs Emacs Preferences.el source ...done Mark set one-buffer-one-frame-mode disabled . Mark set 26 times Loading Users greggold Library Preferences Aquamacs Emacs frame-positions.el source ...done file-error : Opening directory no such file or directory Users greggold Library Logs CrashReporter Mark set 5 times .. . .. . MY USER FILE clump present4.tex WAS THEN LOADED Mark set 3 times Auto-saving...done Auto-saving...done Mark set No connection file var folders q v6d8z7t96x911lskqblhg 680000gn T emacs501 server Automatic display of crossref information was turned on Applying style hooks.. . Loading Volumes Aquamacs Emacs Aquamacs.app Contents Resources lisp aquamacs edit-modes auctex style article.elc...done Loading Volumes Aquamacs Emacs Aquamacs.app Contents Resources lisp aquamacs edit-modes auctex style graphicx.elc...done Loading Volumes Aquamacs Emacs Aquamacs.app Contents Resources lisp aquamacs edit-modes auctex style amssymb.elc...done Loading Volumes Aquamacs Emacs Aquamacs.app Contents Resources lisp aquamacs edit-modes auctex style amsmath.elc...done Loading Volumes Aquamacs Emacs Aquamacs.app Contents Resources lisp aquamacs edit-modes auctex style amstext.elc...done Loading Volumes Aquamacs Emacs Aquamacs.app Contents Resources lisp aquamacs edit-modes auctex style amsbsy.elc...done Loading Volumes Aquamacs Emacs Aquamacs.app Contents Resources lisp aquamacs edit-modes auctex style amsopn.elc...done Loading Volumes Aquamacs Emacs Aquamacs.app Contents Resources lisp aquamacs edit-modes auctex style fancyhdr.elc...done Applying style hooks.. . done is undefined 3 times .. . .. . CLICK ON LATEX compile command Type C L to display results of compilation . LaTeX : problems after 0 pages .. . .. . TeX Output exited abnormally with code 127 at Mon Jan 5 17 : 09 : 56 Running LaTeX on clump present4 with pdflatex --synctex 1 -interaction nonstopmode input clump present4.tex bin sh : pdflatex : command not found TeX Output exited abnormally with code 127 at Mon Jan 5 17 : 09 : 56 I tried to run pdflatex from a terminal but it was not found and locate pdflatex only found a pdf file bash-3.2 locate pdflatex System Library Frameworks Python.framework Versions 2.7 Extras lib python matplotlib tests baseline images test backend pgf pgf pdflatex.pdf bash-3.2 .. . .. . Any advice would be much appeciated .. . Answer : I discovered Aquamacs requires that latex be installed separately if you want the latex button to compile latex is not included in Aquamacs . This was so obvious to almost everyone that the point is not made in the installation instructions or anything I could find . I installed the Mac Tex package and that solved the problem .",
"Question : I have a new macbook pro OSX 10.10 and I installed Aquamacs 3.2 GNU Emacs 24.4.51.2 I have used aquamacs on an old machine for over a year with few problems . The installation seemed simple and straightforward basically double click the dmg file and move the icon to Applications . MESSAGES WHILE STARTING UP ACQAMACS : .. . .. . Loading prestart plugin files .. . .. . done . Wrote Users greggold Library Preferences Aquamacs Emacs Packages .nosearch Shell : bin bash Loading Users greggold Library Preferences Aquamacs Emacs Recent Files.el source ...done Cleaning up the recentf list...done 0 removed 16 environment-variables imported from login shell bin bash . Loading Volumes Aquamacs Emacs Aquamacs.app Contents Resources lisp aquamacs edit-modes auctex.el source ...done Loading plugins .. . Loading Volumes Aquamacs Emacs Aquamacs.app Contents Resources lisp aquamacs site-start.el source ...done .. . done . Loading custom-file failed . Loading Users greggold Library Preferences Aquamacs Emacs Preferences.el source ...done Mark set one-buffer-one-frame-mode disabled . Mark set 26 times Loading Users greggold Library Preferences Aquamacs Emacs frame-positions.el source ...done file-error : Opening directory no such file or directory Users greggold Library Logs CrashReporter Mark set 5 times .. . .. . MY USER FILE clump present4.tex WAS THEN LOADED Mark set 3 times Auto-saving...done Auto-saving...done Mark set No connection file var folders q v6d8z7t96x911lskqblhg 680000gn T emacs501 server Automatic display of crossref information was turned on Applying style hooks.. . Loading Volumes Aquamacs Emacs Aquamacs.app Contents Resources lisp aquamacs edit-modes auctex style article.elc...done Loading Volumes Aquamacs Emacs Aquamacs.app Contents Resources lisp aquamacs edit-modes auctex style graphicx.elc...done Loading Volumes Aquamacs Emacs Aquamacs.app Contents Resources lisp aquamacs edit-modes auctex style amssymb.elc...done Loading Volumes Aquamacs Emacs Aquamacs.app Contents Resources lisp aquamacs edit-modes auctex style amsmath.elc...done Loading Volumes Aquamacs Emacs Aquamacs.app Contents Resources lisp aquamacs edit-modes auctex style amstext.elc...done Loading Volumes Aquamacs Emacs Aquamacs.app Contents Resources lisp aquamacs edit-modes auctex style amsbsy.elc...done Loading Volumes Aquamacs Emacs Aquamacs.app Contents Resources lisp aquamacs edit-modes auctex style amsopn.elc...done Loading Volumes Aquamacs Emacs Aquamacs.app Contents Resources lisp aquamacs edit-modes auctex style fancyhdr.elc...done Applying style hooks.. . done is undefined 3 times .. . .. . CLICK ON LATEX compile command Type C L to display results of compilation . LaTeX : problems after 0 pages .. . .. . TeX Output exited abnormally with code 127 at Mon Jan 5 17 : 09 : 56 Running LaTeX on clump present4 with pdflatex --synctex 1 -interaction nonstopmode input clump present4.tex bin sh : pdflatex : command not found TeX Output exited abnormally with code 127 at Mon Jan 5 17 : 09 : 56 I tried to run pdflatex from a terminal but it was not found and locate pdflatex only found a pdf file bash-3.2 locate pdflatex System Library Frameworks Python.framework Versions 2.7 Extras lib python matplotlib tests baseline images test backend pgf pgf pdflatex.pdf bash-3.2 .. . .. . Any advice would be much appeciated .. . Answer : I am using this on yosemite and am not having any problems . I would suggest that you go to the aquamacs.org site go into the developers area . There was a problem unrelated to what you are showing with yosemite and the developer there was very helpful in fixing it . I would email him he probably can from your info tell you what is going on . Before doing that try the development version that is on that page just in case that fixes it for you . That is the one I ended up using and I don t know if they have forced it back into the main download yet . Also they have all the old email listing of problems that you may want to troll through . I use it for latex and find it is excellent . Particularly when teamed with skim . Good luck .",
"Question : I am not sure if this is a bug in Aquamacs GNU Emacs 23.4.1 or what but it seems I can t something very simple : bring the cursor somewhere in the text by click then press SHIFT and DOWN ARROW to select multiple line of text . It just Aquamacs won t keep the selection starting where I placed the cursor but break it as new text appears in the window . .. . Answer : I had the similar issue with Macports Emacs . Maybe the following solution could be of help . It was because of a custom macro assigned to Shift-Down . It used to work perfectly on Linux but not on Mac . Though when I restored default settings for Shift Down it worked out perfectly . To check if there is a custom macro assigned use a-x describe-key enter and press Shift Down . Make sure that there is the following response : .. . .. . If there is a different response it could be a custom macro assigned with global-set-key kbd S- down somewhere in configs - and it should to be removed .",
"Question : null .. . Answer : Hi there and season s greetings As a total non-programmer I need help on how to prepare my Macbook Air OS X 10.10.5 for installation of Aquamacs . I have been running Spacemacs which uses its own .spacemacs initialization file but I am concerned that my lack of knowledge of what where other Emacs files folders exist on my machine could mean trouble when I install Aquamacs . Does anyone have any suggestions for me Many thanks Chris . Comment : Unless you cannot live without the OSX native spellchecker you should do yourself a favor and forget about using Aquamacs -- there is really no other reason to use Aquamacs in my opinion . Use this instead : emacsformacosx.com http : emacsformacosx.com Other people will tell you to try homebrew or macports but only the one I just mentioned will put everything in the Emacs.app bundle . Both homebrew and macports will install the guts in other areas of the computer which just makes life a pain in the neck -- especially if you want to synchronize everything across multiple computers and backing up as well Comment : Hi lawlist thanks for your quick reply . I assume that because emacsformacosx puts everything in the Emacs.app bundle there is no need to worry about conflicts with Spacemacs - which I can keep and run also Comment : I installed emacsformacosx but running the app gives the same Spacemacs Emacs as I was already running . I m sorry for my ignorance but I guess there must be an initialization file somewhere that points Emacs to the .spacemacs file . I do like Evil anyway . Comment : Sticking with spacemacs for now . Thanks . Comment : Spacemacs is just a bunch of elisp user customizations and additional third-party libraries designed for the generic build of Emacs -- i.e . it is nothing special because it doesn t really alter the Emacs build . I seriously doubt that anyone spent significant time making sure that Spacemacs plays nice with Aquamacs but I could be wrong Aquamacs is a bunch of C-Source modifications and customizations by the developer and on top of that a whole bunch of additional elisp modifications and customizations by the developer plus some additional third-party libraries .",
"Question : I am trying to write R scripts in aquamacs but whenever I type an underscore as part of a variable name the editor automatically changes this to - . One answer is to just stop using the underscore but I m working with some pre-existing R code all of which is rife with underscores in the variable names . How do I stop aquamacs from doing this I m using aquamacs 3.0 and OS X 10.7.5 . Thanks .. . Answer : Use M-x ess-toggle-underscore to unset this ESS default : .. . .. . You can set unset this in your .emacs as well . That being said underscores are evil in variable names . Don t believe a word Hadley says in the matter -- it is camelCase all the way . Comment : I prefer periods in variable.names to camelCase . Comment : periods in variable names should be reserved for S3 method names",
"Question : I m getting a Process Oz Emulator exited abnormally with code 139 whilst trying to test a program using Mozart Aquamacs . From looking at some of the other posts it looks as though the 139 error is a general error-code . Code someone point me in the right direction as what to look for or do I m on a Macbook 10.7.5 I have XCode installed I installed Mozart and Aquamacs correctly it seems . I ve tried running some simple lines-of-code with Feed Region ex : .. . .. . but no luck just the code error . Thanks in advance . I didn t know which section to post this in as after looking at all the other posts it looks like a general error not Aquamacs specific .. . Answer : You are getting this error because you are using Mozart 2 which is only supported on OS 10.8 10.9 . For 10.7 use Mozart 1.4 . Now if you have installed Aquamacs3 Mozart will not be able to find Aquamacs . That s because the Aquamacs has changed the directory names a bit . To solve that problem open up Terminal and type in the following commands : .. . .. . ln -s Applications Aquamacs.app Applications Aquamacs Emacs.app ln -s Applications Aquamacs.app Contents MacOS Aquamacs Applications Aquamacs.app Contents MacOS Aquamacs Emacs .. . .. . This of course assumes that you have put Aquamacs in applications . If not change directories in the commands above accordingly . Hope this helps . Comment : Hi thanks . In fact I tried all that a while ago and it didn t help . In the end I just downgraded to the 1.4.0 version....which works like a treat . Thanks for the suggestion anyhow .",
"Question : I happen to have two emacs on my Mac because of clojure setup http : stackoverflow.com questions 3261714 emacs-cocoa-emacs-vs-aquamacs-for-running-clojure-on-mac-os-x . The problem is that Cocoa emacs and Aquamacs uses the same .emacs.d but the ELPA of Cocoa emacs and that of Aquamacs are not compatible so that some files are overwritten and not usable for both of them . Is there any way to tell Aquamacs not to use .emacs.d for ELPA I mean can I change the default ELPA directory other than .emacs.d I use Aquamacs Starter Kt http : github.com walter aquamacs-emacs-starter-kit but it seems that the .emacs directory is used in init.el . .. . Answer : I am not familiar with ELPA but if aquamacs and carbon emacs are using different copies of package.el you could try changing the definition of package-user-dir in one of them . In general I have found that using two different emacses on one machine is a recipe for baldness .",
"Question : I m on GNU Emacs in OSX Mavericks and I m trying to make my background transparent but not the text . There s an easy way to make the whole frame transparent : .. . .. . But this makes the whole frame transparent translucent including the text . I want only the frame background to be transparent and the text to be a solid black . Someone on the Emacs Wiki said that such an implementation would have to be OS-specific . So does anyone know how to do this for OSX With desired settings Emacs would look like this : .. . truly transparent Emacs window http : i.imgur.com V2Ugpc5.png . Again I want the window 100 transparent and the foreground text 100 opaque and it should work in Emacs full-screen mode . Comment : An alternative is if you re willing using emacs from the Terminal you can create a new shell profile under preferences and set opacity to 0 and blur to 0 . .. . Answer : The following are a few screen-shots and the different .emacs settings that were used . I m using Emacs Trunk built --with-ns on February 16 2014 and the operating-system is OSX Snow Leopard 10.6.8 . .. . .. . SETTING 1 : .. . .. . Example http : www.lawlist.com images semi transparent a.png .. . .. . .. . .. . SETTING 2 : .. . .. . Example http : www.lawlist.com images semi transparent c.png .. . .. . .. . .. . SETTING 3 : .. . .. . Example http : www.lawlist.com images semi transparent d.png .. . .. . .. . .. . SETTING 4 : .. . .. . Example http : www.lawlist.com images semi transparent b.png .. . .. . .. . .. . EDIT February 24 2014 : The following is a link-to a related thread where the lead developer of Aquamacs i.e . David Reitter has suggested modifying nsterm.m as a potential solution : http : comments.gmane.org gmane.emacs.aquamacs.devel 836 -- At a minimum the changes would be to ns clear frame and ns clear frame area . Instead of filling the background with the background-color you could try setting the alpha component of the NSColor object so that it is transparent copying in the actual background of the window . So then you d have the frame background transparent . That doesn t take care of the frame UI elements . . . In other words the potential solution would likely entail modifying the source code prior to building a custom version of Emacs . Comment : Aquamacs has a million things that have been customized by the developer s beyond that of the vanilla build . I m sure you can track down the setting that is causing your issues but it may be time consuming . My advice would be to forget about Aquamacs and use emacsformacosx.com http : emacsformacosx.com and eventually you can build your own . I initially gravitated to Aquamacs because of the native OSX spell check and the right-click context menu . In the end I opted for Aspell and a vanilla Emacs build and I created my own right-click context menu . Comment : If you use a .emacs file containing only the two lines-of-code in your question and the code in my answer then it works with a current version of Emacs trunk built --with-ns on OSX Snow Leopard 10.6.8 . So my best guess is that you have something else in your configuration-files that is conflicting . Try it with just the code in your question and my answer with nothing else in the init file and see if it works . Comment : The builds from that website are made with the ns option so you just need to decide upon the last stable release or a developer build with a sneak preview of what is to come . The latest developer snapshot build will have many good bug fixes but may have new issues not yet known . The latest build of Emacs Trunk does have full-screen . Comment : Your picture certainly does help me understand what you are seeking -- thank you . Comment : Emacs and Aquamacs both use nsterm.m so the proposed modification could be to either version . However the code is written in C and is thus far beyond my present level of minimal coding knowledge . If you download the source code for either Emacs or Aquamacs and take a peek inside nsterm.m you ll see what I mean . Aquamacs makes some additional custom changes to nsterm.m e.g . for the native OSX spell checker : github.com davidswelt aquamacs-emacs blob aquamacs24 src https : github.com davidswelt aquamacs-emacs blob aquamacs24 src nsterm.m",
"Question : I ve been trying for a bit to disable the tabbar mode in aquamacs : when I open a new file from one buffer I d like the file to open in the current buffer instead of opening the file in a new tab . I ve tried turning tabbar-mode off in my init.el file as follows : .. . .. . but it doesn t seem to have any effect . Does anyone know if disabling tabbed buffers in aquamacs is possible Please let me know . Thanks . .. . Answer : does actually work . I had been editing the wrong file and that is why it wasn t taking effect . For future users ensure that you put the above line in Library Preferences Aquamacs Emacs Preferences.el or one of the other packages that that file includes .",
"Question : null .. . Answer : Aquamacs on mac spawns too many GTAGS process whenever I do a find tags like 5 or 6 more I have to kill them manually . I tried the nightly-build Aquamacs 3.3 same . Any idea how to fix this the normal emacs build doesn t have this problem it does spawn GTAGS too but up to two . thanks patrick",
"Question : I use Aquamacs and I use ELPA that installs files in .emacs.d elpa What s the magic behind this ELPA I mean without ELPA I should download and install the packages in a specific directory and add those two lines in .emacs . add-to-list load-path PACKAGE DIRECTORY .. . require PACKAGE .. . .. . But with ELPA I don t see anything added to .emacs or Users smcho Library Preferences Aquamacs Emacs Preferences.el customizations.el . How is this possible Added .. . .. . This is what I found with Aquamacs . 1 . Aquamacs reads Preference Aquamacs Emacs Preference and it has add-to-list load-path kitfiles-dir require init which reads start kit . 2 . The init.el of start kit has the require package package-initialize .. . 3 . Library Preferences Aquamacs Emacs aquamacs-emacs-starter-kit vendor has the package.el .. . .. . I guess the initialization files are not changed but the package manager reads the .emacs.d elpd to initialize automatically as I see -autoloads.el in each of it . Added2 .. . .. . With emacs 24 it seems that package is pre-built . I need only to have these lines in .emacs or .emacs.d init.el to get ELPA working . Hints from this site http : www.kedrovsky.com blog clojure-emacs-nrepl-and-leiningen . .. . Answer : You have a require package package-initialize pair somewhere in your initialization files . Package.el does the magic :",
"Question : I use both GNU Emacs for OSX and Aquamacs . I like to define key-bindings that utilize the Mac command key . Unfortunately the syntax for specifying the key is different for each . In Aquamacs it looks like this : .. . .. . In GNU Emacs for OSX it looks like this : .. . .. . Is there a way to specify these key-bindings in a way that both GNU Emacs and Aquamacs will understand so that I don t have to maintain and update two separate .emacs files every time I add a new key binding Comment : I don t use Aquamacs but I believe the Mac command key is the meta key skim this tutorial http : ergoemacs.org emacs keyboard shortcuts.html . It seems like you should just be able to global-set-key kbd M-h replace-string . Comment : No they are two separate keys . You re thinking of the option key . .. . Answer : Based on lawlist suggestion you could even define a function to do it : Comment : Whoa that is awesome",
"Question : null .. . Answer : I have the simple cran R gui and aquamacs with ESS installed on a mac . If I type rnorm 100000 and wait for the output the simple cran gui gives the output way faster than aquamacs . Is this normal everything seems to be taking more time in aquamacs . Comment : How much is the difference is it reproducible and how does it change if you repeat a 100 times after each other This would interesting to add to your question . Comment : the difference is in terms of printing the output not the computation . I guess my point is that the cran gui seems more responsive aquamacs seems a bit lagged Comment : Printing 100000 numbers to the screen is always going to be slow and can differ heavily depending on the means how they are put on the screen . I can imagine piping the output of R to emacs makes things a bit slower for these large amount of numbers .",
"Question : I can t seem to get the configuration to work properly only if I create a new HTML it goes into web-mode any other way it goes into de default html-mode . I m using Aquamacs 3.2 GNU Emacs 2.4.4.51.2 .. . .. . Though I have had this same problem with previous versions . Here s my config file Preferences.el : .. . .. . I know this has been asked here : .. . .. . Emacs Aquamacs web-mode not automatically activating for HTML files http : stackoverflow.com questions 23682845 emacs-aquamacs-web-mode-not-automatically-activating-for-html-files .. . .. . But there didn t seem to be a concrete answer . Could anyone may point me to what I m doing wrong .. . Answer : Have you tried to put those lines at the end of your .emacs Comment : That didn t work either . Comment : Have you asked on the aquamacs mailing list Perhaps there is a harcoded setting in their default conf .",
"Question : When I click a file in a directory buffer I would like it to open in a new tab instead of splitting the current tab . Note that Options- Show Tabs is selected . Using version .. . .. . Aquamacs 3.0preview4 GNU Emacs 24.3.50.2 x86 64-apple-darwin13.0.0 NS apple-appkit-1265.00 of 2013-12-31 Aquamacs-3.0preview3-32-gc3bb9a0-dirty on watson.local Comment : Is your directory buffer a dired-mode buffer Also which version of Aquamacs do you have Comment : yes it says Dired by name . .. . Answer : Aquamacs has a million things that are customized based upon the developer s decisions and I haven t spent time with Aquamacs for several months now . Here is something that works with a generic version of Emacs -- the key binding is Control+c f .. . .. . If it doesn t work for you let me know what s happening and I ll see if I can figure it out . EDIT January 6 2014 : First working draft . EDIT January 13 2014 : Added the missing portion of the code relating to the variable path .",
"Question : null .. . Answer : Maverick appears to crash my Macbook pro coming out of sleep . It recently crashed and after verifying the disks and startup again Aquamacs no longer would run in one of my accounts . I have 2 different admin accounts on my Mac . In one account Aquamacs runs just fine . In the other account even after removing from Applications and running from the .app in a newly downloaded .dmg file Aquamacs continues to crash . I probably need to delete some file somewhere but I don t know where . I looked in Library Application Support CrashReporter and found old non aquamacs files which I removed . I temporarily moved SubmitDiagInfo.domains and DiagnosticMessagesHistory.plist to no effect . The sequence goes like this : .. . .. . Problem Report for Auaqmacs window : .. . .. . Aquamacs quit unexpectedly .. . .. . Click Reopen to open the application again . This report will be sent to Apple automatically . Problem Details and System Configuration : .. . .. . Regardless of clicking OK or Reopen Aquamacs will fail again . I click OK . I click Applications Aquamacs.app and get pop-up : .. . .. . I click Don t Reopen although same thing happens if click Reopen : .. . .. . Using QuickTime NewScreenRecording I can see that an empty Aquamacs window opens for 1 second before the Problem report for Aquamacs occurs again . And so the cycle continues . I don t believe this is an Aquamacs problem as I have re-installed and it runs fine in the other account on the same Mac . I believe this is some Maverick problem either due to crash reporting or some other file issue . Any help of suggestions would be much appreciated . Comment : actually most app are like that right now i have problems with transmit google-chrome safari and mail .. . : S",
"Question : null .. . Answer : When opening a file with C-x C-f in Aquamacs if I enter the pathname of an alias the new buffer that appears is filled with gibberish I guess this is the contents of the alias itself . What can I do to open the target of the alias instead To put it another way I d like Aquamacs to behave the same when I C-x C-f an existing pathname as when I double-click on an Aquamacs-associated file icon in the Finder . A method of opening aliased and non-aliased files by the same means would be best .",
"Question : After I updated Aquamacs using Alt-q in the Auto-Fill minor mode to fill paragraphs when editing a LaTeX document results in each line being broken at the first occurrence of the LaTeX maths closing delimiter . Well almost See the example below for the one exception . Version information : Aquamacs 3.2 GNU Emacs 24.4.51.2 . Question .. . .. . How do I tell Aquamacs Emacs Auto-Fill mode not to break lines at the first that it sees on a line but to actually fill in the paragraph as it used to do before the update Steps to reproduce this behaviour .. . .. . 1 . Help - Diagnose and report bug - Start Aquamacs without customizations to get a pristine Aquamacs window . 2 . Open a file named testemacs.tex and paste the Lorem Ipsum text twice to make two paragraphs . 3 . Add small maths expressions delimited by the LaTeX delimiters and at random places in the second paragraph . Leave the first paragraph as it is . 4 . Type Alt-x auto-fill-mode to enable Auto-Fill mode . 5 . Go to each paragraph and type Alt-q to invoke the fill-paragraph function . 6 . Observe the difference See the screenshot below : .. . .. . Image showing line-breaks at maths delimiters http : i.stack.imgur.com 0uqLT.png .. . .. . As you can see everywhere except on the very last line fill-paragraph breaks the line at the first closing delimiter that it sees . This makes the paragraph look really ugly and defeats the whole purpose of filling-in paragraphs . How can I get rid of this behaviour Modes .. . .. . Please see the screenshot below for the modes in operation : .. . .. . Modes information http : i.stack.imgur.com pOHPI.png .. . Answer : I will also note that Aquamacs is broken : it overwrites the default fill-paragraph which takes no arguments in GNU Emacs with a function from fill-adapt which takes one argument . This breaks all packages that use fill-paragraph essentially ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
emacs
|
UNK_RELATION
|
snmp-extension@php@53
|
snmp-extension -- relates to the snmp-extension for @placeholder which provides a very simple and easily usable toolset for managing remote devices via the simple network management protocol .
|
{
"confidence": [
49.002811431884766,
47.03101348876953,
42.520755767822266,
41.709442138671875,
39.052703857421875,
38.29108810424805,
34.90629577636719,
33.68398666381836,
32.27824401855469,
30.888099670410156,
28.738269805908203,
28.738269805908203,
28.738269805908203,
28.738269805908203,
24.145130157470703,
11.916926383972168,
11.916926383972168,
11.916926383972168,
11.916926383972168,
11.916926383972168,
11.916926383972168,
11.916926383972168,
11.916926383972168,
11.916926383972168,
11.916926383972168,
11.916926383972168,
11.916926383972168,
11.916926383972168,
11.916926383972168,
11.916926383972168,
11.916926383972168,
11.916926383972168,
11.916926383972168,
11.916926383972168,
11.916926383972168,
11.916926383972168
],
"content": [
"If you remove them SNMP extension works fine .",
"I followed this link http : www.codeproject.com Articles 9024 How-to-develop-a-SNMP-extension-agent-DLL and got the Snmp extension agent working as expected .",
"Apparently the SNMP extension agents that you refer to can only be developed in managed code see here : stackoverflow.com questions 5057785 http : stackoverflow.com questions 5057785 looking-for-an-net-snmp-extension-agent",
"I am trying to implement Snmp extension agent which would send custom information for OIDs defined by me .",
"I followed this link http : www.codeproject.com Articles 9025 How-to-install-SNMP-extension-agent-DLL to deploy the dll .",
"What s the snmp provider",
"I am new to C++ VC++ and SNMP .",
"I m using SNMP agent and server but executing snmp agent snmpwalk or snmpget on centos ubuntu system occurs that failure Bad operator DEFINITIONS :",
"Why is the snmp service not picking up c++-cli dll",
"Confirm if it a problem with your manager-side SNMP installation rather than agent-side by walking a host on the internet as described at http : stackoverflow.com a 31615975 449347 .. . .. . If that fails maybe try reinstall your net-snmp .",
"I just upgraded to php 5.6.10 hoping that snmp problem would be fixed but its not .",
"Basically in c : usr snmp persist mib indexes directory I found two files named 0 and 1 .",
"I compiled the application in C++ cli and deployed the dll but Snmp service stopped picking up my dll .",
"After reverting to native c++ dll snmp service started picking up the dll .",
"I actually just found a comment in here http : put.hk article news.php.net php.bugs 187845 Bug-68001-Fbk-Nab-php-crashes-with-enabled-php-snmp-dll.html that helped me solve the issue .",
"I was using php-5.4 fine with its php snmp.dll enabled but as soon as I upgraded to php 5.6.7 I cannot use php snmp.dll anymore .",
"If I comment out that line in php.ini php does not crash and my apache 2.4 webserver starts and runs fine .",
"Does anyone have this issue with above mentioned php versions",
"version of windows",
"windows-8 or 8.1",
"Please add full command error message",
"pastebin.com SPQDfBWt http : pastebin.com SPQDfBWt",
"better to edit your question to include the extra info rather than to add it as a comment and or link .",
"The application in the link is developed in native C++ .",
"I would like to have the dll developed in VC++ C .",
"What am I missing",
"You should provide more information as based on your question it s impossible to tell what s your problem .",
"Do you see any logs",
"Is your program working locally",
"And so on .",
"How did you deploy the dll",
"What location is it deployed relative to the process",
"If you revert to the older version is it picked up again",
"I am on Windows 7 .",
"@TonPlooij : I guess you meant unmanaged code .",
"I am trying to understand why can it not be done in managed code as both native C++ and C++ cli have same target CPU and same dll exports ."
]
}
|
{
"confidence": [
56.240291595458984,
49.506839752197266,
41.715492248535156
],
"content": [
"Question : null .. . Answer : I am new to C++ VC++ and SNMP . I am trying to implement Snmp extension agent which would send custom information for OIDs defined by me . I followed this link http : www.codeproject.com Articles 9024 How-to-develop-a-SNMP-extension-agent-DLL and got the Snmp extension agent working as expected . The application in the link is developed in native C++ . I would like to have the dll developed in VC++ C . I compiled the application in C++ cli and deployed the dll but Snmp service stopped picking up my dll . What am I missing Comment : You should provide more information as based on your question it s impossible to tell what s your problem . What s the snmp provider Do you see any logs Is your program working locally And so on . Comment : How did you deploy the dll What location is it deployed relative to the process If you revert to the older version is it picked up again Comment : I followed this link http : www.codeproject.com Articles 9025 How-to-install-SNMP-extension-agent-DLL to deploy the dll . I am on Windows 7 . After reverting to native c++ dll snmp service started picking up the dll . Comment : Apparently the SNMP extension agents that you refer to can only be developed in managed code see here : stackoverflow.com questions 5057785 http : stackoverflow.com questions 5057785 looking-for-an-net-snmp-extension-agent Comment : @TonPlooij : I guess you meant unmanaged code . I am trying to understand why can it not be done in managed code as both native C++ and C++ cli have same target CPU and same dll exports . Why is the snmp service not picking up c++-cli dll",
"Question : I was using php-5.4 fine with its php snmp.dll enabled but as soon as I upgraded to php 5.6.7 I cannot use php snmp.dll anymore . I just upgraded to php 5.6.10 hoping that snmp problem would be fixed but its not . If I comment out that line in php.ini php does not crash and my apache 2.4 webserver starts and runs fine . Does anyone have this issue with above mentioned php versions Comment : version of windows Comment : windows-8 or 8.1 .. . Answer : I actually just found a comment in here http : put.hk article news.php.net php.bugs 187845 Bug-68001-Fbk-Nab-php-crashes-with-enabled-php-snmp-dll.html that helped me solve the issue . Basically in c : usr snmp persist mib indexes directory I found two files named 0 and 1 . If you remove them SNMP extension works fine .",
"Question : I m using SNMP agent and server but executing snmp agent snmpwalk or snmpget on centos ubuntu system occurs that failure Bad operator DEFINITIONS : Comment : Please add full command error message Comment : pastebin.com SPQDfBWt http : pastebin.com SPQDfBWt Comment : better to edit your question to include the extra info rather than to add it as a comment and or link . .. . Answer : Confirm if it a problem with your manager-side SNMP installation rather than agent-side by walking a host on the internet as described at http : stackoverflow.com a 31615975 449347 .. . .. . If that fails maybe try reinstall your net-snmp ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
php
|
UNK_RELATION
|
xcodeproj@s@104
|
xcodeproj -- xcodeproj is a ruby gem from the makers of cocoapods that allows scripted access to xcode @placeholder project file .
|
{
"confidence": [
60.289615631103516,
59.28298568725586,
46.11783218383789,
44.99609375,
44.43619918823242,
44.2205810546875,
42.3017578125,
39.54048156738281,
37.8712043762207,
36.31500244140625,
34.89905548095703,
32.349090576171875,
32.349090576171875,
30.67574691772461,
29.43134307861328,
29.083343505859375,
28.89134979248047,
27.103002548217773,
24.740234375,
24.196413040161133,
23.582538604736328,
23.169788360595703,
22.65414810180664,
22.456867218017578,
21.99060821533203,
21.821184158325195,
21.583011627197266,
21.258968353271484,
21.129728317260742,
20.97639274597168,
20.430126190185547,
20.134693145751953,
19.808019638061523,
19.673288345336914,
19.36051368713379,
18.78110122680664,
18.740495681762695,
18.658586502075195,
18.34180450439453,
18.33867645263672,
17.938236236572266,
17.938236236572266,
17.74675178527832,
17.672794342041016,
17.320980072021484,
16.67633056640625,
16.611099243164062,
16.45466423034668,
16.06089973449707,
15.905224800109863,
15.73037052154541,
15.136967658996582,
15.136967658996582,
15.136967658996582,
15.136967658996582,
15.136967658996582,
15.136967658996582,
15.136967658996582,
15.136967658996582,
15.136967658996582,
15.136967658996582,
15.136967658996582,
15.136967658996582,
15.136967658996582,
15.136967658996582,
15.136967658996582,
15.136967658996582,
14.804348945617676,
14.804348945617676,
13.536914825439453,
13.516901969909668,
13.136473655700684,
13.136473655700684,
13.136473655700684,
13.136473655700684,
13.136473655700684,
13.136473655700684,
13.136473655700684,
13.136473655700684,
13.136473655700684,
13.136473655700684,
13.136473655700684,
13.136473655700684,
13.136473655700684,
13.136473655700684,
13.136473655700684,
13.136473655700684,
13.136473655700684,
13.136473655700684,
13.136473655700684,
13.136473655700684,
13.136473655700684,
13.136473655700684,
13.136473655700684,
13.136473655700684,
13.136473655700684,
13.136473655700684,
13.136473655700684,
13.136473655700684,
11.809335708618164
],
"content": [
"I am trying to create a new iPhone build target pragmatically with the Ruby gem Xcodeproj https : github.com CocoaPods Xcodeproj .",
"I have been playing around with the Xcodeproj https : github.com CocoaPods Xcodeproj gem to try and perform this task but I am not able to find the PBXNativeTarget or adding a PBXShellScriptBuildPhase when reading my project file with the xcodeproj gem .",
"I m currently struggling with Xcodeproj http : www.rubydoc.info gems xcodeproj index to be able to add some libraries and change a few details in my Xcode project .",
"enter image description here http : i.stack.imgur.com ECdUk.png .. . .. . What I have tried : .. . .. . Using xcodeproj https : github.com CocoaPods Xcodeproj .",
"http : www.rubydoc.info gems xcodeproj Xcodeproj Project new target-instance method I am a bit confused by the optional variable product group .",
"You can use Xcodeproj : : XCScheme.shared data dir project path .. . .. . Agreed we could have a better way to create an Xcodeproj : : XCScheme instead directly from the Xcodeproj : : Project instance to make this easier .. . .. . So something like this should work :",
"From what I can make out I need to iterate through each of the project s targets then iterate through the files http : www.rubydoc.info gems xcodeproj Xcodeproj Project Object AbstractBuildPhase files-instance method or files references http : www.rubydoc.info gems xcodeproj Xcodeproj Project Object AbstractBuildPhase files references-instance method of that target s source build phase http : www.rubydoc.info gems xcodeproj Xcodeproj Project Object PBXNativeTarget source build phase-instance method looking for the PBXFileReference I already have .",
"I can find the files based on the absolute path and remove them from the project using the remove from project http : www.rubydoc.info gems xcodeproj Xcodeproj Project Object PBXFileReference remove from project-instance method method of PBXFileReference .",
"Between my lack of Ruby knowlege and the poor documentation with Xcodeproj am facing some issues .",
"Usually you only have one xcodeproj but you re indeed allowed to specify the xcodeproj directly in your target do blocks to indicate a specific Xcode project the target belongs-to and thus integrate your pods in targets of different projects .",
"enter image description here http : i.stack.imgur.com xrYZV.png .. . .. . I know I need to also remove the file from the target s but there seems to be no easy link between a PBXFileReference and a target PBXNativeTarget http : www.rubydoc.info gems xcodeproj Xcodeproj Project Object PBXNativeTarget .",
"If this is possible with xcodeproj this would be the ideal solution as I am already using it to create the target .",
"After giving xcodeproj a second chance I was able to modify the build settings of the target .",
"Looking through the spec repo I only find one public spec that seems to have done this as a xcodeproj script in the past but no longer does : https : github.com CocoaPods Specs blob e187366577d112519af7c75d5eb35c583759103e Specs DevMateKit 1.1 DevMateKit.podspec.json .. . .. . Is there a supported way to do this",
"Could anyone give me some guidance to successfully detect and add a shell script build phase using xcodeproj",
"I m attempting to write a Ruby script that will delete certain files from the Xcode project .",
"CocoaPods installer calls write pod project method right after run podfile post install hooks during Generating Pods project step https : github.com CocoaPods CocoaPods blob master lib cocoapods installer.rb L166 and there is recreate user schemes call https : github.com CocoaPods CocoaPods blob master lib cocoapods installer.rb L693 inside .",
"Ok I found some interesting examples on gist https : gist.github.com search utf8 E2 9C 93 q xcodeproj .. . .. . Here s a relevant one works perfectly :",
"As far as I know you won t be able to access them from XCode .",
"https : github.com CocoaPods CocoaPods issues 4203 .. . .. . I wrote script to remove it .. . .. . I can run this script after pod install manually but I want to add it to Podfile somehow .",
"I m pretty new to Ruby and usually only use Xcode to compile my projects so here s where I am currently trying to add CoreTelephony.framework so it appears in link-to binary with libraries if i open the project in Xcode.. . .. . .. . .. . and it doesn t work of course .",
"I want to fix Cocoapods bug when it adds Embed Pods Frameworks build phase for Extension targets .",
"system : mac osx 10.11.2 xcode 7.2 .. . .. . i want to write a program or a shell script to remove add an existing xxx.framework not imported from apple s libraries from my project .",
"Here is my code : .. . .. . When I run this code a new scheme is made in the XCode project .",
"You can then edit it from XCode .",
"I m running ruby script manually after pod install .",
"I used this approach to create the target using a Ruby script but I have not seen an easy way to set the plist file .",
"To reference your app project instead you might use something like that : .. . .. . If you really wanted to modify a scheme included in the Pods project that scheme is probably not named BonMot which I believe is the name of your App except if that s the name of a framework brought as a Development Pod in your workspace via CocoaPods .",
"I want to configure my Xcode project to have different PRODUCT NAME per Configuration .",
"I m looking for a way to get cocoapods to copy my xpc service into the compiled binary in the proper directory like how it adds a copy resources phase to place them in the bundle .",
"For example in xCode I think most of code is stay in main.jsbundle file .",
".. . .. . Full explanation : .. . .. . That s because even if in practice I ve never seen it used anywhere CocoaPods allow you to integrate pods in multiple user projects at once .",
"In essence I would like to do the following but without the XCode GUI : .. . .. .",
"The long answer : .. . From the output of pod install --verbose the build phase Embed Pods Frameworks is added in the Integrating client project which runs after the post install step in the Podfile .",
"Your BonMot.xcscheme scheme is probably in your app project not your pods project .",
"Could this code be corrupting the iOS project",
"@the.evangelist no : and no news from github issue .",
"I m new to Ruby so I m sure I have many bad non-idiomatic habits .",
"I have to revert the project to get them back .",
"Right now I am creating a Unity plugin for iOS and I need to check and add a Shell Script Build Phase after the Xcode project is generated .",
"In a quest to automate the iOS app generation process I am trying to set change the settings of a build target in an automated fashion outside of XCode .",
"After creating a new target app target a build setting for a target can be set as follows : .. . .. . This ended up resolving the issue and the changes are reflected within XCode .",
"You are using the installer.pods project which is the Pods.xcodeproj project I believe .",
"I m writing a post install script in my Podfile in order to enable gathering of code-coverage reports from my framework when I run the unit tests in the example project .",
"This looks like it modifies the properties of an existing plist file but I do not see where it sets the plist file for the target .",
"The code-coverage option is not being written back to the BonMot.xcscheme file .",
"For example : .. . .. . 1.- myApp-Debug.app Debug Configuration 2.- myApp-Beta.app Beta Configuration .. . .. . How can attached or link the PRODUCT NAME to the configuration in Xcode",
"Then as in practice we usually 99.9 of the time have only one app project we can get the first and only entry in that list .",
"Specifically I would like to set the Info.plist file for a target using a command or some other programatic approach .",
"So this line will ask each Pod s aggregate target pod targets that aggregate pods for a specific app target s which user project it belongs-to and then we remove duplicates on that list of user projects .",
"The Unity Xcode API http : docs.unity3d.com ScriptReference iOS.Xcode.PBXProject.html while useful does not provide a way to add the shell script .",
"These phases are not needed there .",
"It doesn t work in post install hook .. . .. . because UserProjectIntegrator.integrate is called after post install and it overrides my changes .",
"Is there any way to integrate this script in Podfile",
"It will be a nice idea to add this to the podfile .",
"Any success on this",
"The short answer is No .",
"This is why you should execute this script separately after the pod install finished running .",
"I know this is a rather trivial question but I seem to be having the worst time with this .",
"I ve tried : .. . .. . But the UUID is 0 and nothing is added to the Build Phases .",
"Can someone please help me .",
"I know the rest of my setup is correct .",
"Hi do you find out how to do this now",
"Yes you need to use new copy files build phase to create the new build phase .",
"This is for a private pod for our companies internal use .",
"We currently use static-libraries but if necessary we can transition to frameworks .",
"Is this the recommended way to proceed or was it abandoned for good reason",
"Here s what I ve got : .. . .. . When I print out the scheme I can confirm that code-coverage gathering is enabled and when I check the modification date of the file it is updated to the current time although that is easily explained by the fact that I m running pod install .",
"So if that s the case what your code do is that it probably creates a brand new Pods.xcodeproj xcshareddata xcschemes BonMot.xcscheme file change its code-coverage entry and save it instead of changing the existing BonMotApp.xcodeproj xcshareddata xcschemes BonMot.xcscheme scheme .",
"Finally maybe this could help you https : gist.github.com boopathi 27d21956fefcb5b168fe if you want to add some Swift to your React Native project .",
"You could also create a new StoryBoard file and make it your default splash-screen by going to YourApp General App Icons and Launch Images Launch Screen File and by selecting your new Storyboard .",
"I m writing a post install script in a Podfile and I need to modify a particular scheme .",
"Here s what I have : .. . .. . How can I avoid the hardcoded xcshareddata xcschemes in the middle",
"Or is that the best way to do this",
"Why not",
"You might want to puts scheme.path and puts pods project.path to debug that and be sure you change what you expect .",
"Looks like post install is too early to work with schemes .",
"So your scheme is rewritten every time during installation process .",
"I do not like my solution very match but it works for me :",
"i tried to use XCodeEditor https : github.com appsquickly XcodeEditor like this : .. . .. . but it didnt work.i got the same count number printed twice .",
"anyone knows how to make it",
"thanks",
"However it corrupts all my other build targets and almost all of the projects files disappear .",
"The only documentation I have found regararding adding a new target is here .",
"Any ideas as to what I am doing wrong here",
"I am also open to other methods of adding the target progmatically .",
"I can t say why yours doesn t work but I was able to achieve this with : .. . .. . Which makes me think it could be the use of ARGV to input the scheme name or not saving before creation .",
"Let me know how you get along .",
":",
"Using xcodebuild such as in this answer http : stackoverflow.com a 27189457 1044620 .",
"I did not have any luck with this method and I do not think the changes to the target variables are permanent anyway .",
"I am open to any methods for accomplishing this as long as they can be performed within code or a script .",
"you should look into fastlane .",
"Its a suite of tools to help basically every app-store process you could imagine",
"I actually use Fastlane in other areas of my deployment .",
"Unfortunately Fastlane does not have many tools for creating and modifying targets - at least not to my knowledge .",
"What about something like this",
"developer.apple.com library ios qa qa1827 index.html https : developer.apple.com library ios qa qa1827 index.html",
"If someone could give me a hand so I get started it would be much appreciated",
"However this leaves source files e.g ."
]
}
|
{
"confidence": [
72.30223083496094,
69.88634490966797,
57.68400192260742,
57.32810974121094,
57.23065185546875,
52.02027893066406,
49.01534652709961,
48.03711700439453,
33.56835174560547,
31.90973663330078,
24.593204498291016,
22.484233856201172,
21.96664047241211,
15.707730293273926,
14.628114700317383
],
"content": [
"Question : null .. . Answer : Right now I am creating a Unity plugin for iOS and I need to check and add a Shell Script Build Phase after the Xcode project is generated . I am planning to do it on a PostProcessBuild Script . The Unity Xcode API http : docs.unity3d.com ScriptReference iOS.Xcode.PBXProject.html while useful does not provide a way to add the shell script . I have been playing around with the Xcodeproj https : github.com CocoaPods Xcodeproj gem to try and perform this task but I am not able to find the PBXNativeTarget or adding a PBXShellScriptBuildPhase when reading my project file with the xcodeproj gem . Could anyone give me some guidance to successfully detect and add a shell script build phase using xcodeproj Thanks in advance",
"Question : I am trying to create a new iPhone build target pragmatically with the Ruby gem Xcodeproj https : github.com CocoaPods Xcodeproj . Between my lack of Ruby knowlege and the poor documentation with Xcodeproj am facing some issues . Here is my code : .. . .. . When I run this code a new scheme is made in the XCode project . However it corrupts all my other build targets and almost all of the projects files disappear . I have to revert the project to get them back . Could this code be corrupting the iOS project The only documentation I have found regararding adding a new target is here . http : www.rubydoc.info gems xcodeproj Xcodeproj Project new target-instance method I am a bit confused by the optional variable product group . Any ideas as to what I am doing wrong here I am also open to other methods of adding the target progmatically . .. . Answer : I can t say why yours doesn t work but I was able to achieve this with : .. . .. . Which makes me think it could be the use of ARGV to input the scheme name or not saving before creation . Let me know how you get along . :",
"Question : In a quest to automate the iOS app generation process I am trying to set change the settings of a build target in an automated fashion outside of XCode . Specifically I would like to set the Info.plist file for a target using a command or some other programatic approach . In essence I would like to do the following but without the XCode GUI : .. . .. . enter image description here http : i.stack.imgur.com ECdUk.png .. . .. . What I have tried : .. . .. . Using xcodeproj https : github.com CocoaPods Xcodeproj . I used this approach to create the target using a Ruby script but I have not seen an easy way to set the plist file . If this is possible with xcodeproj this would be the ideal solution as I am already using it to create the target . Using xcodebuild such as in this answer http : stackoverflow.com a 27189457 1044620 . I did not have any luck with this method and I do not think the changes to the target variables are permanent anyway . I am open to any methods for accomplishing this as long as they can be performed within code or a script . Comment : you should look into fastlane . Its a suite of tools to help basically every app-store process you could imagine Comment : I actually use Fastlane in other areas of my deployment . Unfortunately Fastlane does not have many tools for creating and modifying targets - at least not to my knowledge . Comment : What about something like this developer.apple.com library ios qa qa1827 index.html https : developer.apple.com library ios qa qa1827 index.html Comment : This looks like it modifies the properties of an existing plist file but I do not see where it sets the plist file for the target . .. . Answer : After giving xcodeproj a second chance I was able to modify the build settings of the target . After creating a new target app target a build setting for a target can be set as follows : .. . .. . This ended up resolving the issue and the changes are reflected within XCode .",
"Question : I m currently struggling with Xcodeproj http : www.rubydoc.info gems xcodeproj index to be able to add some libraries and change a few details in my Xcode project . I m pretty new to Ruby and usually only use Xcode to compile my projects so here s where I am currently trying to add CoreTelephony.framework so it appears in link-to binary with libraries if i open the project in Xcode.. . .. . .. . .. . and it doesn t work of course . If someone could give me a hand so I get started it would be much appreciated .. . Answer : Ok I found some interesting examples on gist https : gist.github.com search utf8 E2 9C 93 q xcodeproj .. . .. . Here s a relevant one works perfectly :",
"Question : null .. . Answer : I m attempting to write a Ruby script that will delete certain files from the Xcode project . I can find the files based on the absolute path and remove them from the project using the remove from project http : www.rubydoc.info gems xcodeproj Xcodeproj Project Object PBXFileReference remove from project-instance method method of PBXFileReference . However this leaves source files e.g . .m or .swift files in the Compile Sources build phase of whatever target s it is a member of but without a name . enter image description here http : i.stack.imgur.com xrYZV.png .. . .. . I know I need to also remove the file from the target s but there seems to be no easy link between a PBXFileReference and a target PBXNativeTarget http : www.rubydoc.info gems xcodeproj Xcodeproj Project Object PBXNativeTarget . From what I can make out I need to iterate through each of the project s targets then iterate through the files http : www.rubydoc.info gems xcodeproj Xcodeproj Project Object AbstractBuildPhase files-instance method or files references http : www.rubydoc.info gems xcodeproj Xcodeproj Project Object AbstractBuildPhase files references-instance method of that target s source build phase http : www.rubydoc.info gems xcodeproj Xcodeproj Project Object PBXNativeTarget source build phase-instance method looking for the PBXFileReference I already have . Is this correct or am I missing some obvious link such e.g . file ref.target memberships Comment : did you ever figure this out Comment : @lemonlimepomelo unfortunately not I ended up working around it by iterating over each target s files and looking for a match . Dirty but it works . github.com NxSoftware stronglyboards blob master lib https : github.com NxSoftware stronglyboards blob master lib stronglyboards.rb L105",
"Question : I m writing a post install script in a Podfile and I need to modify a particular scheme . I m new to Ruby so I m sure I have many bad non-idiomatic habits . Here s what I have : .. . .. . How can I avoid the hardcoded xcshareddata xcschemes in the middle Or is that the best way to do this .. . Answer : You can use Xcodeproj : : XCScheme.shared data dir project path .. . .. . Agreed we could have a better way to create an Xcodeproj : : XCScheme instead directly from the Xcodeproj : : Project instance to make this easier .. . .. . So something like this should work :",
"Question : I m writing a post install script in my Podfile in order to enable gathering of code-coverage reports from my framework when I run the unit tests in the example project . Here s what I ve got : .. . .. . When I print out the scheme I can confirm that code-coverage gathering is enabled and when I check the modification date of the file it is updated to the current time although that is easily explained by the fact that I m running pod install . The code-coverage option is not being written back to the BonMot.xcscheme file . Why not .. . Answer : You are using the installer.pods project which is the Pods.xcodeproj project I believe . Your BonMot.xcscheme scheme is probably in your app project not your pods project . So if that s the case what your code do is that it probably creates a brand new Pods.xcodeproj xcshareddata xcschemes BonMot.xcscheme file change its code-coverage entry and save it instead of changing the existing BonMotApp.xcodeproj xcshareddata xcschemes BonMot.xcscheme scheme . You might want to puts scheme.path and puts pods project.path to debug that and be sure you change what you expect . To reference your app project instead you might use something like that : .. . .. . If you really wanted to modify a scheme included in the Pods project that scheme is probably not named BonMot which I believe is the name of your App except if that s the name of a framework brought as a Development Pod in your workspace via CocoaPods . .. . .. . Full explanation : .. . .. . That s because even if in practice I ve never seen it used anywhere CocoaPods allow you to integrate pods in multiple user projects at once . Usually you only have one xcodeproj but you re indeed allowed to specify the xcodeproj directly in your target do blocks to indicate a specific Xcode project the target belongs-to and thus integrate your pods in targets of different projects . So this line will ask each Pod s aggregate target pod targets that aggregate pods for a specific app target s which user project it belongs-to and then we remove duplicates on that list of user projects . Then as in practice we usually 99.9 of the time have only one app project we can get the first and only entry in that list .",
"Question : null .. . Answer : I m looking for a way to get cocoapods to copy my xpc service into the compiled binary in the proper directory like how it adds a copy resources phase to place them in the bundle . This is for a private pod for our companies internal use . We currently use static-libraries but if necessary we can transition to frameworks . Looking through the spec repo I only find one public spec that seems to have done this as a xcodeproj script in the past but no longer does : https : github.com CocoaPods Specs blob e187366577d112519af7c75d5eb35c583759103e Specs DevMateKit 1.1 DevMateKit.podspec.json .. . .. . Is there a supported way to do this Is this the recommended way to proceed or was it abandoned for good reason",
"Question : I want to fix Cocoapods bug when it adds Embed Pods Frameworks build phase for Extension targets . These phases are not needed there . https : github.com CocoaPods CocoaPods issues 4203 .. . .. . I wrote script to remove it .. . .. . I can run this script after pod install manually but I want to add it to Podfile somehow . It doesn t work in post install hook .. . .. . because UserProjectIntegrator.integrate is called after post install and it overrides my changes . Is there any way to integrate this script in Podfile Comment : It will be a nice idea to add this to the podfile . Any success on this Comment : @the.evangelist no : and no news from github issue . I m running ruby script manually after pod install . .. . Answer : The short answer is No . The long answer : .. . From the output of pod install --verbose the build phase Embed Pods Frameworks is added in the Integrating client project which runs after the post install step in the Podfile . This is why you should execute this script separately after the pod install finished running .",
"Question : I m writing a post install script in my Podfile in order to enable gathering of code-coverage reports from my framework when I run the unit tests in the example project . Here s what I ve got : .. . .. . When I print out the scheme I can confirm that code-coverage gathering is enabled and when I check the modification date of the file it is updated to the current time although that is easily explained by the fact that I m running pod install . The code-coverage option is not being written back to the BonMot.xcscheme file . Why not .. . Answer : Looks like post install is too early to work with schemes . CocoaPods installer calls write pod project method right after run podfile post install hooks during Generating Pods project step https : github.com CocoaPods CocoaPods blob master lib cocoapods installer.rb L166 and there is recreate user schemes call https : github.com CocoaPods CocoaPods blob master lib cocoapods installer.rb L693 inside . So your scheme is rewritten every time during installation process . I do not like my solution very match but it works for me :",
"Question : I have complete my first little application with React Native . Now I want to change some styles or the splash-screen on their native platform where is the generated code for these platforms I checked the ios and android folder but I just can t find the place of code . For example in xCode I think most of code is stay in main.jsbundle file . but I don t know how to open it . Moreover is it possible to continue with Swift language .. . Answer : You have to look for the LaunchScreen.xib in your ios folder . You can then edit it from XCode . You could also create a new StoryBoard file and make it your default splash-screen by going to YourApp General App Icons and Launch Images Launch Screen File and by selecting your new Storyboard . Finally maybe this could help you https : gist.github.com boopathi 27d21956fefcb5b168fe if you want to add some Swift to your React Native project . Comment : Hi thanks I have found the launch screen but where are the other pages and containers Comment : As far as I know you won t be able to access them from XCode . Maybe this will help you understand how React Native actually works : raywenderlich.com 126063 react-native-tutorial https : www.raywenderlich.com 126063 react-native-tutorial at the beginning just before the Hello World JSX section",
"Question : null .. . Answer : system : mac osx 10.11.2 xcode 7.2 .. . .. . i want to write a program or a shell script to remove add an existing xxx.framework not imported from apple s libraries from my project . i tried to use XCodeEditor https : github.com appsquickly XcodeEditor like this : .. . .. . but it didnt work.i got the same count number printed twice . anyone knows how to make it thanks",
"Question : null .. . Answer : I want to configure my Xcode project to have different PRODUCT NAME per Configuration . For example : .. . .. . 1.- myApp-Debug.app Debug Configuration 2.- myApp-Beta.app Beta Configuration .. . .. . How can attached or link the PRODUCT NAME to the configuration in Xcode I ll really appreciate your help .",
"Question : I have complete my first little application with React Native . Now I want to change some styles or the splash-screen on their native platform where is the generated code for these platforms I checked the ios and android folder but I just can t find the place of code . For example in xCode I think most of code is stay in main.jsbundle file . but I don t know how to open it . Moreover is it possible to continue with Swift language .. . Answer : where is the generated code for these platforms This is the point React Native will not compile to ObjectiveC or Java . ReactNative is a set of Native Components which are controlled by JS over the NativeBridge . Your whole application Logic lives in JS and talks to the native UI layer via the bridge . Some links on this .. . https : facebook.github.io react-native docs communication-ios.html .. . .. . How to write your own native components and use control them with js .. . https : facebook.github.io react-native docs native-modules-ios.html Comment : The native module is the thing I need thx",
"Question : null .. . Answer : I know this is a rather trivial question but I seem to be having the worst time with this . I ve tried : .. . .. . But the UUID is 0 and nothing is added to the Build Phases . Can someone please help me . I know the rest of my setup is correct . Comment : Hi do you find out how to do this now Comment : Yes you need to use new copy files build phase to create the new build phase ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
s
|
UNK_RELATION
|
unix-timestamp@unix@75
|
unix-timestamp -- the number of seconds between a particular date and the @placeholder epoch on january 1st 1970 .
|
{
"confidence": [
52.84681701660156,
52.84681701660156,
51.41788864135742,
50.952919006347656,
50.85226058959961,
50.53983688354492,
48.50967025756836,
47.3814582824707,
47.13218688964844,
46.43308639526367,
46.06922149658203,
45.675148010253906,
44.818058013916016,
44.50987243652344,
43.56826400756836,
43.53607177734375,
43.33921813964844,
43.326171875,
43.285362243652344,
43.285362243652344,
42.98103332519531,
42.444488525390625,
42.444488525390625,
42.21704864501953,
41.532108306884766,
40.79119110107422,
40.67873764038086,
40.573822021484375,
40.16848373413086,
40.12659454345703,
39.52973556518555,
39.492252349853516,
39.3021240234375,
39.229103088378906,
39.188720703125,
39.188720703125,
39.188720703125,
39.170047760009766,
39.121700286865234,
38.97763442993164,
38.83783721923828,
38.38225173950195,
38.211761474609375,
38.211761474609375,
37.98137283325195,
37.948673248291016,
37.7045783996582,
37.6491813659668,
37.58302688598633,
37.563140869140625,
37.21970748901367,
37.02206039428711,
36.78886413574219,
36.617103576660156,
36.36785888671875,
36.291996002197266,
36.291996002197266,
36.283233642578125,
36.089942932128906,
35.91636657714844,
35.787940979003906,
35.70406723022461,
35.46043395996094,
35.33252716064453,
35.33024978637695,
35.30533981323242,
35.119319915771484,
34.92806625366211,
34.823036193847656,
34.69140625,
34.55552673339844,
34.55238342285156,
34.38832092285156,
34.339290618896484,
34.168251037597656,
34.138065338134766,
34.138065338134766,
34.138065338134766,
34.08652877807617,
34.02625274658203,
34.00428009033203,
33.93568420410156,
33.893253326416016,
33.7709846496582,
33.72601318359375,
33.7081298828125,
33.656341552734375,
33.55378723144531,
33.22450256347656,
33.211700439453125,
33.1871337890625,
33.147308349609375,
33.05147933959961,
33.04290008544922,
33.04290008544922,
32.89579772949219
],
"content": [
"Since a Unix timestamp is the number of seconds since January 1 1970 .. . .. . which you can see being called",
"Unix timestamp is the number of seconds since January 1 1970 00 : 00 : 00 UTC .",
"A Unix timestamp http : en.wikipedia.org wiki Unix time is the number of seconds since 00 : 00 : 00 UTC January 1 1970 .",
"Unix s epoch means elapsed seconds since January 1st 1970 00 : 00 : 00 UTC Universal Time .",
"To get a UNIX timestamp on a non-UNIX system you have to know the difference in seconds between the local epoch and 1970-01-01T00 : 00Z .",
"To quote the Django docs : Seconds since the Unix Epoch January 1 1970 00 : 00 : 00 UTC .",
"Unix timestamps are integer number of seconds since Jan 1st 1970 UTC .",
"The application I am working with gives me a UNIX timestamp seconds that have elapsed since January 1 1970 .",
"Unix time is seconds since epoch 1970-01-01 .",
"Unix not Linux timestamps don t vary by time zone - wherever you are the current timestamp is the number of seconds milliseconds since midnight GMT on 1 January 1970 .",
"Since a Unix timestamp is the number of seconds since January 1 1970 .. . .. . As removing two dates from each other results in the number of days between them you can do something like : .. . .. . As its in seconds since 1970 the number of fractional seconds is immaterial .",
"timestamp is a unix-timestamp millisecs from 1970 .",
"First of all the Unix epoch or zero-time is 1970-01-01 00 : 00 : 00Z meaning midnight of 1st January 1970 in the Zulu or GMT or UTC time zone .",
"UNIX measures time in seconds since jan 1st 1970 and this method returns the interval between the receiver the NSDate you provide and the first instant of 1 January 1970 GMT .",
"Unless digitizing records prior to January 1 1970 I like the UNIX epoch .",
"If you take a gander at the PHP time documentation http : php.net manual en function.time.php you ll see that php time counts the number of seconds since the Unix Epoch January 1 1970 00 : 00 : 00 GMT .",
"yep UNIX timestamp represents how much seconds past from unix-time epoch in GMT-0",
"The Current Unix Timestamp .. . 1443534720 seconds since Jan 01 1970 .",
"What is the number of one second ticks between Unix time epoch 01 Jan 1970 and GPS time epoch 06 Jan 1980",
"What is the number of one second ticks between Unix time epoch 01 Jan 1970 and GPS time epoch 06 Jan 1980",
"This will give you a Unix timestamp in seconds : .. . .. . This will give you the milliseconds since the epoch not Unix timestamp :",
"Just keep in mind the epoch starts at January 1 1970 .",
"The epoch is January 1 1970 00 : 00 : 00.000 GMT .",
"normally unix-timestamp range is from January 1st 1970 to December 31st 2037 for more information have a look at http : en.wikipedia.org wiki Year 2038 problem",
"The value returned from time is the number of seconds from the epoch date .",
"The unix-timestamp is a count of seconds and each week is 2073600 seconds long .",
"The UNIX Epoch includes leap seconds .",
"It is the number of seconds since the Epoch .",
"Epoch is 1 1 1970 .",
"Note that this gives the number of seconds not milliseconds since UNIX epoch .",
"The number of seconds between Epoch and some point in time date doesn t depend on timezones .",
"That looks like a JavaScript timestamp ms since unix epoch .",
"http : api.jquery.com jquery.now .. . .. . This returns the number of seconds elapsed since 1970 commonly referred to not necessarily correctly as Unix Time Epoch or Timestamp depending on the circles you fall in .",
"From the GPS epoch which doesn t include the leap seconds to convert a UNIX timestamp to a GPS timestamp do I need to include or remove the leap seconds from the UNIX timestamp",
"The Unix Epoch Jan 1 1970 00 : 00 http : currentmillis.com 0 was on a Thursday .",
"The first Monday after the Unix Epoch http : currentmillis.com 345600000 begins on Jan 5 1970 00 : 00 .",
"The second Monday after the Unix Epoch http : currentmillis.com 950400000 begins on Jan 12 1970 00 : 00 .",
"possible duplicate of Unix epoch time to Java Date Object http : stackoverflow.com questions 535004 unix-epoch-time-to-java-date-object",
"Since the unix epoch is a specific point in time with no timezone data your timestamp is a count of the number of second since then .",
"JavaScript date time numbers are milliseconds since The Epoch not seconds since The Epoch like old-style Unix Epoch values .",
"How about .. . .. . if unix time is given in seconds unix time 86400 will give the number of days since Jan . 1st 1970 .",
"With getEpochSecond you get the epoch seconds unix time from the Instant .",
"I need to convert a unix-timestamp to a date object .",
"SECOND Where date is a code in the url of the unix-timestamp .",
"getTime Returns the number of milliseconds since January 1 1970 00 : 00 : 00 GMT represented by this Date object .",
"EDIT2 : .. . .. . In MySQL UNIX time is the number of seconds since epoch 1 1 70 so if your timestamp column contains the number of milliseconds you ll have to divide by 1000 as well .",
"Then I read it again to get more clarity : .. . .. . Unless otherwise specified by the Service Provider the timestamp is expressed in the number of seconds since January 1 1970 00 : 00 : 00 GMT .",
"As you probably know a UNIX timestamp is a number of seconds so substract add 1800 number of seconds in 30 minutes and you will get the desired result .",
"For VS its UNIX time MSDN states : The time function returns the number of seconds elapsed since midnight 00 : 00 : 00 January 1 1970 Coordinated Universal Time UTC according to the system clock .",
"As time t is time in seconds since the Epoch 00 : 00 : 00 UTC January 1 1970 you just need to get rid of the seconds of the day .",
"UNIX time is seconds since 1 1 1970 not milliseconds .",
"However how can I get it to format the current date time in a UNIX since-1970 timestamp format",
"right timezones use 1970-01-01 00 : 00 : 10 TAI epoch notice : 10 seconds and therefore the corresponding timestamp for the GPS epoch 1980-01-06 00 : 00 : 00 UTC is 315964809 not 315964819 .",
"Unix timestamp is from 1970-01-01 00 : 00 : 00 UTC .",
"Currently TIMESTAMP is implemented as a Unix-style 32-bit seconds since the beginning of the epoch with a range of values from 1970-01-01 00 : 00 : 01 up through some time on 2038-01-19 .",
"This is a UNIX timestamp of 96 hours .",
"This is a UNIX timestamp of 264 hours .",
"@ErikSchierboom : Well that depends - there are plenty of scenarios where seconds since the Unix epoch or milliseconds since the Unix epoch are used where they can be negative .",
"You can create a unix-timestamp date from a date this way :",
"To get the number of milliseconds since UNIX epoch do .. . .. . To get the number of seconds since UNIX epoch do .. . .. . You can also convert times like so : .. . .. . I do that all the time .",
"I m looking for a Java 6 compatible way of generating Seconds since epoch in GMT UTC aka UNIX Timestamp out of a java.sql.Date Object .",
"A Unix time stamp is the number of seconds since that time - not accounting for leap seconds .",
"From this value I need to get the Unix timestamp assuming today s date .",
"Is it possible to convert a TIMESTAMP field to number of milliseconds since epoch",
"UTC forgets leap seconds and therefore the actual number of SI seconds between the dates is slightly larger than the POSIX timestamp .",
"You get a unix-timestamp in C by using DateTime.UtcNow and subtracting the epoc time of 1970-01-01 . .. . .. . e.g .",
"I have found only one similar question http : stackoverflow.com questions 4794162 convert-unix-epoch-timestamp-to-mysql-timestamp-in-php but for MySQL .",
"a Unix timestamp : .. . .. . Asking Jackson to deserialize this into an object with a DateTime field for the timestamp results in 1970-01-17T01 : 11 : 25.983Z a time shortly after the epoch because Jackson is assuming it to be in milliseconds .",
"negative-number with larger absolute-value to give you a date before the epoch .",
"Something like this should do things for you CTE + ROW NUMBER and self join : .. . .. . Epoch timestamp unixtime is a number of seconds since 1970-01-01T00 : 00 : 00Z so you need to convert 10 minutes in seconds 600 and 5 hours in seconds 18000 .",
"The timestamp is the same elapsed seconds since 1970-01-01 00 : 00 : 00+00 : 00 .",
"Using the initial epoch date of 1970-01-01 results in essentially extracting the milliseconds value from the current date value .",
"This is also the correct way since Unix Timestamps are defined to be seconds since 1970 UTC .",
"Epoch is of course the Unix eproch on Unix and Linux but that s not universal .",
"Then you can safely use timedelta to calculate distance from the unix epoch and then convert to seconds or milliseconds .",
"The problem is that it shows it in a UNIX timestamp .",
"UNIX timestamp always in GMT",
"UNIX timestamp A.K.A .",
"I believe a formal version which everyone would aknowledge is : current time in milliseconds since the UNIX epoch Jan 1 1970 .",
"Most likely it makes sense to convert to a readable date-format http : stackoverflow.com questions 10040291 converting-a-unix-timestamp-to-formatted-date-string .. . .. . Example php : .. . .. . Example .net : .. . .. . Edit : .. . .. . .NET int64 format is a number of ticks since midnight 0001-01-01 00 : 00 : 00 every tick is 1 10000000 of second and UNIX timestamp is number of seconds since beginning of the UNIX epoch 1970-01-01 01 : 00 : 00 so desired result is seconds 621355968000000000 10000000 - number of seconds see Convert ticks to unix-timestamp http : stackoverflow.com questions 14427493 convert-ticks-to-unix-timestamp and https : kramerc.com 2010 11 30 converting-datetime-ticks-into-a-unix-timestamp-in-php .. . .. . Therefore for JSON output you should do .. . .. . Test function php .. . .. . Test function .net",
"However timestamps measure the number of seconds since the Unix Epoch 1970-01-01 00 : 00 : 00 UTC thereby making them independent of time zone whereas DATETIME stores a date and time without a time zone .",
"A divide by 1000 gets you to Unix epoch .",
"It looks to me like it s based at 1970 the Unix epoch instead of 1900 with 256000000 ticks per second .",
"where GNU Coreutils 8.24 Date manual .. . .. . + s seconds since 1970-01-01 00 : 00 : 00 UTC .. . + N nanoseconds 000000000..999999999 since epoch .. . .. . Example output now 1454000043.704350695 .",
"Let s assume X is your Unix timestamp in hours .",
"This is Unix time or epoch time .",
"Unix timestamp means seconds since the epoch in most situations rather than milliseconds.. . be careful",
"Let s also assume that by .. . Unix time epoch 01 Jan 1970 to GPS time epoch 06 Jan 1980 .. . you mean .. . 1970-01-01 00 : 00 : 00 UTC to 1980-01-06 00 : 00 : 00 UTC .. . and that UNIX time skips back a second after the completion of a leap-second .. . in this case there would be .. . 365days year 10years + 2 leap days + 5 days 86400 seconds day + 9 leap seconds - 9 unix leap-second rehashes .. . 315964800 UNIX seconds .. . .. . .. . Concerning Periods .. . .. . A 1977 1997 TAI SI second is what was used to come up with 315964809 seconds of 9 192 631 770 periods each 2 904 548 141 415 381 930 periods .",
"Multiply by 1000 since java is expecting milliseconds : .. . .. . From the documentation https : docs.oracle.com javase 6 docs api java util Date.html : .. . .. . Allocates a Date object and initializes it to represent the specified number of milliseconds since the standard base time known as the epoch namely January 1 1970 00 : 00 : 00 GMT .",
"Unixtime is seconds since Jan 1 1970 .",
"for date : .. . .. . for timestamp :",
"I have a Unix timestamp as a float that includes a decimal value for fractions of seconds .",
"For the older date use the Leap Year formula to start counting the number of days from Unix start date Jan1st 1970 to your first timestamp .. . .. . For leap seconds dunno if you need to get that precise hopefully will be out-of-scope",
"Is it included in the UNIX timestamp in some systems",
"Need a unix-timestamp in a specific timezone",
"I have a simple code that implements TimeStamp API accepts input of date values as string or date as unix-timestamp and returns in response Unix Timestamp or String Date respectively .. . .. . When I give a request in the form of a unix-timestamp ."
]
}
|
{
"confidence": [
71.43574523925781,
69.82360076904297,
68.31141662597656,
67.54661560058594,
66.89281463623047,
66.05416870117188,
63.994869232177734,
63.34619903564453,
63.293556213378906,
60.349632263183594,
58.55218505859375,
58.2065544128418,
58.043968200683594,
57.40193176269531,
56.995079040527344,
56.68238067626953,
56.662322998046875,
56.491981506347656,
55.96870422363281
],
"content": [
"Question : Related question is Datetime To Unix timestamp http : stackoverflow.com questions 455554 datetime-to-unix-timestamp but this question is more general . .. . .. . I need Unix timestamps to solve my last question . http : stackoverflow.com questions 1204059 find-command-search-with-created-time 1204329 1204329 My interests are Python Ruby and Haskell but other approaches are welcome . What is the easiest way to generate Unix timestamps .. . Answer : First of all the Unix epoch or zero-time is 1970-01-01 00 : 00 : 00Z meaning midnight of 1st January 1970 in the Zulu or GMT or UTC time zone . A Unix time stamp is the number of seconds since that time - not accounting for leap seconds . Generating the current time in Perl is rather easy : .. . .. . Generating the time corresponding to a given date time value is rather less easy . Logically you use the strptime function from POSIX . However the Perl POSIX : : strptime module which is separate from the POSIX module has the signature : .. . .. . The function mktime in the POSIX module has the signature : .. . .. . So if you know the format of your data you could write a variant on :",
"Question : I have a datetime field P DT and I would like to return all results where P DT is greater then an input unix-timestamp . Does Oracle have any built-in functions that can help In my searchs I find resuts for DateTime to Unix but no Unix to DateTime.. . Thanks for the help EDIT Solved .. . .. . Figured it out... . .. . .. . date unixtimestamp number .. . .. . to-date 1970-01-01 YYYY-MM-DD + numtodsinterval . GET date . SECOND Comment : numtodsinterval . GET date . SECOND .. . You re vulnerable to SQL injections with this : use parametrised queries instead on passing the values directly by string-concatenation . .. . Answer : There are no built-in functions . But it s relatively easy to write one . Since a Unix timestamp is the number of seconds since January 1 1970 .. . .. . which you can see being called Comment : I ended up using to-date 1970-01-01 YYYY-MM-DD + numtodsinterval . GET date . SECOND Where date is a code in the url of the unix-timestamp . But your solution is much more official Comment : Unix timestamp is the number of seconds since January 1 1970 00 : 00 : 00 UTC . Unless the database server runs on UTC you should use TIMESTAMP 1970-01-01 00 : 00 : 00 AT TIME ZONE UTC + numtodsinterval p unix ts second AT LOCAL",
"Question : UNIX timestamp always in GMT I tried to run php function time .. . .. . and when I tried to convert the unix-timestamp from the time function the output is not similar to the computer time . Thank You Comment : The value returned from time is the local time . What are you using to display the value Comment : The politically correct time is of course UTC since Greenwich is no longer the centre of the empire . Well it probably is but the empire is not as big as it once was : - Comment : The value returned from time is the number of seconds from the epoch date . By itself it has no timezone . When converted into calendar form that is when a timezone is applied or not applied to the value . Comment : @Loadmaster technically it does have a timezone since the UNIX epoch is in UTC . Comment : @paxdiablo perhaps but it s just as logical to say that for a simple count of seconds since an arbitrary epoch start date there is no concept of timezone years days hours and so on . It s just a count of time intervals . .. . Answer : UNIX timestamp A.K.A . Unix s epoch means elapsed seconds since January 1st 1970 00 : 00 : 00 UTC Universal Time . So if you need the time in a specific TimeZone you should convert it . Even though is technically possible I would recommend alternative ways to get current time or any other time such as getdate http : www.php.net manual en function.getdate.php that already considers local timezone before returning . Comment : time considers local timezone as well Comment : @zerkms Not according to the documentation : php.net manual en function.time.php http : php.net manual en function.time.php Comment : yep my mistake . Comment : Had no idea of that thank you . Comment : @Alix Axel : No problem Go Cristiano Ronaldo",
"Question : This question already has an answer here : .. . .. . Convert a Unix timestamp to time in JavaScript questions 847185 convert-a-unix-timestamp-to-time-in-javascript 19 answers .. . .. . I d Like to generate some unix Timestamp in the future . therefore i use a generator like unixtimestamp.com http : www.unixtimestamp.com . But when i use the any generated timestamp for example in a console.log in chrome or firefox it produces not the timestamp from now but a timestamp from 1970 . Example : 1462277206 is the Unix Timestamp for Tue May 3 12 : 06 : 46 2016 GMT . But in the console new Date 1462277206 returns Sat Jan 17 1970 23 : 11 : 17 GMT+0100 CET . What am i doing wrong Thanks for your help Muff Comment : @michaPau : Good find . .. . Answer : JavaScript date time numbers are milliseconds since The Epoch not seconds since The Epoch like old-style Unix Epoch values . If you have a value in seconds multiply by 1000 : Comment : Thanks - I just wonder why this is not uniformed so that the unix-timestamp is generally served in milliseconds . Comment : @Raggamuffin : History . For years time values were measured in seconds since The Epoch . This started in the 1970s . Then we felt the need for more precision and more modern systems started using milliseconds since The Epoch . Now there are even more modern systems using even more precise systems such as Microsoft s ticks since January 1 0001 at 00 : 00 : 00.000 in the Gregorian calendar a tick being 100 nanoseconds . Early Unix hackers wouldn t have dreamed of using the amount of storage for a time value that C uses for DateTime but things have moved on a bit in the last 45 years .",
"Question : If all I have is the unix-timestamp and I am not able to use any functions to format it such as day of the week or date is there any known pattern by looking at the timestamp to deduce what day of the week it is for example perhaps all timestamps that are divisible by 150 are Mondays Comment : don t forget about leap years Comment : @DanielA.White : Actually for this particular problem do forget about leap years . The unix-timestamp is a count of seconds and each week is 2073600 seconds long . The day-of-week cycle is independent of months and years . Now if you want to know the day of the week in local time you need to account for DST transitions which you can t reasonably handle without library functions . Comment : Is there some reason you re not able to use library functions Also do you want the day of the week in UTC or in local time The latter is going to be a lot more difficult . .. . Answer : The Unix Epoch Jan 1 1970 00 : 00 http : currentmillis.com 0 was on a Thursday . Specifically it marked the beginning of a Thursday . The first Monday after the Unix Epoch http : currentmillis.com 345600000 begins on Jan 5 1970 00 : 00 . This is a UNIX timestamp of 96 hours . The second Monday after the Unix Epoch http : currentmillis.com 950400000 begins on Jan 12 1970 00 : 00 . This is a UNIX timestamp of 264 hours . Let s assume X is your Unix timestamp in hours . The formula X - 96 264 - 96 24 will return a zero-based weekday index where 0 is Monday and 6 is Sunday . The formula looks like this : .. . .. . X - 96 168 24 if X is your timestamp in hours .. . X - 345600 604800 86400 if X is your timestamp in seconds .. . X - 345600000 604800000 86400000 if X is your timestamp in milliseconds .. . .. . If i experiment with exactly this moment defined by a Unix timestamp of 1466710873523 ms i would get 1466710873523 - 345600000 604800000 86400000 which is 3.8 meaning it s Thursday almost Friday though : . Note though that it s Thursday UTC - in certain timezones it might be different so for local time you would need to take timezone offset into account .",
"Question : How do I get a uint unix-timestamp in C++ I ve googled a bit and it seems that most methods are looking for more convoluted ways to represent time . Can t I just get it as a uint .. . Answer : The most common advice is wrong you can t just rely on time . That s used for relative timing : ISO C++ doesn t specify that 1970-01-01T00 : 00Z is time t 0 .. . .. . What s worse is that you can t easily figure it out either . Sure you can find the calendar date of time t 0 with gmtime but what are you going to do if that s 2000-01-01T00 : 00Z How many seconds were there between 1970-01-01T00 : 00Z and 2000-01-01T00 : 00Z It s certainly no multiple of 60 due to leap seconds . Comment : How do I get a uint unix-timestamp in C++ - given - as you ve said - you can call gmtime later to get a readable representation of whatever that timestamp encodes what functionality requested in the question isn t satisfied by time regardless of the reference date or suitability for interval calculations Comment : To get a UNIX timestamp on a non-UNIX system you have to know the difference in seconds between the local epoch and 1970-01-01T00 : 00Z . There s just no method which does that . Comment : For some reason I got the impression the question was for code on a UNIX or Linux etc machine but now I see where you re coming from . Curious : have you found any actual system where time t 0 wasn t 1970-01-01T00 : 00Z Would be but a couple minutes work to work out an offset on any given system take the non-UNIX time t 0 and get a time t for it on a UNIX system but thanks for explaining your concern . Comment : For VS its UNIX time MSDN states : The time function returns the number of seconds elapsed since midnight 00 : 00 : 00 January 1 1970 Coordinated Universal Time UTC according to the system clock . msdn.microsoft.com en-us library 1f4c8f33.aspx http : msdn.microsoft.com en-us library 1f4c8f33.aspx Comment : @TonyD : IBM systems apparently are an exception . Not really a surprise since they were in the computer business well before 1-1-1970 .",
"Question : Hello In a model I have a such field : mydate models.DateField .. . .. . now a javascript graph function requires unix-timestamp such as 1196550000000 how can I return the unix-timestamp of my mydate input . Thanks Comment : 1196550000000 is not a unix-timestamp unless we are talking about the year 37 942 or something . Comment : That looks like a JavaScript timestamp ms since unix epoch . .. . Answer : I know another answer was accepted a while ago but this question appears high on Google s search results so I will add another answer . If you are working at the template level you can use the U parameter https : docs.djangoproject.com en dev ref templates builtins from olddocs std 3atemplatefilter-date to the date filter e.g . : .. . .. . Note that it will be based upon the TIMEZONE in your settings.py . Comment : Since this solution is so low with no votes I thought I would mention that it worked for me without any issues . Thanks . Comment : I m having issues getting it to work . I can get date and time to output using any other set of flags but when I try to use the U flag I get an empty string . I m boggled . Comment : +1 this is exactly what I needed . Comment : As a side note : it is usually better to store timestamps on DB instead of date strings . Timestamps are absolute always UTC and an easy to manipulate integer . Comment : Apparently this is not based on the timezone but on UTC . To quote the Django docs : Seconds since the Unix Epoch January 1 1970 00 : 00 : 00 UTC . This is also the correct way since Unix Timestamps are defined to be seconds since 1970 UTC .",
"Question : I have some data files with Unix timestamps in this case number of milliseconds since Jan 1 1970 00 : 00 UTC . I would like to convert these to human-friendly date time strings e.g . 31-Aug-2012 11 : 36 : 24 in Matlab . Is there an easy way to do this in Matlab or am I better off using an external library e.g . java.text.SimpleDateFormat .. . Answer : How about .. . .. . if unix time is given in seconds unix time 86400 will give the number of days since Jan . 1st 1970 . Add to that the offset used by Matlab s datenum datenum 0000 1 1 1 and you have the amount of days since Jan . 1st 0000 . This can be easily converted to human-readable form by Matlab s datestr . If you have milliseconds just use .. . .. . Wrapped in functions these would be Comment : This does not however handle leap seconds . Click here http : en.wikipedia.org wiki Unix time for more info . Comment : I knew that Unix timestamps do not include leap seconds . Are you implying that Matlab s date time functions do include leap seconds So I have to figure out a way to account for this difference Comment : @robguinness AFAIK neither unix time or matlab s date time functions handles leap seconds correctly . I put it in a comment because for many people the answer will be sufficient . But if you need leapseconds you ll have to devise something around that . Comment : Ok thanks . I d rather leave leap seconds out of the equation . As long as I can convert from unix-timestamp to a friendly date time I don t mind if it s off from the wall clock time by a few seconds . I just wanted to check that the conversion would be the same in Matlab as in other systems where the unix epoch is commonly used . Comment : @robguinness There really should be an IEEE standard time system and libraries for it in every programming language...every new system just seems to use its own ad-hoc standard . Unix time is stupid in many respects as well it only has the advantage of being ubiquitous :",
"Question : I need to convert a unix-timestamp to a date object . I tried this : .. . .. . Timestamp value is : 1280512800 .. . .. . The Date should be 2010 07 30 - 22 : 30 : 00 as I get it by PHP but instead I get Thu Jan 15 23 : 11 : 56 IRST 1970 . How should it be done Comment : If you use Java 8 or newer : Have a look at this answer : stackoverflow.com a 24703644 1115554 http : stackoverflow.com a 24703644 1115554 .. . Answer : Multiply by 1000 since java is expecting milliseconds : .. . .. . From the documentation https : docs.oracle.com javase 6 docs api java util Date.html : .. . .. . Allocates a Date object and initializes it to represent the specified number of milliseconds since the standard base time known as the epoch namely January 1 1970 00 : 00 : 00 GMT . Comment : The cast to long is very important : without it the integer overflows . Comment : is there a difference between Java.util.Date and Date Comment : @TomasK java.util.Date is the fully qualified-name of the class . Date is probably the exact same thing provided you import the java.util package on your class . Comment : @PabloSantaCruz Thank you : Comment : The cast to long is not needed . time new java.util.Date timeStamp 1000L works just as well since 1000L is a long timestamp will be upcast to a long before the multiplication",
"Question : How to convert an NSDate into Unix timestamp I ve read many posts which do the reverse . But I m not finding anything related to my question . .. . Answer : I believe this is the NSDate s selector you re looking for : Comment : Does this return a unix-timestamp if provided with an nsdate Comment : Yes this is exactly what you re looking for . UNIX measures time in seconds since jan 1st 1970 and this method returns the interval between the receiver the NSDate you provide and the first instant of 1 January 1970 GMT . NSTimeInterval is actually a typedef of double . Comment : For completion sake to convert a Unix timestamp into NSDate do NSDate dateWithTimeIntervalSince1970 : yourTimestampAsDouble Comment : To get a string 28 11 2011 14 : 14 : 13 - 1322486053 : NSString stringWithFormat : @ .0f aDate timeIntervalSince1970 Comment : The method is changed by the time set on the device in general . I did a test where i got the timestamp at 12pm then changed around the time on the iPad to about 8pm and the difference in the two numbers were extremely high . If the timestamp was no device time dependent the numbers should have been off by mere seconds but in this case I had to conclude that the time on the iPad does affect the unixTimeStamp",
"Question : Related question is Datetime To Unix timestamp http : stackoverflow.com questions 455554 datetime-to-unix-timestamp but this question is more general . .. . .. . I need Unix timestamps to solve my last question . http : stackoverflow.com questions 1204059 find-command-search-with-created-time 1204329 1204329 My interests are Python Ruby and Haskell but other approaches are welcome . What is the easiest way to generate Unix timestamps .. . Answer : where GNU Coreutils 8.24 Date manual .. . .. . + s seconds since 1970-01-01 00 : 00 : 00 UTC .. . + N nanoseconds 000000000..999999999 since epoch .. . .. . Example output now 1454000043.704350695 . I noticed that BSD manual of date did not include precise explanation about the flag + s . Comment : Why do you include nanoseconds by + N Is it included in the UNIX timestamp in some systems",
"Question : What is the number of one second ticks between Unix time epoch 01 Jan 1970 and GPS time epoch 06 Jan 1980 I have seen multiple answers from several sources on the web . One camp claims the answer is 315964800 the other claims it is 315964819 . I always thought it was 315964800 but now am not so sure . I just found my software baseline has been using 315964819 for the last eight years . I have a hard time understanding how it could have been 19 seconds off and no one noticed it when we integrated our embedded devices with other devices . I think that whoever put 315964819 in the code baseline must have mistakenly used a TAI offset 19 seconds . From what I understand Unix time does not include leap seconds which would indicate to me that 315964800 is the number of ticks between the two epochs . Then I think about how Unix time handles the leap-second . It simply repeats the tick count when there is a leap-second inserted and there were 19 leap seconds inserted between 1970 and 1980.. . I start to wonder if the repeated ticks matter . I do not think so but someone in this code s history thought so and it seemed to work... . The long and short of it is I am about to change a constant set in the dark ages of this product that has to do with timing which is important for the platform from what it had been to what I believe is more accurate and I wanted some sort of thumbs-up from more knowledgeable people than me . Can someone authoritative please step in here 315964800 camp https : www.google.com q 315964800 .. . .. . 315964819 camp https : www.google.com q 315964819 .. . .. . Also note that I m only asking about Unix epoch to GPS epoch . I m pretty sure we ve got leap seconds since GPS epoch covered appropriately . Comment : related : How to get current date and time from GPS unsegment time in python http : stackoverflow.com q 33415475 4279 .. . Answer : What is the number of one second ticks between Unix time epoch 01 Jan 1970 and GPS time epoch 06 Jan 1980 There are at least two possible answers : .. . .. . 1 . What is POSIX timestamp for 1980-01-06 UTC Answer : 315964800 http : ideone.com R73J6s exactly in Python : .. . .. . from datetime import datetime timedelta .. . print datetime 1980 1 6 - datetime 1970 1 1 timedelta seconds 1 .. . .. . .. . It is the number of SI seconds between the dates not counting leap seconds . In other words the code shows how many UT1 seconds 1 86400 of a mean-solar day passed between the events . UTC GPS time scales tick in SI seconds . UTC forgets leap seconds and therefore the actual number of SI seconds between the dates is slightly larger than the POSIX timestamp . 315964800 is not the correct answer if you want to find elapsed seconds .. . .. . 2 . How many SI seconds elapsed between 1970-01-01 UTC and 1980-01-06 UTC Answer : 315964811 http : ideone.com rKLW4R approximately . To answer the second question you need to know how many intercalary leap seconds were inserted between the two dates convert UTC to the International Atomic Time TAI : .. . .. . The difference between TAI and GPS time is constant within 10s of nanoseconds . The time between 1970 and 1972 when UTC was introduced is a little fuzzy the TAI-UTC difference is not integer number of seconds in that period http : hpiers.obspm.fr eop-pc index.php index TAI-UTC tab : .. . .. . Here s a picture that shows the relation between UT1 UTC and TAI time scales over the years http : hpiers.obspm.fr eop-pc earthor utc leapsecond.html : UTC-TAI http : i.stack.imgur.com 9OXqF.gif Each step is a leap-second starting with TAI - UTC 10s on 1972-01-01 . 26 positive leap seconds had been inserted as of 1 July 2015 . .. . .. . 315964819 timestamp could be explained if 1970-01-01 00 : 00 : 00 TAI epoch is used : .. . .. . i.e . exactly 315964819 SI seconds elapsed between 1970-01-01 00 : 00 : 00 TAI and 1980-01-06 00 : 00 : 00 UTC note : the dates are expressed using different time scales . right timezones use 1970-01-01 00 : 00 : 10 TAI epoch notice : 10 seconds and therefore the corresponding timestamp for the GPS epoch 1980-01-06 00 : 00 : 00 UTC is 315964809 not 315964819 . Here s a succinct description of the difference between right and POSIX timestamps http : www.ucolick.org sla leapsecs right+gps.html : .. . .. . The right files in the tz zoneinfo database have a subtle difference from the POSIX standard . POSIX requires that the system clock value of time t represent the number of non-leap seconds since 1970-01-01 . This is the same as requiring POSIX seconds to be mean solar seconds of UT not the atomic seconds that UTC has counted since 1972-01-01 . .. . The right zoneinfo files assert that the system clock value of time t represent the actual number of seconds in the internationally approved broadcast time scale since 1970-01-01 . As a result the value of time t which is expected by the right zoneinfo files is greater than the value of time t specified by POSIX . The difference in the values of time t is the number of leap seconds which have been inserted into the internationally approved broadcast time scale . As of year 2015 the difference is 26 seconds.emphasize is mine .. . .. . .. . .. . Can someone authoritative please step in here IERS BULLETIN C http : hpiers.obspm.fr eop-pc index.php index bulletins lang en the data that I ve used above is the authority on leap seconds and therefore indirectly on the difference between UTC and GPS time scales . Comment : Thank you . This is also very helpful . Comment : A very precise answer for a less precise question . One would have to know what exactly his programm needs to calculate .",
"Question : This question already has an answer here : .. . .. . Should I use field datetime or timestamp questions 409286 should-i-use-field-datetime-or-timestamp 29 answers .. . .. . Probably many coders want to ask this question . it is What s the adventages of each one of those MySQL time formats . and which one you will prefer to use it in your apps . For me i use Unix timestamp because maybe i find it easy to convert order records with it and also because i never tried the DATETIME thing . but anyways i m ready to change my mind if anyone tells me i m wrong . Thanks Comment : Similar : stackoverflow.com questions 409286 datetime-vs-timestamp http : stackoverflow.com questions 409286 datetime-vs-timestamp .. . Answer : Unless digitizing records prior to January 1 1970 I like the UNIX epoch . Its just a matter of preference whole unsigned numbers are simpler to deal with when using multiple-languages . Just keep in mind the epoch starts at January 1 1970 . A lot of companies had been in business for decades if not longer prior to that .",
"Question : Today I notice this about unix times : .. . .. . Whats happening here It is not suppose to be equal Comment : that would depend on the php instance s default time zone http : php.net manual en timezones.php Comment : The difference between the two numbers is exactly 3 x 3600 seconds . In what time zone you are Comment : anytime you have time differences that are some even multiple of 3600 seconds it s almost always a time-zone issue . Comment : @Marc B : Be aware there are a few countries which are 30mins off the hour some regions even 15mins Comment : yeah but 3600 1hr is most common . .. . Answer : If you take a gander at the PHP time documentation http : php.net manual en function.time.php you ll see that php time counts the number of seconds since the Unix Epoch January 1 1970 00 : 00 : 00 GMT . The 0th second of a day in one timezone is different than the 0th second of the day in another timezone and different php instances may use different timezones . Comment : Hm . That new for me . I always thought that the same date give the same timestamp in every place of the world . So if i get timestamps create on different places of the world I ll get inconsistent results I always thought that the reason for unixtime was to everyone communicate dates in the same way . But in fact echo strtotime 1970-01-01 give me 10800 which is super weird to me . Comment : It s not inconsistent it just means you need more information . It s kind of like asking a person what time it is . You can ask your php instance with date default timezone get . I m fairly certain if you use that on your local instance and also on the remote instance you ll find a timezone difference that equals exactly the numerical difference you re seeing .",
"Question : I have a timestamp datatype in database with format 24-JuL-11 10.45.00.000000000 AM and want to get it converted into unix-timestamp how can I get it .. . Answer : This question is pretty much the inverse of Convert Unixtime to Datetime SQL Oracle http : stackoverflow.com questions 10554405 convert-unixtime-to-datetime-sql-oracle .. . .. . As Justin Cave says : .. . .. . There are no built-in functions . But it s relatively easy to write one . Since a Unix timestamp is the number of seconds since January 1 1970 .. . .. . As removing two dates from each other results in the number of days between them you can do something like : .. . .. . As its in seconds since 1970 the number of fractional seconds is immaterial . You can still call it with a timestamp data-type though.. . .. . .. . .. . .. . In response to your comment I m sorry but I don t see that behaviour : .. . .. . There s 3 600 seconds difference i.e . 1 hour . Comment : The value I am passing to PDate comes from sql Select TO DATE TO CHAR fld from date DD-Mon-YY HH : MI : SS AM DD-Mon-YY HH : MI : SS AM AS date for unix-timestamp Assuming TO CHAR fld from date DD-Mon-YY HH : MI : SS AM in the above query results in 08-Mar-12 01 : 00 : 00 AM the to-date covesrion of this char comes out to be just 08-Mar-12 what is the reason HH : MI : SS 01 : 00 : 00 AM is not appearing Comment : Hi @deepti there s no need to post another answer . You can always click the edit link on your question and change it there . A comment leaves a notification for me as well . I ve updated my answer the lack of visibility could just be something to do with your client Comment : Studying time and leap seconds I have to say your programmatic solution is correct but the cited definition of Unix Time is not : Unix Time is not the Number of Seconds since 1.1.1970 but it is The Number of Days since 1.1.1970 times 60 60 24 plus the Number of seconds since Midnight today",
"Question : UNIX timestamp always in GMT I tried to run php function time .. . .. . and when I tried to convert the unix-timestamp from the time function the output is not similar to the computer time . Thank You Comment : The value returned from time is the local time . What are you using to display the value Comment : The politically correct time is of course UTC since Greenwich is no longer the centre of the empire . Well it probably is but the empire is not as big as it once was : - Comment : The value returned from time is the number of seconds from the epoch date . By itself it has no timezone . When converted into calendar form that is when a timezone is applied or not applied to the value . Comment : @Loadmaster technically it does have a timezone since the UNIX epoch is in UTC . Comment : @paxdiablo perhaps but it s just as logical to say that for a simple count of seconds since an arbitrary epoch start date there is no concept of timezone years days hours and so on . It s just a count of time intervals . .. . Answer : yep UNIX timestamp represents how much seconds past from unix-time epoch in GMT-0 Comment : You re wrong : it s GMT+0 : P Comment : my whole life was a lie",
"Question : i have a 4-column table with ships signal entries . 1st column is unix time with a 3-month rows entry . 2nd is the name of a ship . 3rd is the longitude . 4th is the latitude . There are many entries of the same ship with different time . i want a sql-server query to find the table rows which a ship doesn t have an entry for more than 10 minutes and less than 5 hours . Comment : So what part are you having problems with and what have you tried so far Comment : You are asking us to write a query for you yet you did not even bother to provide a proper DDL . .. . Answer : Something like this should do things for you CTE + ROW NUMBER and self join : .. . .. . Epoch timestamp unixtime is a number of seconds since 1970-01-01T00 : 00 : 00Z so you need to convert 10 minutes in seconds 600 and 5 hours in seconds 18000 .",
"Question : How to convert an NSDate into Unix timestamp I ve read many posts which do the reverse . But I m not finding anything related to my question . .. . Answer : A Unix timestamp http : en.wikipedia.org wiki Unix time is the number of seconds since 00 : 00 : 00 UTC January 1 1970 . It s represented by the type time t http : en.wikipedia.org wiki Time t which is usually a signed 32-bit integer type long or int . iOS provides - NSTimeInterval timeIntervalSince1970 http : developer.apple.com iphone library documentation Cocoa Reference Foundation Classes NSDate Class Reference Reference.html apple ref occ instm NSDate timeIntervalSince1970 for NSDate objects which returns the number of seconds since 00 : 00 : 00 GMT January 1 1970 . NSTimeInterval is a double floating-point type so you get the seconds and fractions of a second . Since they both have the same reference midnight 1Jan1970 UTC and are both in seconds the conversion is easy convert the NSTimeInterval to a time t rounding or truncating depending on your needs : Comment : This function shows me correct date but time is wrong . It doesn t match the system time . Comment : Unix time is UTC GMT India is UTC+5.5 . Is it off by 5.5 hours Comment : Yes almost. . What should be done to correct this Comment : Your system time is showing time in your local time zone which is fine . Unix timestamp is not local time it is always UTC time it differs by +5 : 30 in India -7 : 00 from here . That s correct . Comment : Thanx progrmr it really helped. .",
"Question : I m looking for a Java 6 compatible way of generating Seconds since epoch in GMT UTC aka UNIX Timestamp out of a java.sql.Date Object . My Java 8 code is : .. . .. . My Java 6 code is : .. . .. . Unfortunally the Java 6 code is around as half as fast as the Java 8 code . I had a Java 6 solution with less code in the past and therefor faster but it was wrong when it came to unusual dates as 0001-01-01 where setGregorianChange is needed and a second GergorianCalendar came in . Any idea what I could do to get a fast Java 6 implementation 1 . I need Thread safety .. . 2 . 2010-01-01 must result in 1262304000 .. . 3 . 0001-01-01 must result in -62135596800 .. . 4 . 2999-12-31 must result in 32503593600 .. . .. . EDIT 1 .. . .. . I also tried the following Java 6 code : .. . .. . This works with 2010-01-01 and 2999-12-31 but not with 0001-01-01 expected : -62135596800 actual : -62135769600 - guess the missing setGregorianChange is what troubles here . EDIT 2 .. . .. . The code is running in a JsonSerializer . I have an application presenting those UNIX timestamps inside a JSON . The consuming side expects the timestamps as GMT Timestamps and will create a date by this timestamps hardcoding the timezone to GMT but use it later as it where local timezone . To make the problem more clear I ll present an example . Date on my side : 2010-01-01 UTC+100 .. . milliSeconds : 1262300400000 .. . seconds : 1262300400 .. . .. . the consumer now takes this seconds and forms a date out of it : .. . .. . Thu 31 Dec 2009 23 : 00 : 00 GMT .. . .. . Of course - this is 100 correct but the consumer does use this date as-if it where a local timezone date.. . The seconds I expect to be transfered are 1262300400 + 3600 my TZ Offset for this example . EDIT 3 .. . .. . I got the GregorianCalendar -thing down to a 4liner - but even this is much slower than the Java 8 thing . The problem is the creation of a new GregorianCalendar Object each time the code is executed . But this is a must-do since Calendar not threadsafe . So a fast solution must somehow work without any object-instantiation . The example below is mostly like EDIT 1 and is even faster than the Java 8 code . It just does not work correctly with dates before the Julian - Gregorian switch 15-Oct-1582 . Unfortunally it works a with a deprecated method and b does not work correctly with dates before 1582 : . Using a static TimeZone.getDefault .getRawOffset to solve a is not an option as the TimeZone may change summer- vs . wintertime on each date . Comment : I m gonna be that guy and ask if you have tried joda time joda.org joda-time http : www.joda.org joda-time Comment : Why are you getting a Calendar instance and the proceed to create another GregorianCalendar completely ignoring the calendar obtained before . Start by removing the dead-code Comment : @DamienO Reilly - I want a solution without any dependencies . Comment : @Olli If you read-the-docs A java.sql.Date is a wrapper around the time stamp . getTime Returns the number of milliseconds since January 1 1970 00 : 00 : 00 GMT represented by this Date object . You might change he timezone for representation but it is still the same timestamp . Comment : @Durandal - I could create a GregorianCalendar call setTime do the y m d extraction as I do above and then continue with clear and so on . This will indeed save me the first Calendar.getInstance but does not change the execution-time . 127 980 executions Original Java6 code : 35 402ms One-Calendar-Instance-Java6 code : 35 794ms Java8 code : 19 086ms .. . Answer : Comment : the question was : GMT Comment : The number of seconds between Epoch and some point in time date doesn t depend on timezones . Comment : Epoch has a time zone and date has a time zone too.. . - I assume that the issue is that he has to ensure that they have the same GMT . Comment : @Roman - a regulary created java.sql.Date object will represent the ms since epoch in your local timezone when you just call getTime you ll exactly get that . Comment : @Olli the javadocs exactly contradict what you are saying . The epoch is January 1 1970 00 : 00 : 00.000 GMT . So if you have a date in a different timezone it has the same number of milliseconds since the epoch . Are you saying your date has been created from an incorrect epoch"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
unix
|
UNK_RELATION
|
smtp@ip@133
|
smtp -- simple mail transfer protocol smtp is an internet standard for electronic mail e-mail transmission across internet protocol @placeholder networks .
|
{
"confidence": [
75.06549835205078,
72.56110382080078,
70.9159164428711,
68.05085754394531,
67.60427856445312,
63.01995849609375,
60.1060791015625,
59.891319274902344,
58.100425720214844,
57.06074523925781,
56.098243713378906,
56.06698226928711,
54.399967193603516,
53.9692497253418,
53.30282211303711,
53.1478271484375,
52.504188537597656,
52.306976318359375,
52.306976318359375,
52.306976318359375,
52.306976318359375,
52.01146697998047,
52.01146697998047,
52.01146697998047,
51.720848083496094,
51.70477294921875,
51.52363586425781,
51.52363586425781,
51.14533996582031,
50.58477783203125,
50.58477783203125,
50.58477783203125,
50.58477783203125,
50.58477783203125,
50.58477783203125,
50.58477783203125,
50.15146255493164,
50.072471618652344,
49.67483901977539,
49.157012939453125,
49.154808044433594,
49.11997985839844,
48.74726867675781,
48.647422790527344,
48.634796142578125,
48.62696075439453,
48.394622802734375,
48.209678649902344,
48.209678649902344,
48.209678649902344,
48.15760803222656,
48.15760803222656,
48.0210075378418,
47.84605407714844,
47.552650451660156,
47.374267578125,
47.21383285522461,
47.21383285522461,
47.21383285522461,
47.21383285522461,
47.21383285522461,
47.21383285522461,
47.21383285522461,
47.21383285522461,
47.21383285522461,
47.21383285522461,
47.1871337890625,
46.96417999267578,
46.61379623413086,
46.61379623413086,
46.595760345458984,
46.595760345458984,
46.43540954589844,
46.43048858642578,
46.43048858642578,
46.43048858642578,
46.43048858642578,
46.43048858642578,
46.090797424316406,
45.90287399291992,
45.90287399291992,
45.90287399291992,
45.90287399291992,
45.898162841796875,
45.71852111816406,
45.63702392578125,
45.491634368896484,
45.491634368896484,
45.491634368896484,
45.491634368896484,
45.491634368896484,
45.491634368896484,
45.491634368896484,
45.491634368896484,
45.119529724121094,
45.119529724121094,
45.119529724121094,
44.971065521240234,
44.85287857055664
],
"content": [
"SMTP is the protocol that is used by nearly all Internet hosts to send mail .",
"Mail protocol : SMTP+SSL .. . 4 .",
"SMTP is a mail transfert protocol as the name implies .",
"Your question is incorrect - SMTP stands for Simple Mail Transfer Protocol whereas sendmail is the software piece to send the mail using this protocol .",
"SMTP is for mail relay although it is the defacto protocol for mail clients to send mail due to the Unix heritage of every box running an SMTP mail relay .",
"Sender-client sends e-mail to SMTP server host A using SMTP-protocol .. . 2 .",
"SMTP server host A does a lookup as to where the e-mail is supposed to go and communicates to SMTP server host B using SMTP-protocol .. . 3 .",
"Settings Protocols SMTP Delivery of e-mail .. . 6 .",
"SMTP is a transmission protocol with the sole focus on transmission only .",
"Mail protocol :",
"And there s a race-condition between sending the e-mail over SMTP and successfully saving the e-mail to the IMAP Sent folder .",
"Here is a sample SMTP mail script :",
"Just i used smtp server for the authenticated mail.In the django mail api How it is supposed to send an mail with the local smtp",
"At the beginning of line and is followed by a new line character then the SMTP protocol will consider it as mail termination and hence only a part of mail would be delivered .",
"Just with SMTP I can t send mail .",
"@stark but how does the e-mail go from the SMTP-server to the MDA",
"The SMTP already send my mail to the destiny the problem it s that in the mail recibered appear the origin mail changed .",
"PHP s mail function does not have support for SMTP .",
"But mail function requires SMTP server for sending emails .",
"mail uses SMTP server on your system .",
"In order to send mail you must use SMTP .",
"OR .. . .. . b . Connect to mail-server using smtp protocol and host port username pass from php.ini and try to send email .",
"I don t know if this is possible through pop3 imap smtp protocol or specific mail-server api .",
"SMTP as a protocol is concerned only with a return path the MAIL request a list of recipients the RCPT request and the data to be transferred the DATA request .",
"When you send test mail via WP Mail SMTP Plugin did you getting that mail in your inbox",
"With SMTP almost every email is using MIME Multipurpose Internet Mail Extensions RFC2045 https : tools.ietf.org html rfc2045 .",
"check first your configured smtp mail details .",
"if so should I use a mail not smtp",
"you can directly send mail from php mail function if you specified the smtp server and smtp port in php.ini first ask the SMTP server credential to your ISP .",
"I m using Gmail SMTP and Zend Mail Messsage .",
"Then I installed EASY WP MAIL SMTP .",
"I configured smtp settings for yandex mail .",
"The SMTP verb which caused the error is MAIL .",
"@AgataCieplik a plugin like WP-SMTP-MAIL",
"I did with same database-mail smtp configuration .",
"Actually I m using Mail Enable SMTP Server .",
"Google may firewall out at it s MX servers IP addresses networks very unlikely to host legitimate mail SMTP servers .",
"I am trying to set wordpress smtp mail-server using SMTP mailer and it is not going to connect to smtp .",
"Maybe by connecting to the mail-server and signing in with a mail account credentials this information is available through mail-server api or protocol .",
"I am working on oracle 11g UTL SMTP mail processing .",
"Not really no : the mail needs to go through SMTP anyway so you re just changing how it gets there on some hosts mail uses SMTP internally anyway .",
"Did not work for me on PHP 5.6.20 : Warning : mail : SMTP server response : 530 5.7.57 SMTP Client was not authenticated to send anonymous mail during MAIL FROM",
"smtp is a protocol not a program .",
"I ve tried WP-Mail-SMTP and SendGrid both of which when sending a test e-mail come to my inbox perfectly .",
"I used the WP-Mail-SMTP and set the following : From Email From Name Send all wordpress emails via SMTP Set the return-path to match the From E-mail SMTP Host : relay-hosting.secureserver.net SMTP Port : 25 No Encryption No SMTP Authentication",
"Part of your problem is that you are sending SMTP commands when the mail-server MTA - mail transfer agent is expecting you to be negotiating an SSL session .",
"I m using the following method to send mail from Python using SMTP .",
"mail- IsMail That way you don t need to use smtp and gmail .",
"Try to send mail from window server using SMTP .",
"To send mail using Gmail SMTP need to change your account setting .",
"Some mail programs most today will connect directly to a mail-server and speak SMTP to it .",
"I am using a mail plugin to reconfigure the mail functionaity to use an external SMTP service .",
"Looking at the hostname it seems that the mail-server is in the internet .",
"Try to send an e-mail through that SMTP server manually from an interactive mailer e.g .",
"If you are using this from your own personal connection to an external mailbox many ISPs will block outgoing mail SMTP ports and the mail will mail will not be sent .",
"I have smtp mail and i am sending verification mail of account at webproject .",
"We simply block SMTP at the firewall except for know good mail servers .",
"Since Java Mail 1.4.4 CRAM-MD5 is supported for use with smtp .",
"In my aplication I am sending mail using smtp server .",
"I need an alternative that allows me to specify the SMTP MAIL FROM .",
"I am using java mail to send emails over smtp .",
"When a line of mail text is received by the SMTP server it checks the line .",
"I use the email library to send mail using SMTP .",
"Then even the lowly mail function can work with SMTP goodness .",
"mail uses SMTP server on remote or virtual-machine with Linux .",
"SMTP works for Windows Mail and is only blocked for Java on this Windows machine .",
"hi i wanted to send mail via smtp protocol to one of my gmail s accounts.. . .. . .. . i tried but finally it occurred and error : .. . .. . so now how can i send mail without having this problem",
"Symantec Endpoint Protection blocks email sent by Java mail client .. . .. . Fix ID : 3399185 .. . .. . Symptom : The Internet Email Auto-Protect feature of Symantec Endpoint Protection blocks SMTP email sent by a Java mail client .",
"The authors argue that SMTP was not meant to be used by a mail client MUA Message User Agent but only by mail servers routing a mail to its destination .",
"The recipient s mail-server inserts the Return-Path header into the message by copying the value supplied by the sender s mail-server in the SMTP MAIL FROM command .",
"UPDATED .. . .. . You could try changing mail- SMTP to : .. . .. . It s worth noting that some SMTP servers block connections .",
"It s a convenient way to set up WordPress for SMTP mail or Amazon SES which supports SMTP connections .",
"I mean sending mail using PHP through authenticated SMTP for example by using the PEAR Mail-package .",
"another mail-server then it s likely going to be using SMTP to xfer the message .",
"I changed my hostname SMTP username password in mail in admin panel .",
"Now i have to put smtp mail instead of gmail .",
"I am trying to use G-mail as my smtp host .",
"The smtp server that you are trying to send the mail to is rejecting to relay .",
"br .. . .. . .. . require phpmailer class.phpmailer.php include phpmailer class .. . .. . Instantiate Class .. . mail new PHPMailer .. . .. . Set up SMTP .. . mail- IsSMTP Sets up a SMTP connection .. . mail- SMTPAuth true Connection with the SMTP does require authorization .. . mail- SMTPSecure ssl Connect using a TLS connection .. . mail- Host smtp.gmail.com Gmail SMTP server address .. . mail- Port 465 Gmail SMTP port .. . mail- Encoding 7bit .. . .. . Authentication .. . mail- Username [email protected] Your full Gmail address .. . mail- Password xxxxxxxxxx Your Gmail password .. . .. . Compose .. . .. . mail- Subject New Admission Enquiry Form Subject which isn t required .. . mail- MsgHTML message .. . .. . Send To .. . .. . mail- AddAddress [email protected] Recipient Name Where to send it - Recipient .. . .. . .. . .. . .. . .. . .. . result mail- Send\t\tSend",
"whenever I try to send e-mail using Gmail s SMTP server in my C code .",
"Disable the External to external e-mail addresses checkbox in the Require SMTP authentication group .",
"If you want to send E-Mail to an arbitrary SMTP server on the net consider using a library like SwiftMailer http : swiftmailer.org .",
"If I want to send an invitation e-mail to a user my SMTP-server doesn t accept the given recipient address .",
"It sounds like you re confusing SMTP as used to communicate from a mail client to the SMTP server with SMTP as used to send an email from an MTA to another MTA",
"SMTP is a really really easy protocol .",
"Gmail s for consumer e-mail in consumer e-mail style sending patterns .",
"Are there SMTP servers or mail clients that still are not 8-bit clean",
"this one http : stackoverflow.com questions 1094137 zend-mail-gmail-smtp or others .",
"Alternatively you can use PHP mail directly without smtp .",
"Thanks but this is the mail -function which does not make use of SMTP for sending mails .",
"Include details of the web server and the SMTP mail agent you are using .",
"passowrd : if there is no exception the mail message is being forwarded to your smtp server .",
"I m using python Django framework and gmail smtp for sending mail .",
"Any time you send an SMTP mail you have to create a client .",
"SMTP-server host B then accepts the e-mail and communicates with the IMAP-server host B to magically",
"In my project I m trying to send e-mail through my own SMTP server using Laravel 5 .",
"I have everything set up correctly using the SMTP driver and I m managing to send and receive e-mail fine .",
"More info is needed : if possible a transcript of the SMTP session up until the DATA line what e-mail client is sending the e-mail what is mentioned in the MDaemon logs etc .",
"no e-Mail-Title ."
]
}
|
{
"confidence": [
83.56037902832031,
81.08927917480469,
79.61314392089844,
78.77364349365234,
73.771728515625,
70.0955810546875,
69.6159896850586,
68.90381622314453,
68.89541625976562,
68.74945068359375,
67.83324432373047,
67.81013488769531,
67.57466125488281,
67.55509185791016,
66.87591552734375,
66.7332763671875,
66.5125732421875,
65.7466049194336,
65.57012176513672,
64.8853759765625
],
"content": [
"Question : A rails application in production should use smtp or sendmail to send mails Comment : smtp is a protocol not a program . .. . Answer : Your question is incorrect - SMTP stands for Simple Mail Transfer Protocol whereas sendmail is the software piece to send the mail using this protocol . Use sendmail .",
"Question : I m working on programming an IMAP-server but running into one question : where do the emails come from .. . .. . I always thought the basic course of events was this : .. . .. . 1 . Sender-client sends e-mail to SMTP server host A using SMTP-protocol .. . 2 . SMTP server host A does a lookup as to where the e-mail is supposed to go and communicates to SMTP server host B using SMTP-protocol .. . 3 . SMTP-server host B then accepts the e-mail and communicates with the IMAP-server host B to magically get the e-mail to that server .. . 4 . The receiver-client asks the IMAP server host B for new e-mails using the IMAP protocol . And that made me wonder : how do the e-mails get from the accepting SMTP-server to the serving IMAP-server Do they have a protocol for that Do they just drop it inside a directory My own attempt to find an answer.. . I have seen usages of the var mail directory - with one file per user - which does not seem like it is intended for a large userbase . Wouldn t it also cause issues when two processes read-write from this at the same time I have also seen the Postfix main.cf file possibly contain mailbox transport lmtp : unix : var imap socket lmtp which looks like the LMTP protocol being used to communicate to the IMAP server using a unix-socket . Which would indicate the IMAP-server also speaking LMTP Are there any other methods being used Or other protocols Comment : That s done by the MDA message delivery agent according to RFC 5598 . Comment : Typically it s stored in a database or the filesystem . For Unix systems this is typically home user mail or older var mail . For something like Exchange it ll be a proprietary database . Comment : @stark but how does the e-mail go from the SMTP-server to the MDA And how does it go from the MDA to the IMAP server Comment : On unix the MTA execs an MTA and gives it the message on stdin see the procmail man page for details . On other OSes they do exist and sometimes on unix the MDA is part of the same software package as the SMTP server . .. . Answer : The most common methods of transfer from MTA SMTP server and IMAP server : .. . .. . 1 . SMTP and IMAP are server by the same server or servers from the same vendor - any proprietary secret undocumented protocol method may be used .. . AFAIK it is not common linux unix solution .. . .. . 2 . LMTP protocol slight modification of SMTP - modern recomendation .. . .. . 3 . MTA executes custom program provided by IMAP server and typically feeds message into standard input of the program .. . .. . 4 . MTA puts message into per user Maildir https : en.wikipedia.org wiki Maildir e.g . .maildir IMAP uses the same shared maildir .. . .. . 5 . MTA puts incoming messages into standard unix per user mailbox file var mail username and IMAP server uses the file as INBOX folder .. . .. . The tricky part is making MTA reject non existing virtual IMAP users email account without per email account OS account in reply to RCPT TO : in SMTP session . MTA must know valid virtual mailboxes .",
"Question : A rails application in production should use smtp or sendmail to send mails Comment : smtp is a protocol not a program . .. . Answer : SMTP is the protocol that is used by nearly all Internet hosts to send mail . This protocol is spoken by sendmail . Sendmail determines where to send your message and how . Some mail programs most today will connect directly to a mail-server and speak SMTP to it . However the traditional method - and arguable the better method - is to let sendmail do it . There are two reasons for this : 1 nearly every program in UNIX that does what sendmail does is designed to be a drop-in replacement this includes Postfix http : www.postfix.org and Exim http : www.exim.org for instance and 2 sendmail or its replacement was designed to handle mail and nothing else - by using sendmail you don t have to design a SMTP client . The Mutt email-client for UNIX is one email-client that still refuses to talk SMTP directly to a mail-server a good technical description is on the wiki http : wiki.mutt.org MuttGuide Send . If you have a choice on UNIX anyway of talking SMTP directly or using sendmail use sendmail - especially on servers . Comment : there s no sendmail in windows though...hmm.. .",
"Question : These ports 465 and 587 are both used for sending mail submitting mail but what is the real difference between them Comment : en.wikipedia.org wiki Simple Mail Transfer Protocol http : en.wikipedia.org wiki Simple Mail Transfer Protocol Comment : The only difference is formalized standards and 465 port is for legacy support Comment : iana s Service Name and Transport Protocol Port Number Registry http : www.iana.org assignments service-names-port-numbers service-names-port-numbers.xhtml is the formal guide to the recommended use of ports the use of 465 for SMTP over SSL is unofficial . Read about Ports in SMTP http : en.wikipedia.org wiki Simple Mail Transfer Protocol . iana s official usage is not always the same for both the TCP and UDP transport protocols . N.B . : if you are the SMTP server administrator YOU control which port s are used if you are the client you get only ports made available to you . Comment : related : stackoverflow.com questions 3484947 http : stackoverflow.com questions 3484947 why-should-i-convince-developers-to-use-port-587-for-all-smtp-communication .. . Answer : These port assignments are specified by the Internet Assigned Numbers Authority IANA : .. . .. . Port 587 : SMTP Message submission SMTP-MSA a service that accepts submission of email from email clients MUAs . Described in RFC 6409 . Port 465 : URL Rendesvous Directory for SSM sic entirely unrelated to email .. . .. . Historically port 465 was initially planned for the SMTPS encryption and authentication wrapper over SMTP but it was quickly deprecated within months and over 15 years ago in favor of STARTTLS over SMTP RFC 3207 . Despite that fact there are probably many servers that support the deprecated protocol wrapper primarily to support older clients that implemented SMTPS . Unless you need to support such older clients SMTPS and its use on port 465 should remain nothing more than an historical footnote . The hopelessly confusing and imprecise term SSL has often been used to indicate the SMTPS wrapper and TLS to indicate the STARTTLS protocol extension . For completeness : .. . .. . Port 25 : Simple Mail Transfer SMTP-MTA a service that accepts submission of email from other servers MTAs or MSAs . Described in RFC 5321 . Sources : .. . .. . IANA Service Name and Transport Protocol Port Number Registry http : www.iana.org assignments service-names-port-numbers service-names-port-numbers.txt .. . Revoking the smtps TCP port http : www.imc.org ietf-apps-tls mail-archive msg00204.html - Email from Internet Mail Consortium director Paul Hoffman 12 Nov 1998 . RFC 6409 - Message Submission for Mail http : www.rfc-editor.org rfc rfc6409.txt .. . RFC 5321 - Simple Mail Transfer Protocol http : www.rfc-editor.org rfc rfc5321.txt .. . RFC 3207 - SMTP Service Extension for Secure SMTP over Transport Layer Security http : www.rfc-editor.org rfc rfc3207.txt .. . RFC 4607 - Source-Specific Multicast for IP http : www.rfc-editor.org rfc rfc4607.txt Comment : nice technical explanation was looking for SSL vs TLS . Comment : SMTPS and its use on port 465 should remain nothing more than an historical footnote . Except that Gmail and most other email providers use Port 465 for SSL aka SMTPS . It is a reality that s not going anywhere no matter what IANA specifies . Comment : @EricJ . ...But gmail also supports port 587 . Do you know which port Google uses internally Otherwise the fact that they support 465 doesn t really count as evidence it s preferred or even particularly commonly used .",
"Question : i was wondering . Suppose i have an exchange-server the domain can be [email protected] also i have a relay server that accepts requests to internet domains gmail yahoo etc . suppose i send a mail to : [email protected] [email protected] - from a user in the domain [email protected] .. . .. . The mail is sent to the exchange-server then the exchange groups the domains company.com and gmail.com it puts the mail into [email protected] mailbox . then the exchange sees that it needs to send into [email protected] so it will send it to the relay server . the relay server will get the SMTP request : .. . .. . from : [email protected] .. . .. . to : [email protected] [email protected] .. . .. . .. . .. . the question is - how does the smtp relay server knows not to send it to [email protected] - thus causing duplicate mails received also how does the gmail server knows not to try to send the mails it receives again because they only get smtp requests similar to a client that sends the mail .. . .. . thanks in advanced .. . Answer : The content of the mail is not parsed by either exchange or the relay for determining where the mail should go . Everyone in this context is talking SMTP with one another and specify recipients with the RCPT protocol message . So your mail client tells exchange two RCPT exchange decides one of them is remote then says one RCPT to the relay and so on and so forth . This document ftp : ftp.rfc-editor.org in-notes rfc5321.txt specifies the SMTP protocol where you may read about the RCPT verb . Comment : does it mean that the relay get [email protected] but the to field will contain both mails Comment : yes the mail relay or transport agent must not mess with the To message header . it is only allowed to add certain headers of it s own for accounting purposes as indicated by other commentaries in this question .",
"Question : I keep getting this error when I try to send an e-mail in PHP : .. . .. . my php.ini looks like this : .. . .. . I m using my laptop as a server. . What am I doing wrong Thanks . Comment : Do you have a SMTP server setup Comment : No..That s probably why : Comment : Some questions 1 . have you restarted your server 2 . do you have a mail-server running on the laptop 3 . us the SMTP Listening cmd netstat -aon Comment : No I didn t have a mail-server running I m on Windows 7 have to find a mail-server and try. . Thanks . .. . Answer : PHP mail function can send email in 2 scenarios : .. . .. . a . Try to send email via unix sendmail program At linux it will exec program sendmail put all params to sendmail and that all . OR .. . .. . b . Connect to mail-server using smtp protocol and host port username pass from php.ini and try to send email . If php unable to connect to email server it will give warning and you see such workning in your logs To solve it install smtp server on your local machine or use any available server . How to setup configure smtp you can find on php.net",
"Question : When setting-up my mobile email-client I usually need to enter the SMTP relay server domain-name but why my email-client need a SMTP relay server at all I think it can directly talk to the smtpd server e.g . postfix from which domain the destination Email address is by looking up the DNS MX records . And send directly to it why not .. . .. . Actually I have another confusion if a smtpd server use SMTP AUTH then how can a rely server elsewhere rely a mail to it The rely server simply don t have the username and password necessary to transfer that mail . .. . Answer : Email clients use SMTP relay server to .. . .. . simplify email sending e.g . to avoid repeating delivery attempts by email-client .. . avoid being mistaken for spammers . Direct email sending might be a reasonably simple option in ancient pre spam https : en.wikipedia.org wiki Email spam past . SMTP AUTH is used mainly with email-client to email server communication . SMTP server to SMTP server communication could not require SMTP AUTH without prohibiting email from strangers . SMTP AUTH allows to accept messages from trusted clients customers even from IP addresses that otherwise would be blocked by DNSBL https : en.wikipedia.org wiki Dnsbl e.g . DUL https : en.wikipedia.org wiki Dialup Users List ranges . Comment : Thanks for your answer I agree that avoiding spammers and allowing machanizm like SPF is the big reason . Another question is when I telnet a gmail MTA according to MX record I choose aspmx3.googlemail.com whose IPv4 is 74.125.24.26 on my Linode VPS I am successful while when I telnet using the laptop in my home the telnet times out . But I can ping that address so is there some firewall detecting my destination port and filtering messages with port 25 Comment : Most likely yes as spam prevention . Google may firewall out at it s MX servers IP addresses networks very unlikely to host legitimate mail SMTP servers .",
"Question : These ports 465 and 587 are both used for sending mail submitting mail but what is the real difference between them Comment : en.wikipedia.org wiki Simple Mail Transfer Protocol http : en.wikipedia.org wiki Simple Mail Transfer Protocol Comment : The only difference is formalized standards and 465 port is for legacy support Comment : iana s Service Name and Transport Protocol Port Number Registry http : www.iana.org assignments service-names-port-numbers service-names-port-numbers.xhtml is the formal guide to the recommended use of ports the use of 465 for SMTP over SSL is unofficial . Read about Ports in SMTP http : en.wikipedia.org wiki Simple Mail Transfer Protocol . iana s official usage is not always the same for both the TCP and UDP transport protocols . N.B . : if you are the SMTP server administrator YOU control which port s are used if you are the client you get only ports made available to you . Comment : related : stackoverflow.com questions 3484947 http : stackoverflow.com questions 3484947 why-should-i-convince-developers-to-use-port-587-for-all-smtp-communication .. . Answer : SMTP protocol : smtps port 465 v . msa port 587 .. . .. . Ports 465 and 587 are intended for email-client to email server communication sending email . Port 465 is for smtps https : en.wikipedia.org wiki Smtps .. . SSL encryption is started automatically before any SMTP level communication . Port 587 is for msa https : en.wikipedia.org wiki Mail submission agent .. . It is almost like standard SMTP port . MSA should accept email after authentication https : en.wikipedia.org wiki Mail submission agent Mandatory authentication e.g . after SMTP AUTH . It helps to stop outgoing spam when netmasters of DUL https : en.wikipedia.org wiki Dialup Users List ranges can block outgoing connections to SMTP port port 25 . SSL encryption may be started by STARTTLS https : en.wikipedia.org wiki Starttls command at SMTP level if server supports it and your ISP does not filter server s EHLO reply reported 2014 Nov http : it.slashdot.org story 14 11 11 2349244 isps-removing-their-customers-email-encryption . .. . .. . Port 25 is used by MTA to MTA communication mail-server to mail-server . It may be used for client to server communication but it is not currently the most recommended . Standard SMTP https : en.wikipedia.org wiki Smtp port accepts email from other mail servers to its internal mailboxes without authentication . Comment : Standard SMTP port accepts email from other mail-server without authentication - is not actually technically correct . Standard 25 port can transfer mail both using authentication and not depending on the configuration of MTA . Comment : @Ilia standard SMTP port of normal MTA can not reject all unauthenticated SMTP connections . Comment : How about Postfix It doesn t let relaying mail by default but only for connections from same network Comment : @Ilia There is also incoming mail to local email domains .",
"Question : I have found conflicting information about dot stuffing when transmitting an email . 1 . stuff a dot if the line contains a single dot to avoid premature termination .. . 2 . stuff a dot to every line stat starts with a dot .. . 3 . stuff a dot to 1 and to every line part of a quoted-printable message part only .. . .. . Can anyone clarify .. . Answer : In SMTP protocol the mail is terminated by a single dot and a newline character s .. . .. . In simple terms something like : .. . .. . r n . r n .. . .. . The characters : .. . .. . CR LF DOT CR LF .. . .. . Which corresponds to a single dot at the beginning of a line . In case the mail data contains a single . At the beginning of line and is followed by a new line character then the SMTP protocol will consider it as mail termination and hence only a part of mail would be delivered . So the whole idea is to avoid these type of situation by padding an extra dot . Comment : This does not answer my question .",
"Question : I am doing a Networks course and as I was reading about SMTP I thought about the following matter : .. . .. . If a user sends an email to [email protected] [email protected] [email protected] does it take the same amount of time to send the emails separately as it does to send it as a multi-recipient email Or when the first one is sent the next two are easier to send since the connection is already established with that server Or does the connection close immediately thus making no difference What about when the emails belong to different domains .. . Answer : It depends on how the MTA is programmed . The SMTP protocol allows the sender to send multiple RCPT TO commands to list all the recipients of a message and any reasonably-designed MTA will make use of this to consolodate them . For the multiple-domain case your mail client will use a single connection to upload the message to its submission server . That server will then use one connection per destination domain for the recipients .",
"Question : I want to send a html-email with smtp account My Smtp Information is like that : .. . .. . SMTP Hostname .. . Default SMTP Login .. . password .. . port 587 .. . .. . And How can I modified this code to use It .. . Answer : There is a standard SmtpClient in C . Comment : How can I add host and port help Comment : host and port are given from your e-mail server . I know that G-Mail and Outlook live hotmail outlook msn have information about this in mail settings . Try looking through settings as-if you were trying to setup IMAP e-mail configuration .",
"Question : Youtrack allow to send email through 3rd party SMTP server . Fields are as follows : .. . .. . 1 . SMTP host : 2 . SMTP port : 3 . Mail protocol : 4 . SMTP login : 5 . SMTP password : 6 . Select SSL key : 7 . Server from email : Could you provide an example of Gmail or Google apps config .. . Answer : I was using 2-Step Verification on my Gmail Account and this caused an error sending an email . To resolve first I created an App Password see : https : support.google.com accounts answer 185833 .. . .. . Then using these settings I was able to send a test email : .. . .. . SMTP host : smtp.gmail.com .. . SMTP port : 465 .. . Mail protocol : SMTP+SSL .. . SMTP login : [email protected] .. . SMTP password : newly created app password .. . Select SSL key : No key .. . Server from email : [email protected] .",
"Question : This question http : stackoverflow.com questions 5022605 why-php-mail-require-mail-program-like-sendmail-postfix-etc-for-sending-email got me thinking and I now realize that I don t know anything about the internals of MTAs . What exactly does an MTA do Everything after the SMTP protocol seems like dark magic to me . Let s say that I wanted to code a minimalistic MTA or MDA http : en.wikipedia.org wiki Mail delivery agent just for sending emails what would I need to learn do Edit : I don t actually plan on writing an MTA I just want to understand how it works internally . .. . Answer : Here ya go : http : en.wikipedia.org wiki Message transfer agent .. . .. . Quickly the MTA receives the raw message decides where it s ultimate destination is and then forwards the message on to that destination . A very simple MTA can be written the delivers only to local inboxes . The MTA is an easier part of the system to write because you can behave badly but still be functional so your interoperability with other systems is less of an issue that s where much of the complexities of email lie nowadays that and spam virus checking . The real contract of an MTA is simply that if you accept the message from the system sending it to you you accept responsibility to deliver that message . Thus when that socket closes with an acknowledgement of acceptance the delivering systems job is done and it s all in your hands . If you happen to do a crummy job mail is lost and it s your problem . But it s still fun to play around with . Comment : What I m trying to figure out is how it forwards the message to the destination.. . Surely there must be some kind of protocol involved no Comment : All depends on the destination no The MTA is what listens to the SMTP port on the server so it accepts the request from the client an email program or another mail-server . If the final destination for the message is simply a local inbox then the protocol can be as simple as appending the message to an mbox . If the final destination is somewhere else i.e . another mail-server then it s likely going to be using SMTP to xfer the message . Comment : I tried connecting to Google MX and SMTP servers directly on port 25 and 587 then I sent some data according to the SMTP protocol without authentication which should be the way my local MTA does and the message was not delivered . Using the MTA it does but why Comment : Works for me sorrry - connecting to gmail-smtp-in.l.google.com port 25 . I can HELO test and MAIL FROM : [email protected] and get a positive response . Comment : Ah right - yes I think the SSL SMTP on 587 is for sending email out not in . So that would need authentication yes . For SSL in I think you make a plain connection on port 25 then request an upgrade to TLS on the same connection with STARTTLS",
"Question : Youtrack allow to send email through 3rd party SMTP server . Fields are as follows : .. . .. . 1 . SMTP host : 2 . SMTP port : 3 . Mail protocol : 4 . SMTP login : 5 . SMTP password : 6 . Select SSL key : 7 . Server from email : Could you provide an example of Gmail or Google apps config .. . Answer : Here is what I finally did : .. . .. . 1 . SMTP host : smtp.gmail.com .. . 2 . SMTP port : 465 .. . 3 . Mail protocol : SMTP+SSL .. . 4 . SMTP login : [email protected] or [email protected] .. . 5 . SMTP password : .. . 6 . Select SSL key : No key .. . 7 . Server from email : [email protected] . Gmail will ignore the from parameter so I put the same . References .. . .. . Enable IMAP in your Gmail settings Gmail doc https : support.google.com mail troubleshooter 1668960 rd 1 ts 1665018 1665144 .. . How to use Gmail as your SMTP server http : lifehacker.com 111166 how-to-use-gmail-as-your-smtp-server . Comment : this doesn t work if that email has never logged to GMail from that IP .",
"Question : I have below code using codeigniter .. . .. . In above code it sent an email . But it removes the return path that I have set and it just replace it with the from address . I have read some articles that says SMTP sets return path when it delivers . How can I set Return Path when I use SMTP authentication SMTP not allowed to set custom return path for bounced emails . It automatically sets return path with from address when delivered . .. . Answer : Read Manual CL Email Class http : www.codeigniter.com user guide libraries email.html setting-email-preferences-in-a-config-file .. . .. . Parameters : .. . from string From e-mail address name string From display name return path string Optional email-address to redirect undelivered e-mail to Returns : .. . CI Email instance method-chaining Comment : The code I have given is working properly . If I do not use the Protocol SMTP then the return path worked that I have set . But when I use the Protocol SMTP then it sets the return path to from address not to my given return path address .",
"Question : is there a library class code-snippet etc . that allows me to directly receive mail in php So that I don t have to run an additional sever in an other process and then have to somehow send the mails to the already-running php-process . I ve been looking around for a while but results for php and mail or mta smtp on google focus mostly on sending mail or retrieving it using pop3 or imap.. . .. . .. . EDIT .. . .. . What I m trying to do is forward the messages to an IRC-channel so obviously when the IRC-bot in PHP isn t running loosing the mails is not a big deal . However having a low-latency between receiving the mail and posting it on IRC is . .. . Answer : Try this : http : www.php.net manual en refs.remote.mail.php .. . .. . 10 seconds of googling . SMTP is for mail relay although it is the defacto protocol for mail clients to send mail due to the Unix heritage of every box running an SMTP mail relay . POP3 and IMAP provide mail clients access to mail . Comment : This is something for interacting with an existing MTA.. . it s not a replacement for one . Comment : That s what SMTP specifies : how to interact with other STMP servers . Comment : There is nothing in there for receiving mails .",
"Question : Something doesn t work with my phpmailer smtp . The php page should connect to an smtp authenticated server with username and password then authenticate to the specific mailbox I choose with username and password . Basically I have a two-step authentication : one to the server one to the mailbox . What the username and password below refer to How could I login to the server with user and password and then to the mailbox other user and other password Thank you to who will be able to help me . .. . Answer : To send email using SMTP authentication you only need to log in once with a username and password permitted to relay through that server . When an SMTP server is also the Mail Exchanger MX for a domain the username and password used for SMTP authentication are usually the same as those used to receive email using POP3 IMAP where the mailbox exists on a Mail Delivery Agent MDA http : en.wikipedia.org wiki Mail delivery agent . SMTP has no concept of mailboxes it is only concerned with accepting messages from Mail User Agents MUA receiving messages from Message Transfer Agents MTA or submitting emails to a Mail Submission Agent MSA http : en.wikipedia.org wiki Mail submission agent all of which communicate using the SMTP protocol https : www.ietf.org rfc rfc2821.txt . Comment : the username and password used for SMTP authentication are usually the same .. . and when they are not Comment : Then you need specific credentials that allow you to relay but there is still only one username password combination to use . There is no secondary login after authenticating . Comment : I asked my provider and answered that auth smtp is at a domain level not at mailbox level . So I have : - username : [email protected] - password : xxx but I need to send email from [email protected] . How can I do that with phpmailer I can t specify two different usernames .",
"Question : There is a growing trend to use port 587 for all client to MTA communications . It s in a standards track RFC : http : www.ietf.org rfc rfc2476.txt .. . .. . My question is Why . Why have 2 instances of a SMTP server running on the same server if they both do the same thing What security feature does it provide besides giving me 2 things to troubleshoot as an administrator . This just seems like unnecessary complication that isn t needed unless the ISP blocks port 25 . Even then if the ISP is blocking port 25 to prevent spam it just means it will just take a little more time until port 587 is blocked too and we will have to use a different port altogether . Just seems like we are creating more work for ourselves rather then solving the problem and authenticating SMTP to begin with .. . Answer : I had a quick reading through the RFC and their thinking is to divide the SMTP world into two areas : transporting mails that s what SMTP was developed for and submitting mails . The authors argue that SMTP was not meant to be used by a mail client MUA Message User Agent but only by mail servers routing a mail to its destination . They think that if you divide the SMTP world in this way then you could write a SMTP server meant to be accessed only by MUAs that is then able to do things and make assumptions a normal forwarding SMTP server should may not make . A normal SMTP server has always been called an MTA Message Transfer Agent . The authors propose to name the new type of SMTP server MSA Message Submission Agent . It seems they think this would make implementing the two server types easier and maybe even more secure . The RFC explains what needs to be different in an MSA when compared to a MTA . For example the RFC mandates the use of authorization while the original SMTP protocol didn t have that SMTP AUTH was added later it seems by the very RFC 2476 however SMTP AUTH itself is the later specified in RFC 2554 which has been replaced by RFC 4954 . An MTA that needs to relay messages from various sources to various destinations cannot use authentication for every message how should another server authenticate to your server . But an MSA which is the starting point of your message can and must require authentication from its peer the mail client . And while an MTA must relay the message unaltered save for adding a Received header and MSA may sanitize an e-mail e.g . by filling in missing headers and things like that . Comment : +1 for the great information thanks Dark Dust",
"Question : I m building a application that needs to send and receive emails . However I do not want to have a separate email server or use IMAP and POP3 since I need to create delete manage inboxes on the fly with no email inbox passwords etc . I have an email storage database in-place and I can receive emails by using a custom smtpd server replacing postfix . However that way I m not able to send emails via postfix using smtplib connecting through port 25 to postfix and sending emails .. . .. . Any solution to this problem How to send emails with a custom smtp server Can I configure postfix to relay all incoming emails to a custom smtp server running in another port and still use postfix on port 25 to send emails Thanks for your time .. . Answer : By using a custom SMTP server you run the risk of inadvertently creating security holes or violating the SMTP protocol in some way . With so many great SMTP servers out there Postfix exim sendmail.. . that doesn t sound like a good option to me . The easiest way I can think of to solve that issue is to use Postfix to relay inbound and outbound e-mail . Inbound e-mail can be configured to be piped to an application and outbound e-mail can be configured to be delivered by Postfix either directly or relayed through a different server . This way you can use instead of a custom SMTP server an application that is able to parse RFC822-compliant message files . This is better than doing exactly the same thing but with the overhead of having to implement the SMTP protocol . This approach probably won t scale well should you need to receive a high volume of messages - every message will fork+exec a new process . If that is a requirement a good approach would be to keep a custom SMTP server to do that job but let Postfix relay it the messages - you will then benefit from Postfix s architecture in front of your parser . Assuming you follow the approach of piping the messages to an application all you need to do in Postfix is to .. . .. . 1 . Configure Postfix s alias maps http : www.postfix.org postconf.5.html alias maps parameter to look for such a map : .. . .. . alias maps hash : etc aliases hash : etc postfix app-aliases .. . .. . .. . 2 . Then configure the map to pipe messages sent to each address into an application : .. . .. . test : usr local bin your-app .. . .. . .. . 3 . As usual don t forget to postalias app-aliases . This will make a message sent to test@yourdomain be piped into usr local bin your-app which acts as an e-mail gateway to your application . Comment : Meanwhile this came up http : elspy.sourceforge.net that should also do the trick by directly getting the emails from the Mail Transfer Agent incoming queue . I ll check both alternatives and see which is better . Comment : That looks more like a scanner module than an MDA . You ll probably be better served by procmail http : www.procmail.org or maildrop http : www.courier-mta.org maildrop .",
"Question : I m venturing in unknown territory here.. . I am trying to work out how hard it could be to implement an Email client using Python : .. . .. . Email retrieval .. . Email sending .. . Email formatting .. . Email rendering .. . .. . Also I m wondering if all protocols are easy hard to support e.g . SMTP IMAP POP3 .. . .. . .. . .. . .. . Hopefully someone could point me in the right direction : Comment : I removed the C++ tag-it doesn t seem C++ related at all Comment : Python : Batteries included : smtp imap pop3 - Internet Protocols http : docs.python.org library internet.html Internet Data Handling http : docs.python.org library netdata.html Comment : Do you want to build something with a UI or not If so and it s the UI that is the thing you want to play with just build a frontend to an existing email-client . Decide what you want to learn the details of : headers protocols and bytes or buttons and notifications .. . Answer : The Python language does offer raw support for the needed protocols in its standard-library . Properly using then and properly parsing and assembling a modern day e-mail message however can be tough to do . Also you didn t say if you want to create a graphical interface for your e-mail client -- if you want to have a proper graphical interface -- up to the point of being usable it is quite a lot of work . Local e-mail storage would be the easier part - unless you want to properly implement an mbox file-format RFC-4155 http : tools.ietf.org html rfc4155 so that other software can easily read-write the messgaes you have fetched you can store them in as Python Objects using an ORM or an Object Oriented database such as ZODB or MongoDB . If you want more than a toy e-mail app you will have a lot of work - properly encoding e-mail headers for example server authentication and secure authentication and transport layers decoding of the e-mail text body itself for non ASCII messages . Although the modules on the Python standard-library do implement a lot of that their documentation falls short on examples - and a complete e-mail client would have to use all of then . Certainly the place to start an e-mail client even a toy one would be taking a look on the most recent RFC s for e-mail and you will have to pick then from here http : www.ietf.org rfc rfc-index since just looking for email rfc on google gives a poor result . Comment : amazing reply thanks :"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
ip
|
UNK_RELATION
|
linkpoint@provider@40
|
linkpoint -- linkpoint is a commercial @placeholder of payment-processing software .
|
{
"confidence": [
23.818748474121094,
15.900856018066406,
15.900856018066406,
15.900856018066406,
15.900856018066406,
15.900856018066406,
15.900856018066406,
15.900856018066406,
15.900856018066406
],
"content": [
"I have a staging account for Credit card processing and I have use the same for telecheck processing .",
"I am working on integration Firstdata telecheck to my shopping cart .",
"Response I am getting is : .. . .. . SGS-020019 : Not authorized to do this type of transaction .",
".. . .. . I guess telecheck is not enable in my account .",
"I tried to connect with Firstdata support but did not get much help as it is a staging demo account .",
"Any help to work around it would be appreciated .",
"Found the answer .",
"Firstdata do not provides sandbox environment for Telecheck .",
"We need to get it enabled on production environment and test it their ."
]
}
|
{
"confidence": [
21.51546287536621
],
"content": [
"Question : I am working on integration Firstdata telecheck to my shopping cart . I have a staging account for Credit card processing and I have use the same for telecheck processing . Response I am getting is : .. . .. . SGS-020019 : Not authorized to do this type of transaction . .. . .. . I guess telecheck is not enable in my account . I tried to connect with Firstdata support but did not get much help as it is a staging demo account . Any help to work around it would be appreciated . .. . Answer : Found the answer . Firstdata do not provides sandbox environment for Telecheck . We need to get it enabled on production environment and test it their ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
provider
|
UNK_RELATION
|
chromebug@thunderbird@82
|
chromebug -- chromebug is a tool for debugging xul applications like firefox and @placeholder with firebug-like capabilities .
|
{
"confidence": [
74.13169860839844,
57.07874298095703,
57.05174255371094,
53.986488342285156,
51.39040756225586,
49.52712631225586,
49.51789474487305,
48.04265594482422,
47.65764617919922,
47.6508903503418,
46.481689453125,
44.46333694458008,
43.044857025146484,
42.751129150390625,
42.62876892089844,
42.25642395019531,
41.74028015136719,
41.721282958984375,
40.94684982299805,
38.77484130859375,
38.05891418457031,
36.356788635253906,
35.823184967041016,
35.823184967041016,
35.823184967041016,
30.422752380371094,
30.355018615722656,
30.282508850097656,
28.15054702758789,
27.92702865600586,
27.212059020996094,
27.162050247192383,
25.698652267456055,
25.481903076171875,
25.458656311035156,
25.04794692993164,
23.864513397216797,
23.486530303955078,
23.37786102294922,
22.707748413085938,
22.59325408935547,
22.433225631713867,
22.129602432250977,
22.10301971435547,
21.723960876464844,
20.85969352722168,
20.669918060302734,
20.669918060302734,
20.25544548034668,
20.015403747558594,
19.80161476135254,
19.357280731201172,
19.13558006286621,
19.13558006286621,
19.13558006286621,
19.128826141357422,
18.997236251831055,
18.997236251831055,
18.551441192626953,
18.442962646484375,
18.434215545654297,
17.93461036682129,
17.93461036682129,
17.93461036682129,
17.890243530273438,
17.66466522216797,
17.453060150146484,
17.292348861694336,
17.170459747314453,
16.9179630279541,
16.9179630279541,
16.9179630279541,
16.9179630279541,
16.9179630279541,
16.880001068115234,
16.75851821899414,
16.75851821899414,
16.214481353759766,
16.214481353759766,
16.214481353759766,
16.035045623779297,
15.965143203735352,
15.828388214111328,
15.54561710357666,
15.54561710357666,
15.221694946289062,
15.211555480957031,
15.211555480957031,
14.796465873718262,
14.759889602661133,
14.480670928955078,
14.126906394958496,
14.126906394958496,
14.126906394958496,
14.126906394958496,
14.126906394958496,
14.126906394958496,
13.666109085083008,
13.662052154541016,
12.259902000427246
],
"content": [
"Chromebug is the Firebug code adapted for XUL applications .",
"Chromebug works on XUL applications generally and I recently tried it on Thunderbird .",
"It sounds like you re after Chromebug http : blog.getfirebug.com category chromebug .",
"There is actually a dedicated version of Firebug for that called Chromebug http : blog.getfirebug.com 2009 10 12 chromebug-1-5a4 Named after the chrome of Firefox not Google s chrome",
"The problem is Chromebug stops at 1.8.0a2 and Firebug 1.8.0a2 isn t compatible with Thunderbird 9 .",
"I followed the chromebug instructions installed 1.7.2 and then started Thunderbird with the -chromebug flag .",
"Chromebug is geared towards Firefox and was only once made compatible with Thunderbird .",
"What you re looking for is Chromebug http : getfirebug.com wiki index.php Chromebug .",
"I tried with two debugging tools - Chromebug and JavaScript Debugger Venkman .",
"As mentioned in the comments Chromebug is no longer working with current Firefox versions .",
"In Chromebug the file list is empty .",
"Instructions : http : getfirebug.com wiki index.php Chromebug",
"I need to debug my code and installed matching versions of Chromebug and Firebug 1.7.0a7 .",
"I have never worked with Chromebug but you can log to Firefox s error console by using .. . .. . This may help until you get Chromebug running .",
"For more advanced debugging it s worth checking out Chromebug which lets you inspect XUL interfaces and debug extension code and Venkmann which is just a debugger but which I ve found to be much faster than waiting for Chromebug to start up .",
"chromebug unfortunately only works up to firefox-5 . your only bet right now is to open the browser in a tab and inspecting it like so .",
".. . .. . Chromebug has not worked for me for many months .",
"Chrome List https : addons.mozilla.org en-US firefox-addon 4453 and View Source show only the base structure ChromeBug http : getfirebug.com releases chromebug requires restarting the browser and isn t too easy to get working .",
"I ve been to http : getfirebug.com wiki index.php Chromebug User Guide which says that I need to install exactly the same version of Chromebug and Firebug .",
"I m trying to debug my Firefox add-on with Chromebug but I can t see the error trace or log trace .",
"I couldn t get ChromeBug to work when I last tried it .",
"I ve installed Firebug and Chromebug with the same version 1.7.2 But when I execute one of my extension action with error thrower code nothing happened .",
"What do I need to put into my extensions javascript code to get it to output to the chromebug log .",
"I tried Chromebug.Console.log message here and Firebug.Console.log message here and neither output to the chromebug console .",
"Note as I describe there you can get it to work by typing something in the Chromebug console .",
"Use an XUL tool such as XUL Explorer https : developer.mozilla.org en-US docs XUL Explorer .",
"Recent Firebug releases include an excellent log trace component to use when debugging an extension use code like the following .",
"Is there a tool similar to Firebug but for Thunderbird",
"Chromebug reports this for the iframe s contentWindow.history : .. . .. . object does not support history nsIDOMHistory .. . .. . And the script gives this error when its not available : .. . .. . Error : Component returned failure code : 0x80004005 NS ERROR FAILURE nsIDOMHistory.length .. . .. . Any ideas",
"There are efforts to make the Firefox Developer Tools https : hacks.mozilla.org 2012 08 remote-debugging-on-firefox-for-android debugger work with Thunderbird .",
"If I pick a color from firefox bars tabs or anything else of the browser and then go to : .. . .. . ColorZilla Inspect Last Element In Firebug .. . .. . Then I can see the markup css js that firefox uses in the firebug panel just like a website .",
"I m trying to debug my firefox extension in Firebug .",
"One of the extensions has the following structure : .. . .. . components folder .. . content folder .. . platform folder .. . resource folder .. . chrome.manifest .. . install.rdf .. . .. . Unfortunately I can t change the extension s structure and Chromebug doesn t catch JavaScript files in components folder so I can t debug them .",
"You would have to enable the debugging server inside Thunderbird and can then use the Firefox debugger to connect to Thunderbird .",
"Does it have a better debugging tool",
"It is the debugger that Firebug developers use to develop Firebug .",
"Now if i use the view-source functionality of the browser or the firebug tool or chrome bug tool then i will be able to see the text in the DOM .",
"The only other existing tool is Venkman https : developer.mozilla.org en docs Venkman which at least used to work for debugging back in the days of Thunderbird 3.1 .",
"All you need is DOM Inspector https : addons.mozilla.org en-US firefox-addon 6622 and I highly recommend pairing that with Inspect Context https : addons.mozilla.org en-US firefox-addon 3276 which adds an Inspect option to the right-click menu of almost everything much like the Inspect Element option of Firebug .",
"If your extension is for Firebug itself this post on Firebug tracing http : www.softwareishard.com blog firebug tracing-console-for-firebug should be helpful .",
"You can find more information albeit slightly outdated at http : www.softwareishard.com blog firebug tracing-console-for-firebug .",
"It s installed alongside Firebug and it allows you to work with the actual Firefox chrome in addition to just the HTML page .",
"Now with Firebug 1.6.2 console is not defined .",
"Don t forget to ensure that your element is created in the XUL namespace .",
"This is the program we use to debug Firebug .",
"Let s restrict this question to Firebug .",
"How is logging done for firefox extensions",
"Everything seems to work in Firefox and IE .",
"I don t think this tool is still actively developed though .",
"I want to debug some Firefox extensions .",
"This option would make use of the remote support which is currently used for Android Firefox OS .",
"It sounds like you re trying to run it as unprivileged code .",
"I am debugging a FF extension for a client 3500 lines .",
"I remember that I used Firebug s console.debug trace for debugging .",
"Please advise about alternative techniques for debugging FF extensions .",
"I does work for me in Firefox 4 as well as in Thunderbird .",
"Even using a XUL iframe element you have to be careful since none of its properties work again because it is running without chrome privileges .",
"I seem to have a history object attached to the xul browser but an exception is thrown each time I try to use .back or go -1 .",
"I didn t spend any effort to research my claim other than noticing that Application.. . didn t work for me in FF 3.6 but that Firebug did .",
"But why it s better for debugging",
"@SharonHaimPour Aurora Firefox alpha .",
"I m new to both javascript and firefox extension writing so I need a really explicit answer .",
"I m writing a firefox extension that will inspect and modify GET requests from the browser before the page is loaded .",
"Am I doing something wrong or there is no way debug Firefox extensions without any problems",
"I m trying to run a hosted script with content privileges in my Firefox extension .",
"Just use the developer tools configuration settings panel : enable chrome debugging and enable remote debugging .",
"Now you can type in something like window or document.getElementById urlbar and click the inspect button or hit Ctrl+i .",
"I have latest Chrome and Firefox 5 .",
"If you mean how do you inspect html elements in a Panel using Firefox dev tools or Firebug the answer is unfortunately that you cannot do this - those tools do not support panels at this time .",
"I have an address form with select option for list of states .",
"If i key in tab and focus on the state dropdown then key in I it shows Idaho as selected and when I submit form it shows no value selected for state .",
"But if I click on the dropdown and select the state using click submit works fine .",
"This issue is only in chrome it works fine in FF and IE .",
"code example please",
"You can get more info here : mozilla.org en-US firefox channel aurora http : www.mozilla.org en-US firefox channel aurora",
"Have you tried checking the Show Chrome Errors and Show Stack Trace with Errors options in the Console menu of Firebug 1.5",
"When there is error in the code Firebug pauses on the code and I can jump to the code that caused error .",
"So you have to do stuff like iframeElement.boxObject.QueryInterface Components.interfaces.nsIContainerBoxObject .docShell.QueryInterface Components.interfaces.nsIInterfaceRequestor .getInterface Components.interfaces.nsIDOMWindow to retrieve its content window .",
"but it looks like you want to show the value to the user so I don t see the point in hiding it in the page source .",
"In this case you make sure that the PAN CARD NO variable only contains something like xxxxxxx7654 .",
"At this point you will be asked to allow certain access to Facebook information like any other FB Connect option .. . Again you can cancel the registration even after this step .",
"It would be extremely helpful for developing Firefox extensions if I could see the source of e.g . chrome : browser content browser.xul with overlays applied .",
"I know I can use FireBug to get traces for exceptions which happen in content but I don t think it works for chrome does it .",
"When I build a newsletter and send it to myself as a test I would like to be able to analyze the resulting HTML in my email-client Thunderbird .",
"I actually do like the DOM Inspector the Edit - Select Element by Click menu helps a lot with finding information about a particular part of the chrome .",
"2.- Last night I installed console2 an upgrade for the normal error console that can help pretty well with a custom function like : .. . .. . function debug aMsg .. . setTimeout function throw new Error debug + aMsg 0 .. . .. . .. . But Firebug.console.debug is superior .",
"In B you will notice that scaling translates B in x and y direction but in Firefox scaling translates only in x direction .",
"Also notice the rotated C . In Chrome it looks totally ugly but in Firefox this looks fine .",
"Looks like it was fixed between 1.5.2 and 1.6.0 at least in my tests which suggests it was probably fixed by the patch that fixed bugs 8060 http : bugs.jquery.com ticket 8060 and 8500 http : bugs.jquery.com ticket 8500 .",
"It turns out that the hidden window s URL used to be about : blank but this was apparently a security flaw so it is now resource : gre res hiddenWindow.html or resource : gre-resources hiddenWindow.html on trunk so it doesn t have the chrome privileges that a XUL browser element needs in order to be able to wire up its own session history or even to access its own content document .",
"I think it s just been silently abandoned but thankfully on Firefox 19 or later it s possible to use the built-in JS debugger on the browser itself .",
"I m running Thunderbird 9 trying to write my first extension .",
"Does anyone have any suggestions",
"The only correct answer I can give you is it doesn t work .",
"For me personally even that version never worked .",
"As for alternatives there is no really good alternative that will help .",
"This option doesn t yet work but stay tuned .",
"More info here : https : developer.mozilla.org en docs Debugging JavaScript .. . .. . If possible I d suggest using Aurora for your debugging because the built-in debugger was a little limited when first launched and keeps getting better with every release .",
"http : www.w3.org TR 2dcontext dom-context-2d-font .. . .. . For me the rotation and scaling looks the same in chrome firefox though I havent istalled 5.0 yet and opera Except the uglyness that comes from scaling .",
"Using ColorZilla http : www.colorzilla.com I found an interesting feature ."
]
}
|
{
"confidence": [
85.376708984375,
78.87176513671875,
77.69782257080078,
75.57167053222656,
68.79228210449219,
68.77786254882812,
67.60301971435547,
65.52093505859375,
65.2715072631836,
64.13239288330078,
63.087623596191406,
62.1820182800293,
52.822731018066406,
51.107940673828125,
50.14473342895508,
45.749324798583984,
25.515392303466797,
24.818275451660156,
21.039932250976562,
20.339338302612305
],
"content": [
"Question : Using ColorZilla http : www.colorzilla.com I found an interesting feature . If I pick a color from firefox bars tabs or anything else of the browser and then go to : .. . .. . ColorZilla Inspect Last Element In Firebug .. . .. . Then I can see the markup css js that firefox uses in the firebug panel just like a website . enter image description here http : i.stack.imgur.com tUFDO.jpg .. . .. . Is there any solution to view this code without use Colorzilla .. . Answer : It sounds like you re after Chromebug http : blog.getfirebug.com category chromebug . Chromebug is the Firebug code adapted for XUL applications . It is the debugger that Firebug developers use to develop Firebug . So you can debug your debugger you know Instructions : http : getfirebug.com wiki index.php Chromebug Comment : chromebug unfortunately only works up to firefox-5 . your only bet right now is to open the browser in a tab and inspecting it like so . paste this into the address-bar and hit enter : chrome : browser content browser.xul note that some things will be different e.g . some addon buttons won t be there and so on",
"Question : When I build a newsletter and send it to myself as a test I would like to be able to analyze the resulting HTML in my email-client Thunderbird . Is there a tool similar to Firebug but for Thunderbird I found one called DOM Inspector but it is pretty weak and hard to use.. . .. . Answer : Chromebug works on XUL applications generally and I recently tried it on Thunderbird . This is the program we use to debug Firebug . http : getfirebug.com wiki index.php Chromebug User Guide .. . .. . You want the most recent 1.7X.0a build . jjb Comment : Would it be possible to amplify this a bit I followed the chromebug instructions installed 1.7.2 and then started Thunderbird with the -chromebug flag . It started but the OK Let me at it button does nothing and the key menus e.g . filter are inactive . This is TB 1.6.1 on Mac OS X",
"Question : I m running Thunderbird 9 trying to write my first extension . I ve been to http : getfirebug.com wiki index.php Chromebug User Guide which says that I need to install exactly the same version of Chromebug and Firebug . The problem is Chromebug stops at 1.8.0a2 and Firebug 1.8.0a2 isn t compatible with Thunderbird 9 . Does anyone have any suggestions .. . Answer : The only correct answer I can give you is it doesn t work . Chromebug is geared towards Firefox and was only once made compatible with Thunderbird . For me personally even that version never worked . As for alternatives there is no really good alternative that will help . The only other existing tool is Venkman https : developer.mozilla.org en docs Venkman which at least used to work for debugging back in the days of Thunderbird 3.1 . I don t think this tool is still actively developed though . There are efforts to make the Firefox Developer Tools https : hacks.mozilla.org 2012 08 remote-debugging-on-firefox-for-android debugger work with Thunderbird . This option would make use of the remote support which is currently used for Android Firefox OS . You would have to enable the debugging server inside Thunderbird and can then use the Firefox debugger to connect to Thunderbird . This option doesn t yet work but stay tuned .",
"Question : null .. . Answer : I want to debug some Firefox extensions . I tried with two debugging tools - Chromebug and JavaScript Debugger Venkman . One of the extensions has the following structure : .. . .. . components folder .. . content folder .. . platform folder .. . resource folder .. . chrome.manifest .. . install.rdf .. . .. . Unfortunately I can t change the extension s structure and Chromebug doesn t catch JavaScript files in components folder so I can t debug them . For my bad luck JavaScript Debugger doesn t work as I expected and it stops on files which don t have any breakpoints so most of the time it s impossible to debug my files . Am I doing something wrong or there is no way debug Firefox extensions without any problems Comment : Use an XUL tool such as XUL Explorer https : developer.mozilla.org en-US docs XUL Explorer .",
"Question : Using ColorZilla http : www.colorzilla.com I found an interesting feature . If I pick a color from firefox bars tabs or anything else of the browser and then go to : .. . .. . ColorZilla Inspect Last Element In Firebug .. . .. . Then I can see the markup css js that firefox uses in the firebug panel just like a website . enter image description here http : i.stack.imgur.com tUFDO.jpg .. . .. . Is there any solution to view this code without use Colorzilla .. . Answer : There is actually a dedicated version of Firebug for that called Chromebug http : blog.getfirebug.com 2009 10 12 chromebug-1-5a4 Named after the chrome of Firefox not Google s chrome",
"Question : I m new to both javascript and firefox extension writing so I need a really explicit answer . I m writing a firefox extension that will inspect and modify GET requests from the browser before the page is loaded . I need to debug my code and installed matching versions of Chromebug and Firebug 1.7.0a7 . What do I need to put into my extensions javascript code to get it to output to the chromebug log . I tried Chromebug.Console.log message here and Firebug.Console.log message here and neither output to the chromebug console . How is logging done for firefox extensions .. . Answer : I have never worked with Chromebug but you can log to Firefox s error console by using .. . .. . This may help until you get Chromebug running . In addition there s Venkman the Javascript debugger . Comment : That should be Firebug.console.log I m a log message Application.. . doesn t work for me at least . Comment : I does work for me in Firefox 4 as well as in Thunderbird . It is a published API developer.mozilla.org en Toolkit API FUEL https : developer.mozilla.org en Toolkit API FUEL . Comment : I didn t spend any effort to research my claim other than noticing that Application.. . didn t work for me in FF 3.6 but that Firebug did . Perhaps I ve been premature in my comment and for that I apologize .",
"Question : I m new to both javascript and firefox extension writing so I need a really explicit answer . I m writing a firefox extension that will inspect and modify GET requests from the browser before the page is loaded . I need to debug my code and installed matching versions of Chromebug and Firebug 1.7.0a7 . What do I need to put into my extensions javascript code to get it to output to the chromebug log . I tried Chromebug.Console.log message here and Firebug.Console.log message here and neither output to the chromebug console . How is logging done for firefox extensions .. . Answer : I can t figure it out either . I created an issue at http : code.google.com p fbug issues detail id 4256 . Maybe vote for it there . Note as I describe there you can get it to work by typing something in the Chromebug console . Another alternative is to use FBTrace http : getfirebug.com wiki index.php FBTrace . but getting console figured out would be better :",
"Question : I am debugging a FF extension for a client 3500 lines . I have a separated development profile with just firebug extension developer extensions to work . 1.- I had developed a couple of extensions for FF some time in the previous 2 years . I remember that I used Firebug s console.debug trace for debugging . Now with Firebug 1.6.2 console is not defined . Any advise to fix this 2.- Last night I installed console2 an upgrade for the normal error console that can help pretty well with a custom function like : .. . .. . function debug aMsg .. . setTimeout function throw new Error debug + aMsg 0 .. . .. . .. . But Firebug.console.debug is superior . Please advise about alternative techniques for debugging FF extensions . .. . Answer : Recent Firebug releases include an excellent log trace component to use when debugging an extension use code like the following . To enable this logging create a preference using about : config for extensions.myextension.DBG MINE set to true . You can find more information albeit slightly outdated at http : www.softwareishard.com blog firebug tracing-console-for-firebug . For more advanced debugging it s worth checking out Chromebug which lets you inspect XUL interfaces and debug extension code and Venkmann which is just a debugger but which I ve found to be much faster than waiting for Chromebug to start up . Comment : Thanks.. . I have this error : Error : Permission denied for somedomain gt http : somedomain gt to get property XPCComponents.utils Besides I am studying Venckman too.. . Comment : It sounds like you re trying to run it as unprivileged code . Components.utils.import will only work if run privileged as part of an extension . How are you loading running your code Comment : thanks . This is a good tipo in any case",
"Question : I m new to both javascript and firefox extension writing so I need a really explicit answer . I m writing a firefox extension that will inspect and modify GET requests from the browser before the page is loaded . I need to debug my code and installed matching versions of Chromebug and Firebug 1.7.0a7 . What do I need to put into my extensions javascript code to get it to output to the chromebug log . I tried Chromebug.Console.log message here and Firebug.Console.log message here and neither output to the chromebug console . How is logging done for firefox extensions .. . Answer : This may have been solved . For anyone interested.. . As far as I can tell after 1.7.2 console.log works just fine .",
"Question : I m trying to debug my firefox extension in Firebug . When there is error in the code Firebug pauses on the code and I can jump to the code that caused error . The problem is when I want to set breakpoint in the code and trace it it should theoretically be possible but I can t find it . Let s restrict this question to Firebug . I m not satisfied with Venkman and solve it elsewhere . thank you for help .. . Answer : What you re looking for is Chromebug http : getfirebug.com wiki index.php Chromebug . It s installed alongside Firebug and it allows you to work with the actual Firefox chrome in addition to just the HTML page .",
"Question : I m trying to debug my Firefox add-on with Chromebug but I can t see the error trace or log trace . I ve configured a dedicated profile and set about : config parameters according to this Mozilla tutorial https : developer.mozilla.org en Setting up extension development-environment . I ve installed Firebug and Chromebug with the same version 1.7.2 But when I execute one of my extension action with error thrower code nothing happened . No log no trace . In Chromebug the file list is empty . I read in multiple discussions on the web that I should see a list of debuggable scripts . A screenshot of my environment : .. . .. . screenshot of my environment http : i.stack.imgur.com jRWbjl.png .. . .. . What else must I do .. . Answer : Update April 2014 : The browser debugger is now integrated in the Browser Toolbox and you no longer need to set about : config prefs . Just use the developer tools configuration settings panel : enable chrome debugging and enable remote debugging . The Browser Toolbox will then be available in the developer tools panel . .. . .. . Chromebug has not worked for me for many months . I think it s just been silently abandoned but thankfully on Firefox 19 or later it s possible to use the built-in JS debugger on the browser itself . Go to about : config and set the following two prefs : .. . .. . After you restart the browser the Web Developer menu will contain a Browser Debugger entry . More info here : https : developer.mozilla.org en docs Debugging JavaScript .. . .. . If possible I d suggest using Aurora for your debugging because the built-in debugger was a little limited when first launched and keeps getting better with every release . Comment : It s perfect Thank s Comment : what s the difference between Aurora and FF Why Aurora is better Comment : @SharonHaimPour Aurora Firefox alpha . Every six weeks a new Aurora version is released the previous Aurora version moves to beta and the previous beta version is delivered to all stable users . You can get more info here : mozilla.org en-US firefox channel aurora http : www.mozilla.org en-US firefox channel aurora Comment : But why it s better for debugging Does it have a better debugging tool Comment : @SharonHaimPour Yes in every new release it s becoming better and with more features .",
"Question : It would be extremely helpful for developing Firefox extensions if I could see the source of e.g . chrome : browser content browser.xul with overlays applied . Is there a way to do this Chrome List https : addons.mozilla.org en-US firefox-addon 4453 and View Source show only the base structure ChromeBug http : getfirebug.com releases chromebug requires restarting the browser and isn t too easy to get working . Comment : Does the DOM inspector not show the overlays applied .. . Answer : All you need is DOM Inspector https : addons.mozilla.org en-US firefox-addon 6622 and I highly recommend pairing that with Inspect Context https : addons.mozilla.org en-US firefox-addon 3276 which adds an Inspect option to the right-click menu of almost everything much like the Inspect Element option of Firebug .",
"Question : Using ColorZilla http : www.colorzilla.com I found an interesting feature . If I pick a color from firefox bars tabs or anything else of the browser and then go to : .. . .. . ColorZilla Inspect Last Element In Firebug .. . .. . Then I can see the markup css js that firefox uses in the firebug panel just like a website . enter image description here http : i.stack.imgur.com tUFDO.jpg .. . .. . Is there any solution to view this code without use Colorzilla .. . Answer : As mentioned in the comments Chromebug is no longer working with current Firefox versions . Instead of opening the limited chrome : browser content browser.xul page you can make the browser chrome accessible to the scratchpad . Open the about : config page and set devtools.chrome.enabled to true as described in the extension development-environment setup https : developer.mozilla.org en-US docs Setting up extension development-environment guide on MDN . Open the JavaScript scratchpad Shift+F4 and select the browser context environment . Now you can type in something like window or document.getElementById urlbar and click the inspect button or hit Ctrl+i . This will evaluate the expression and open the element inspector which shows all properties of the element .",
"Question : I m trying to run a hosted script with content privileges in my Firefox extension . To do this I create a content iframe in the hidden window pointed at a html file that pulls the script . This script requires the history be available but the iframes created in the hidden window have no history for some reason . Chromebug reports this for the iframe s contentWindow.history : .. . .. . object does not support history nsIDOMHistory .. . .. . And the script gives this error when its not available : .. . .. . Error : Component returned failure code : 0x80004005 NS ERROR FAILURE nsIDOMHistory.length .. . .. . Any ideas .. . Answer : A browser type content will automatically wire up session history by default while an iframe type content will not but you could always wire it up yourself manually . Don t forget to ensure that your element is created in the XUL namespace . I believe the hidden window is the about : blank HTML document except on the Mac . Comment : I ve tried this with the same result . Here was the code I used for that where doc is the hidden window s document . var browser doc.createElementNS XUL NS URI browser browser.setAttribute type content browser.setAttribute disablehistory false browser.setAttribute src url doc.documentElement.appendChild browser Comment : I seem to have a history object attached to the xul browser but an exception is thrown each time I try to use .back or go -1 . Do you have any idea what could be causing it",
"Question : Is there a convenient way to do this for my extension I know I can use FireBug to get traces for exceptions which happen in content but I don t think it works for chrome does it . I couldn t get ChromeBug to work when I last tried it . .. . Answer : Have you tried checking the Show Chrome Errors and Show Stack Trace with Errors options in the Console menu of Firebug 1.5 They might be in earlier versions too . If your extension is for Firebug itself this post on Firebug tracing http : www.softwareishard.com blog firebug tracing-console-for-firebug should be helpful .",
"Question : I m trying to run a hosted script with content privileges in my Firefox extension . To do this I create a content iframe in the hidden window pointed at a html file that pulls the script . This script requires the history be available but the iframes created in the hidden window have no history for some reason . Chromebug reports this for the iframe s contentWindow.history : .. . .. . object does not support history nsIDOMHistory .. . .. . And the script gives this error when its not available : .. . .. . Error : Component returned failure code : 0x80004005 NS ERROR FAILURE nsIDOMHistory.length .. . .. . Any ideas .. . Answer : It turns out that the hidden window s URL used to be about : blank but this was apparently a security flaw so it is now resource : gre res hiddenWindow.html or resource : gre-resources hiddenWindow.html on trunk so it doesn t have the chrome privileges that a XUL browser element needs in order to be able to wire up its own session history or even to access its own content document . Even using a XUL iframe element you have to be careful since none of its properties work again because it is running without chrome privileges . So you have to do stuff like iframeElement.boxObject.QueryInterface Components.interfaces.nsIContainerBoxObject .docShell.QueryInterface Components.interfaces.nsIInterfaceRequestor .getInterface Components.interfaces.nsIDOMWindow to retrieve its content window . Comment : Trying to edit in an update to my post but stack-overflow is giving errors when I try . You re right about the hidden window . My extension has a chrome iframe in the hidden window used as a singleton js context . I can embed the browser there and wire in the sessionHistory manually . It works Thank you .",
"Question : When I build a newsletter and send it to myself as a test I would like to be able to analyze the resulting HTML in my email-client Thunderbird . Is there a tool similar to Firebug but for Thunderbird I found one called DOM Inspector but it is pretty weak and hard to use.. . .. . Answer : The closest I know is Venkman the Javascript Debugger http : www.mozilla.org projects venkman . I actually do like the DOM Inspector the Edit - Select Element by Click menu helps a lot with finding information about a particular part of the chrome .",
"Question : I m trying to debug my firefox extension in Firebug . When there is error in the code Firebug pauses on the code and I can jump to the code that caused error . The problem is when I want to set breakpoint in the code and trace it it should theoretically be possible but I can t find it . Let s restrict this question to Firebug . I m not satisfied with Venkman and solve it elsewhere . thank you for help .. . Answer : Go to the Script window and choose the script and set a breakpoint by clicking just to the left of the line number of the chosen script Comment : The problem is in choose the script . I can see only scripts from the page not scripts from my extension .",
"Question : How do you debug panel s https : addons.mozilla.org en-US developers docs sdk 1.4 packages addon-kit docs panel.html html .. . Answer : If you mean how do you inspect html elements in a Panel using Firefox dev tools or Firebug the answer is unfortunately that you cannot do this - those tools do not support panels at this time .",
"Question : I have a simple Pan card no : xxxxxxx7654 which i am showing using jsp in the browser . Now if i use the view-source functionality of the browser or the firebug tool or chrome bug tool then i will be able to see the text in the DOM . Now I want to get the text displayed in browser but want to hide it from prying eyes of people who will be using fire bug chrome bug or View Source of a browser . The field name is PAN CARD NO . I display it using : p id My Pan My Pan is : PAN CARD NO p .. . .. . Now this brings the value in the browser which is nice and dandy but i don t want it to be shown using fire bug or chrome bug or view-source . Does any body have any suggestions as to how it can be done Comment : Best you could do is encrypt the value . but it looks like you want to show the value to the user so I don t see the point in hiding it in the page source . Comment : Can t be done once it s in the DOM it will be visible best you can do is somwhow obfuscate it use SSL etc . Comment : @People Who Downvoted It : I don t see why you guys randomly down vote a question without having the decency of explaining the reason of having done that . I think it s a pretty important question . Read the stack rules . Comment : @adeneo : Can give me a few pointers as to how i can obfuscate it using SSL . Some examples perhaps.. . Comment : @TheDarkKnight It might help if you could explain why you want to do this . .. . Answer : The source of the page is what is delivered to the browser to be rendered . Because of that anything that you want to present to the end user in the browser will be visible in some way in the source code . There are no work-arounds here . If it is displayed in the browser the end user has access to it in one way or another . If your goal is to not show the whole PAN card number that should be done on the server-side before it s delivered to the browser . In this case you make sure that the PAN CARD NO variable only contains something like xxxxxxx7654 . With this method full PAN card number is never delivered to the end user . If your goal is to prevent unauthorized users from viewing the PAN card number then you need to make sure that you only deliver the card number for the authenticated user . This will require you to have the user authenticate themselves to the server in some way e.g . logging in ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
thunderbird
|
UNK_RELATION
|
redis-cluster@redis@127
|
redis-cluster -- redis-cluster provides a way to run a redis installation where data is automatically sharded across multiple @placeholder nodes .
|
{
"confidence": [
80.35041809082031,
80.35041809082031,
73.75733184814453,
68.31009674072266,
68.31009674072266,
67.85260009765625,
67.7231674194336,
66.83063507080078,
66.83063507080078,
66.83063507080078,
65.0689468383789,
64.44232177734375,
63.70537567138672,
63.44000244140625,
63.44000244140625,
63.44000244140625,
63.050071716308594,
62.97743606567383,
62.225914001464844,
62.11726379394531,
62.01255416870117,
61.88954544067383,
61.568565368652344,
61.56193923950195,
60.22665786743164,
60.22665786743164,
60.17974090576172,
59.88716125488281,
59.88716125488281,
59.39164352416992,
58.97987365722656,
58.640296936035156,
58.58988571166992,
58.537132263183594,
58.40769958496094,
57.333953857421875,
56.634521484375,
56.62126159667969,
56.62126159667969,
55.845237731933594,
54.715171813964844,
54.715171813964844,
54.715171813964844,
54.70503234863281,
54.600303649902344,
54.29188537597656,
54.29188537597656,
54.0622444152832,
53.85292053222656,
53.68682098388672,
53.67784118652344,
53.45722198486328,
53.26957702636719,
53.23571014404297,
53.23571014404297,
53.23571014404297,
53.19859313964844,
53.16471481323242,
53.13982009887695,
53.07880401611328,
52.420509338378906,
52.191349029541016,
52.191349029541016,
52.14900588989258,
52.14900588989258,
51.97937774658203,
51.97937774658203,
51.519046783447266,
51.46253204345703,
51.46253204345703,
51.28860092163086,
51.28860092163086,
51.1083869934082,
50.89811706542969,
50.89811706542969,
50.514198303222656,
50.42042541503906,
49.91207504272461,
49.91207504272461,
49.41865539550781,
49.382511138916016,
49.382511138916016,
49.253326416015625,
49.10394287109375,
49.08500671386719,
49.05072784423828,
48.94118881225586,
48.68046569824219,
48.10128402709961,
47.93691635131836,
47.748531341552734,
47.748531341552734,
47.748531341552734,
47.748531341552734,
47.748531341552734,
47.748531341552734,
47.748531341552734,
47.748531341552734,
47.748531341552734,
47.748531341552734
],
"content": [
"A redis-cluster comprising of 5 nodes .",
"What s the output by a cluster nodes to that Redis",
"I was trying to build a redis-cluster with these 6 nodes .",
"So a Redis cluster is not really password-protected when individual nodes are .",
"I have a redis-cluster of three master nodes and three slaves .",
"So having a password on individual Redis nodes in a Redis cluster adds little security value .",
"Then I have the different redis.conf files in these folders : tmp redis-cluster 7000 tmp redis-cluster 7001 tmp redis-cluster 7002 tmp redis-cluster 7003 tmp redis-cluster 7004 tmp redis-cluster 7005 .",
"We also have an empty Redis Cluster with 6 nodes .",
"The output : .. . .. . Output of redis-cli -h 192.168.1.20 -p 30001 cluster nodes :",
"What s the output of a redis-cli -h 192.168.1.20 -p 30001 cluster nodes",
"I have a Redis Cluster .",
"Multiple databases database numbers are not supported with Redis Cluster .",
"The end game is to implement this on Redis Cluster .",
"with the Redis Cluster Specification and can only be used with Redis traditional unclustered mode .",
"I have the redis-server in a folder tmp redis-cluster .",
"The default redis client from ycsb does not support redis-cluster .",
"I create a redis-cluster use redis-trib create commond I have a few questions about redis-cluster : .. . .. . 1 . can redis-trib explicitly set which host is master and which host is slave",
"We have enabled all notifications on all redis nodes in the cluster .",
"That s not how Redis Cluster works .",
"I have installed redis-cluster 3.0.0 .",
"Redis Cluster handles failover itself without Sentinel so you don t need to use Sentinel via Redis Cluster .",
"redis-trib.rb cannot handle Redis nodes which are password-protected .",
"Every node in a Redis Cluster is responsible for a subset of the hash slots so for example we have a cluster with 3 nodes where : .. . 1 .",
"You need Redis 3.0.0 beta to run Cluster .",
"Then I run each server with these commands tmp redis-cluster redis-server . 7000 redis.conf etc .",
"You should run the instances like this : cd tmp redis-cluster 7000 . . redis-server . redis.conf .",
"It seems that some Redis nodes consider other Redis nodes are connected via the docker0 IP .",
"We are planning to have the following configuration of redis-cluster .",
"So I am testing out the redis-cluster .",
"Assuming you have the redis-server on tmp redis-cluster and the redis.conf on each tmp redis-cluster 700x folder : .. . .. . This way the nodes.conf will be generated on the current folder 7000 .",
"I have built my Redis cluster using three master nodes and I have another node for running ycsb .",
"If the Redis cluster has nodes closer to Alabama say in Georgia it will now fail over to those automatically .",
"You can t use Twemproxy and Redis Cluster together because they both try to shed keys across a cluster .",
"To fix it try to send cluster meet with the right IP to each Redis in the cluster .",
"I started Redis cluster on PC1 then connected it on PC2 .",
"redis-trib.rb is a ruby utility script that antirez lead redis developer built as a reference implementation of building administrative tools on top of the basic redis-cluster commands .",
"We have a cluster configuration for Redis used as cache .",
"Added more details in the question we are looking for solution using redis-cluster not just a single redis instance",
"What are the advantages to using Redis Cluster over just using regular Redis and creating shards",
"More details please refer to the following issue and discussion : .. . .. . Issue : Pipelining with redis-cluster throws exception 267 https : github.com nrk predis issues 267 .. . Discussion : Redis Cluster with Pipeline https : groups.google.com forum msg redis-db 4I0ELYnf3bk Lrctk0ULm6AJ .. . .. . The Conclusion is : do not use pipeline under redis-cluster .",
"I am trying to implement a Redis cluster with 6 machine .",
"I have configured a redis-cluster with 3 masters and 1 replica each .",
"The cluster would be fixed after you restart the failed Redis .",
"Here it is : https : github.com HunanTV redis-ctl .. . .. . It can create clusters make Redis join in or exit from the cluster or migrates slots between the nodes via HTML forms .",
"I am following this tutorial to create a Redis cluster : .. . .. . http : redis.io topics cluster-tutorial .. . .. . In this tutorial I need to run several redis-server instances on port 7000 through 7005 .",
"Our project is in need of a GUI tool for monitoring and managing a Redis cluster .",
"I m Redsmin founder and we are currently working on the integration Redis Cluster support",
"Additionally there s an example project for Redis Cluster available on github in the spring-data-examples https : github.com spring-projects spring-data-examples tree master redis-cluster repository as well as in the reference documentation http : docs.spring.io spring-data redis docs 1.7.0.M1 reference html cluster .",
"Output of above command .. . .. . If i run same code on memcache output is below .. . .. . Using only redis without cluster sentinel .. . .. . Redis with sentinel",
"Greetings overflowers .. . .. . In Redis sentinel cluster setup can we use the WAIT command with the total number of slaves to ensure strong consistency across the Redis servers",
"From the Redis Cluster Spec http : redis.io topics cluster-spec keys-hash-tags : .. . .. . Redis Cluster implements a concept called hash tags that can be used in order to force certain keys to be stored in the same node .",
"I m connecting to a redis-cluster node using .. . .. . redis-cli -c -p 7001 .. . .. . When I issue info command or dbsize command I get the count of keys that only reside on that node and not the count of all the keys across all the nodes in my cluster .",
"I cannot reshard the cluster to move these hash slots as . redis-trib.rb reshard fails with ERR Not all ClusterHashSlots slots are covered by nodes . .",
"Sending cluster meet commands via redis-cli will do .",
"This is used in order to implement multi-key operations in Redis Cluster .",
"However to my understanding we cant mix Redis cluster with Sentinel",
"I am running a Redis Cluster of 48 instances spread across 6 physical servers .",
"Why the redis-trib.rb utility does not handle authenticated nodes",
"UPD : To connect to redis-cluster you may use another adopter with cluster support .",
"The spring-data-examples repository https : github.com spring-projects spring-data-examples tree master redis-cluster already contains an example of Spring Data Redis cluster support .",
"What would be the best way to move all that data from the stand-alone instance to the Redis Cluster and make it distribute it evenly",
"So to benchmark redis-cluster using ycsb we must mordify redis client RedisClient.java and re-comiple the code using maven .",
"Apparently the redis gem was setting the password from that url for ALL redis connections even though I was not using the url for my cluster .",
"A Redis Cluster http : redis.io topics cluster-tutorial deployment is not the same than a number of standard Redis instances protected by Sentinel http : redis.io topics sentinel .",
"Here you were trying to use the Redis Cluster API resulting in this error cluster related commands are not activated for standard Redis instances .",
"Now I want to use twemproxy https : github.com twitter twemproxy on Redis cluster so I have used the below lines see below as my config file and implemented twemproxy with Redis cluster .",
"I encounter the same problem as described in To start YCSB load with cluster enabled option for REDIS http : stackoverflow.com questions 26793976 to-start-ycsb-load-with-cluster-enabled-option-for-redis .",
"The 3.0 cluster ensure the data-migration by introducing the hash slots and when you migrate out a whole slot the Redis cluster ensures that no keys are left .",
"I have 3 VPS using for making HA Redis cluster .",
"I have my Redis cluster set up successfully .",
"What version of Redis are you running should be 3+ and have you configured the Redis cluster properly",
"The click-to-deploy option of GCE deploys a number of standard Redis instances protected by Sentinel not Redis Cluster .",
"i m trying to play with redis and newbie about redis .",
"How much total data I would be able to handle on this Redis cluster with three masters and three slaves",
"It seems to me like Redis Cluster is more about data safety having the master-slave architecture account for failures .",
"I have a vagrant cluster of six machines : .. . .. . all running redis-server .. . .. . I edited etc redis redis.conf file of all the above servers adding this .. . .. . I then ran this on one of the six machines .. . .. . A Redis cluster is up and running .",
"Redis cluster does its own failover hence Sentinel is unneeded when operating in cluster mode : http : redis.io topics cluster-spec availability",
"This tutorial is only for two nodes and does not reference redis-trib.rb .. .",
"I am trying to add slave nodes to redis master .",
"You can read about it here : https : fnordig.de 2014 03 11 redis-cluster-with-pre-existing-data",
"We are using spring-session to store user sessions in redis-cluster .",
"However it seems redis-cluster does not publish events properly .",
"Generally a hash strategy is used to evenly shard the data among several Redis servers as both Redis 3.0 cluster and twemproxy https : github.com twitter twemproxy do .",
"It s possible that different nodes in a cluster have different maxmemory and serve different numbers of slots .. . .. . .. . .. . More details about 1 : .. . .. . First choose your master instances use redis-trib.rb create without --replicas .",
"I google it and found two solution : .. . .. . 1.CLUSTER FORGET http : redis.io commands cluster-forget .. . .. . 2.redis-trib.rb del-node .. . .. . I think CLUSTER FORGET is the right way to do .",
"https : github.com antirez redis blob unstable src redis-trib.rb L1374 .. . .. . Redis-trib is a lot friendlier to work with .",
"The replication process in Redis is performed by Sentinel or Redis Cluster and is not able to provide property 2 since the synchronous replication in Redis is the exception not the rule so there was no much focus on that aspect .",
"You are supposed to assign the roles one by one or write a script by yourself to properly send cluster addslots http : redis.io commands cluster-addslots cluster meet http : redis.io commands cluster-meet and cluster replicate http : redis.io commands cluster-replicate commands to the right Redis .. . 2 .",
"Can you please tell me how can I configure my Redis to run in Cluster mode without that script",
"I want setup redis-cluster with 6 nodes node1 node2 node3 node4 node5 node6 which has 3 masters and 3 slaves .",
"I have a 3 master 3 slave Redis cluster running on a single Ubuntu 14 04 machine .",
"I have initially formed a Redis cluster with 3 masters and 3 slaves in my local machine .",
"I am under the assumption that redis handles all those things and I need not worry about it after deploying the cluster .",
"But we don t know how to set up sails to connect to a redis-cluster any thoughts examples available",
"Details from this question http : stackoverflow.com questions 32088363 connection-to-redis-cluster-failed may help you as well .",
"Did anyone succeed in editing RedisClient.java for testing redis-cluster or do we have other solutions Thanks",
"I am using this .. . .. . But it only gives keys from only one of the redis-cluster .",
"Under the hood redis-trib uses CLUSTER FORGET to implement it s own administrative del-node command .",
"I am using redis 3.0.6 4 node-cluster and redisson version 2.2.5 .",
"However if I am using redis-cluster as a cache I would like these hash slots to be served by some other node ."
]
}
|
{
"confidence": [
91.06859588623047,
88.99223327636719,
88.65103149414062,
87.70977783203125,
85.88040161132812,
85.5688247680664,
85.567626953125,
83.95005798339844,
83.14727783203125,
83.1433334350586,
82.26406860351562,
82.03179168701172,
81.99868774414062,
81.874267578125,
81.72967529296875,
81.39485168457031,
81.07775115966797,
78.58033752441406,
77.74752044677734,
76.27728271484375
],
"content": [
"Question : null .. . Answer : i m trying to play with redis and newbie about redis . Redis Cluster design says that it does not use consistent-hashing but a different form of sharding where every key is conceptually part of what is called as hash slot . There are 16384 hash slots in Redis Cluster and to compute what is the hash slot of a given key we simply take the CRC16 of the key modulo 16384 . Every node in a Redis Cluster is responsible for a subset of the hash slots so for example we have a cluster with 3 nodes where : .. . 1 . Node A contains hash slots from 0 to 5500 . 2 . Node B contains hash slots from 5501 to 11000 . 3 . Node C contains hash slots from 11001 to 16383 . .. . i ve few question regarding this type of sharding : .. . 1 . what will happen if i ve a cluster with more than 16384 masters there will be some masters without any slot means without any data 2 . The slot distribution in the above three nodes cluster is default i means the slots are equally distributed among the N nodes if i start a cluster with N nodes 3 . As slot is identified based on CRC16 key 16384 there is a possibility that some nodes will contain all data and other nodes may remain empty There is any way for equal or almost equal distribution of data among the cluster s nodes",
"Question : I have all my Redis servers configured like this : .. . .. . Masters : 192.168.0.106 : 7001 192.168.0.105.7001 192.168.0.112 : 7001 .. . .. . Slaves : 192.168.0.106 : 7002 192.168.0.105 : 7002 192.168.0.122 : 7002 .. . .. . Where the 192.168.0.106 : 7002 server is a slave of the 192.168.0.106 : 7001 server and so on . I have all servers up ana running and can do redis-cli to all of them . I can see the 17001 and 17002 ports open too . But when I run : .. . .. . . redis-trib.rb create --replicas 1 192.168.0.106 : 7001 192.168.0.105 : 7001 192.168.0.112 : 7001 192.168.0.106 : 7002 192.168.0.105 : 7002 192.1268.0.112 : 7002 .. . .. . I get an error : .. . .. . Creating cluster .. . .. . ERR Sorry can t connect to node 192.168.0.106 : 7001 .. . .. . I have no idea how to troubleshoot this when all servers are working and their ports are open One thing is that I do have the masters protected with a password . Maybe redis-trib.rb is not able to handle servers which are password protected Comment : did you try without password try to communicate to 192.168.0.106 : 7001 from other nodes any port blocking issue Comment : It was the authorization that was preventing the redis-trib.rb from connecting . It turns our that this utility does not handle password-protected redis servers . .. . Answer : redis-trib.rb cannot handle Redis nodes which are password-protected . So trying to use it on such nodes would result in ERR Sorry can t connect to node . Why the redis-trib.rb utility does not handle authenticated nodes It has to do with the fact that when a Redis node is password protected only the communication on its main port by default 6379 is protected . The communication on its cluster bus Default Port + 10000 16379 where nodes in a cluster communicated with each other is not protected . So a Redis cluster is not really password-protected when individual nodes are . So having a password on individual Redis nodes in a Redis cluster adds little security value . Therefore the redis-trib.rb utility has not implemented any authentication . More information here : .. . .. . https : groups.google.com forum topic redis-db Z8lMxTfDct8",
"Question : We have a single Redis instance with a good amount of data over 100GB . We also have an empty Redis Cluster with 6 nodes . What would be the best way to move all that data from the stand-alone instance to the Redis Cluster and make it distribute it evenly Comment : and make it distribute it evenly You can t do that as the keyspace is not guaranteed to be evenly distributed . Comment : You re right . In this case splitting up the nodes into equal number of slots would be sufficient . .. . Answer : After some searching around I came across a post detailing how to move data over to a cluster . It may take some time to move lots of data over but this is the best way I ve seen so far . You can read about it here : https : fnordig.de 2014 03 11 redis-cluster-with-pre-existing-data",
"Question : I have a Redis Cluster . I am using JedisCluster client to connect to my Redis . My application is a bit complex and I want to basically control to which partition data from my application goes . For example my application consists of sub-module A B C . Then I want that all data from sub-module A should go to partition 1 for example . Similarly data from sub-module B should go to partition 2 for example and so on . I am using JedisCluster but I don t find any API to write to a particular partition on my cluster . I am assuming I will have same partition names on all my Redis nodes and handling which data goes to which node will be automatically handled but to which partition will be handled by me . I tried going through the JedisCluster lib at .. . .. . https : github.com xetorthio jedis blob b03d4231f4412c67063e356a7c3acf9bb7e62534 src main java redis clients jedis JedisCluster.java .. . .. . but couldn t find anything . Please help Thanks in advance for the help . .. . Answer : That s not how Redis Cluster works . With Redis Cluster each node partition has a defined set of keys slots that it s handling . Writing a key to a master node which is not served by the master results in rejection of the command . From the Redis Cluster Spec http : redis.io topics cluster-spec keys-hash-tags : .. . .. . Redis Cluster implements a concept called hash tags that can be used in order to force certain keys to be stored in the same node . .. . .. . .. . .. . The key space is split into 16384 slots effectively setting an upper limit for the cluster size of 16384 master nodes however the suggested max size of nodes is in the order of 1000 nodes . Each master node in a cluster handles a subset of the 16384 hash slots . You need to define at Cluster configuration-level which master node is exclusively serving a particular slot or a set of slots . The configuration results in data locality . The slot is calculated from the key . The good news is that you can enforce a particular slot for a key by using Key hash tags http : redis.io topics cluster-spec keys-hash-tags : .. . .. . There is an exception for the computation of the hash slot that is used in order to implement hash tags . Hash tags are a way to ensure that multiple keys are allocated in the same hash slot . This is used in order to implement multi-key operations in Redis Cluster . Example : .. . .. . The content between is used to calculate the slot . Key hash tags allow you to group keys on particular nodes and enforce the same data locality when using arbitrary hash tags . You can also go a step further by using known hash tags that map to slots you d need either precalculate a table or see this Gist https : gist.github.com mp911de 5f9890496faca01b0ff9 . By using known hash tags that map to a specific slot you re able to select the slot and so the master node on which the data is located . Everything else is handled by your Redis client . Comment : Thanks for the update . Will definitely try using it . Comment : I was going through redis and jedis documentation . There is one more thing called JedisFactory which allows me to set a database index . Will this database index serve the same purpose I have provided link for the same - github.com xetorthio jedis blob https : github.com xetorthio jedis blob b03d4231f4412c67063e356a7c3acf9bb7e62534 src main java redis clients jedis JedisFactory.java Comment : Multiple databases database numbers are not supported with Redis Cluster .",
"Question : I started Redis cluster on PC1 then connected it on PC2 . When needed to redirect to another cluster node it shows Redirected to slot 7785 located at 127.0.0.1 but should show Redirected to slot 7785 located at IP of PC1 like 192.168.1.20 then it shows an error . What is happening What can I do The output : .. . .. . Output of redis-cli -h 192.168.1.20 -p 30001 cluster nodes : Comment : What s the output of a redis-cli -h 192.168.1.20 -p 30001 cluster nodes Comment : @neuront Let me see it tomorrow on my work computer thanks for your attention Comment : @neuront Hey man I added the output of your needs in question description.Seems no problem about the cluster nodes . .. . Answer : That is because all your Redis IP addresses have updated to 127.0.0.1 and they believe other Redis are located in 127.0.0.1 too . That s not wrong if nodes in a cluster just communicate with each other but definitely improper when a connection from other host want to know about the cluster . In that situation your client asked a Redis for a key it s not in charge and the Redis told the client to redirect to 127.0.0.1 : 30003 . The client misunderstood it and tried to connect the port 30003 in its localhost and certainly found nothing . To fix it try to send cluster meet with the right IP to each Redis in the cluster . I ve made an experiment like this .. . .. . In your case you may send multiple cluster meet commands to each Redis to ensure its IP updated at all its peers . Comment : I think so . But in product server how can I do this It should has configure to set is t it Comment : I use the official redis-trib.rb file to create the cluster maybe it s the reason The command is : redis-trib.rb create --replicas 1 127.0.0.1 : 30001 127.0.0.1 : 30002 127.0.0.1 : 30003 127.0.0.1 : 30004 127.0.0.1 : 30005 127.0.0.1 : 30006 is here should be 192.168.1.20 not be 127.0.0.1 Comment : @RobinChen No the nodes list is a dynamic config stored in the file specified by cluster-config-file . But you don t have to edit it manually or restart any of the redis-servers . Sending cluster meet commands via redis-cli will do . Comment : @RobinChen That would surely cause the problem . You are supposed to use 192.168.1.20 the eth0 address in the first place . Comment : And then I use StackExchange.Redis in .Net project how can I do It s no way",
"Question : I am following this tutorial to create a Redis cluster : .. . .. . http : redis.io topics cluster-tutorial .. . .. . In this tutorial I need to run several redis-server instances on port 7000 through 7005 . However after I run the first instance successfully and try to run the second instance the nodes.conf file seems to be locked and I get the following error message : .. . .. . Sorry the cluster configuration file nodes.conf is already used by a different Redis Cluster node . Please make sure that different nodes use different cluster configuration-files . Do I need a separate nodes.conf for every server instance Or do I need a separate redis-server executable in each instance directory and run it from there .. . Answer : The tutorial suggests you to use separated folders for each instance configuration so each instance will also generate the nodes.conf on its own folder . Create a redis.conf file inside each of the directories from 7000 to 7005 . You need to have the .conf files on separated folders for each instance and the executable must be ran from that folders . Assuming you have the redis-server on tmp redis-cluster and the redis.conf on each tmp redis-cluster 700x folder : .. . .. . This way the nodes.conf will be generated on the current folder 7000 . Note that you must first issue a cd to change the current directory and from that folder execute the redis-server that is one folder up . . Comment : This is exactly what I do . The problem is that the redis-server is outside the 7000 etc . directories and the nodes.conf file which it uses for the cluster configuration is shared when the different servers are started . So I think the tutorial should be edited because the way it is described it does not work . Comment : I don t think this the problem is in the tutorial . Many of us has followed the tutorial without any problem . Can you share your folder structure and how do you exactly run the instances Comment : I have the redis-server in a folder tmp redis-cluster . Then I have the different redis.conf files in these folders : tmp redis-cluster 7000 tmp redis-cluster 7001 tmp redis-cluster 7002 tmp redis-cluster 7003 tmp redis-cluster 7004 tmp redis-cluster 7005 . Then I run each server with these commands tmp redis-cluster redis-server . 7000 redis.conf etc . Once the cluster is created when I try to start the servers again they start complaining about a lock on the nodes.conf file which is located in the tmp redis-cluster directory . Comment : You should run the instances like this : cd tmp redis-cluster 7000 . . redis-server . redis.conf . I just edited my answer . Comment : This worked I did not realize that the current directory will be one where the server will generate the nodes.conf . Thanks .",
"Question : So I am testing out the redis-cluster . I have a setup with 3 masters and 3 slaves . Now in case a node faces hard-failure both master and slave go down the cluster is still functional barring the hash slots served by the failed node . Now while testing such a scenario I see that reads writes that operate on keys served by these hash slots fail with exceptions which is fine I m using jedis btw . However if I am using redis-cluster as a cache I would like these hash slots to be served by some other node . This functionality doesn t seem to be present in the redis-trib utility . I cannot reshard the cluster to move these hash slots as . redis-trib.rb reshard fails with ERR Not all ClusterHashSlots slots are covered by nodes . . I also cannot remove the node from the cluster as . redis-trib.rb del-node fails with ERR Node node is not empty Reshard data away and try again . . What is the best way then to deal with a scenario where I cannot bring my original node up but want those hash slots to be served by some other node assuming that I am even fine with losing data on the old node Ideally something like being able to remove that node master and slave from the cluster and assign those hash slots to some other node . Comment : The cluster would be fixed after you restart the failed Redis . Is there a problem to do so Comment : @neuront i m talking about cases when the host become unaccessible for a while . Comment : Would redis-trib.rb fix HOST : PORT work where HOST : PORT could be the address of any reachable node in the cluster Comment : Nope that doesn t work . It reports that the hash slots are not reachable or something along those lines. . Comment : Sorry in fact I m not familiar with redis-trib.rb as our team is working on a Python management tool for Redis clusters . So I d like to suggest our own tool . If it still doesn t work would you please post more details about the cluster like the output of a cluster nodes .. . Answer : It fixes the cluster by adding all slots that was served by the failed node to some connectable nodes . The approach is to use the cluster addslots http : redis.io commands cluster-addslots command but of course it s somehow difficult to do it manually so I suggest this tool https : github.com HunanTV redis-trib.py developed by our team . Usage in shell : .. . .. . After that the new node would serve all the failed slots so that the cluster state will become ok .",
"Question : I ve installed redis-server using apt-get install redis-server and everything went fine . Right now I m trying to configure it in a Cluster mode . The problem is that in the tutorial supplied here http : redis.io topics cluster-tutorial they use a script called redis-trib.rb which I can t find it in my system . Can you please tell me how can I configure my Redis to run in Cluster mode without that script I would like to have a setup with two masters each on a different machine . Thank you very much . .. . Answer : There is now a tutorial for Ubuntu at https : www.digitalocean.com community tutorials how-to-configure-a-redis-cluster-on-ubuntu-14-04 which includes installation of a PPA to supply 3.0.x . This tutorial is only for two nodes and does not reference redis-trib.rb .. .",
"Question : We have a single Redis instance with a good amount of data over 100GB . We also have an empty Redis Cluster with 6 nodes . What would be the best way to move all that data from the stand-alone instance to the Redis Cluster and make it distribute it evenly Comment : and make it distribute it evenly You can t do that as the keyspace is not guaranteed to be evenly distributed . Comment : You re right . In this case splitting up the nodes into equal number of slots would be sufficient . .. . Answer : You could make it easier by using redis-rdb-tools https : github.com sripathikrishnan redis-rdb-tools and a cluster proxy programm like redis-cerberus https : github.com HunanTV redis-cerberus after you dump data into an RDB file .. . .. . Piping an AOF file into a proxy maybe doesn t work somehow if the AOF file contains cross-slots commands like RPOPLPUSH depending on the proxy s implementation . However if you are actually using this kind of commands you are not supposed to use a cluster .",
"Question : I have a redis-cluster of three master nodes and three slaves . I also have three Sentinel servers each on a separate machine monitoring the redis-cluster . Using Predis I am able to connect to the cluster via a single Master Node s IP Port . But I want to know if I can actually connect Predis to the CLuster via a Sentinel IP port .. . Answer : Redis Cluster handles failover itself without Sentinel so you don t need to use Sentinel via Redis Cluster . Only thing you need to do is choosing library which can support Redis Cluster .",
"Question : I m connecting to a redis-cluster node using .. . .. . redis-cli -c -p 7001 .. . .. . When I issue info command or dbsize command I get the count of keys that only reside on that node and not the count of all the keys across all the nodes in my cluster . However if I ask for a key which doesn t reside on this node it gets me the key from that node . What if I want keys to yield all keys from all the available nodes .. . Answer : When talking to a Redis instance of any kind you are only talking to that specific instance . Thus any commands are only executed in and for that instance s context . If you want to aggregate key counts across the cluster you have to issue the command on every master node and sum the results .",
"Question : I create a redis-cluster use redis-trib create commond I have a few questions about redis-cluster : .. . .. . 1 . can redis-trib explicitly set which host is master and which host is slave or any other way to do so .. . 2 . how to set cluster auth password .. . 3 . when set maxmemory how the cluster works does one master up to the maxmemory limit then store data to another master .. . Answer : 1 . You are supposed to assign the roles one by one or write a script by yourself to properly send cluster addslots http : redis.io commands cluster-addslots cluster meet http : redis.io commands cluster-meet and cluster replicate http : redis.io commands cluster-replicate commands to the right Redis .. . 2 . Not suggested to do so in the cluster environment and here are some words https : groups.google.com forum msg redis-db Z8lMxTfDct8 Rny9BIK9xGYJ from antirez himself .. . 3 . It affects only the one you send config set maxmemory to . It s possible that different nodes in a cluster have different maxmemory and serve different numbers of slots .. . .. . .. . .. . More details about 1 : .. . .. . First choose your master instances use redis-trib.rb create without --replicas . Now you have a cluster that contains only masters . Connect to each of your desired slaves with redis-cli and send these commands Comment : thanks for your answer but I can t understand the item 1 can you give me more details Comment : @aodavid Added links to the commands and how to work with them . Hope this would help . Comment : Thanks very much i got it .",
"Question : null .. . Answer : Hola Redis Universe We are planning to have the following configuration of redis-cluster . 1 . A redis-cluster comprising of 5 nodes . 2 . Each node to have 8 cores and 64 GB RAM and 100 GB SSD drive . 3 . One slave per master instance . 4 . Only RDB persistence no AOF after 15 mins on all instances . We have expecting to have a large no of reads writes per sec a figure in excess of 20k+ . On each node we are planning to have n masters and n slaves of other nodes Considering the singlethreaded nature of redis we want to utilize the multiple cores . How many redis instances masters and slaves should be run on one node ie . what should we use as the value of n 2 masters 2 slaves or 3 masters 3 slaves .. . .. . I checked running multiple instances on local and CPU usage seemed to shoot up a lot during the time the RDB save was in progress . Running multiple instances will increase the problem because the times of various instances being saved will clash . Is it going to be a problem in production Thanks",
"Question : null .. . Answer : I am running a Redis Cluster of 48 instances spread across 6 physical servers . These redis instances are running in docker containers . The cluster is designed as below : .. . .. . 1 4 Docker containers for Redis Master are running on each of these 4 servers M1 M2 M3 M4 . 2 Each master has 2 slaves . So that means 16 Docker Containers for Redis Slave running on rest of two servers S1 S2 . I am facing an issue while fetching the key . For example I am fetching a key which is stored on M1D2 using the redis-cli from the M1D1 it gives me the following error . - Redirected to slot 3902 located at 172.17.0.1 : 6350 .. . .. . Could not connect to Redis at 172.17.0.1 : 6350 : Connection refused .. . .. . Could not connect to Redis at 172.17.0.1 : 6350 : Connection refused .. . .. . I am quite sure that this issue related to Docker . Is it possible to make the Docker use Base Host eth0 IP for redis rather than using docker0 IP Comment : Hi @navmarvaha welcome to StackOverflow . Please read the how to ask http : stackoverflow.com help how-to-ask guidelines they can be very helpful to write quality questions and get more people to answer them . Enjoy the site : Comment : What s the output by a cluster nodes to that Redis It seems that some Redis nodes consider other Redis nodes are connected via the docker0 IP . I suggest use --net host in this case .",
"Question : I am doing research on redis . I have built my Redis cluster using three master nodes and I have another node for running ycsb . I encounter the same problem as described in To start YCSB load with cluster enabled option for REDIS http : stackoverflow.com questions 26793976 to-start-ycsb-load-with-cluster-enabled-option-for-redis . And I tried to edit RedisClient.java based on the answer given . However I got errors in : import redis.clients.jedis.HostAndPort import redis.clients.jedis.JedisCluster because those packages does not exsist . So my question is Where to find packages like redis.clients.jedis.JedisCluster Did anyone succeed in editing RedisClient.java for testing redis-cluster or do we have other solutions Thanks .. . Answer : The default redis client from ycsb does not support redis-cluster . So to benchmark redis-cluster using ycsb we must mordify redis client RedisClient.java and re-comiple the code using maven . The following code worked for me : .. . .. . I think that may be helpful for others :",
"Question : I google it and found two solution : .. . .. . 1.CLUSTER FORGET http : redis.io commands cluster-forget .. . .. . 2.redis-trib.rb del-node .. . .. . I think CLUSTER FORGET is the right way to do . But I really want to know the details about redis-trib.rb del-node . Can someone explain the difference between them Thanks .. . Answer : src redis-trib.rb del-node 192.168.0.211 : 6379 650e3746968e6b7c7e357f06adbde5b3b92fcceb .. . .. . Note : 192.168.0.211 : 6379 This is any node in the cluster 650e3746968e6b7c7e357f06adbde5b3b92fcceb this is the cluster ID of the node you want to remove . You can get the value of this ID from cluster nodes command .",
"Question : I use spring-data-redis version 1.7.0.M1 and jedis version 2.8.0 Here is my configuration .. . .. . and use redisTemplate.opsForValue .get foo to test .. . .. . throw the exception .. . .. . How to config redis-cluster when use spring-data-redis 1.7.0.M1 Comment : Cluster needs to be configured on RedisConnectionFactory . Can you please add the configuration for it . Additionally there s an example project for Redis Cluster available on github in the spring-data-examples https : github.com spring-projects spring-data-examples tree master redis-cluster repository as well as in the reference documentation http : docs.spring.io spring-data redis docs 1.7.0.M1 reference html cluster . .. . Answer : Basically all that is needed is setting the inital collection of cluster nodes in RedisClusterConfiguration and provide that one to JedisConnectionFactory or LettuceConnectionFactory . Spring Boot will provide configuration properties spring.redis.cluster.nodes spring.redis.cluster.max-redirects for working with Redis cluster in the next release . See commit 166a27 https : github.com spring-projects spring-boot commit 166a27f16c0ff6500090fcec5c69c3e4d79fd8b3 for details . The spring-data-examples repository https : github.com spring-projects spring-data-examples tree master redis-cluster already contains an example of Spring Data Redis cluster support . Comment : thank you I ve slove this problem",
"Question : Our project is in need of a GUI tool for monitoring and managing a Redis cluster . Although there are many solutions available I could not find one that has support for a cluster configuration of Redis . If anyone s aware of this please let me know it will be really helpful : .. . .. . Thank You Comment : Hello Dasun what kind of feature related to cluster configuration would you like I m Redsmin founder and we are currently working on the integration Redis Cluster support .. . Answer : Well our company just have made a web program for Redis clusters not a desktop GUI program . Here it is : https : github.com HunanTV redis-ctl .. . .. . It can create clusters make Redis join in or exit from the cluster or migrates slots between the nodes via HTML forms . It displays Redis and cluster info in web pages prettily well perhaps not pretty I m not good at Javascript or CSS anyway . But honestly speaking it lacks documentation and manual . We re still working on it . Feel free to leave your words at the issue page if you have any problems or suggestions .",
"Question : We are using spring-session to store user sessions in redis-cluster . We want to receive session-created and session-destroyed events . However it seems redis-cluster does not publish events properly . We receive session events if we use standalone redis-server . We have enabled all notifications on all redis nodes in the cluster . Is event publishing subscription supported with redis clusters It seems while using cluster it tries to subscribe to only one node in the cluster . Should it subscribe to all nodes .. . Answer : It was a Jedis issue which has been fixed in https : github.com xetorthio jedis issues 1258 . Also go through the replies of issue reported on git-hub for more information : https : github.com spring-projects spring-session issues 478",
"Question : We have a Redis Cluster with 3 machines with Master+Slave on each machine Amazon Cloud envs . The order is M1 S3 M2 S1 M3 S2 .. . .. . After restart of one machine for example M2 S1 the CLUSTER NODES command shows different info . I don t understand how it is possible . For example : . redis-cli -h 10.20.21.59 -p 7000 CLUSTER NODES command shows following : .. . .. . bba828ee8151f5addb0cb3d3bf91db559837c13f 10.20.21.59 : 7000 myself master - 0 0 3 connected .. . .. . BUT . redis-cli -h 10.20.21.59 -p 7001 CLUSTER NODES command shows completely different thing : .. . .. . d7d45ad6d12dfe65dff2867be05eef678ef72f69 10.20.21.44 : 7000 slave de0ecb56f8cd28fc99807d51851bc735887e5a0a 0 1460988751963 6 connected de0ecb56f8cd28fc99807d51851bc735887e5a0a 10.20.21.113 : 7001 master - 0 1460988751462 6 connected 0-5461 c034167f1ec790f4a5fdb28bb91843b03cbc77a0 10.20.21.113 : 7000 master - 0 1460988750960 2 connected 5462-10922 9a74b8c329437cb845d409b34222a3adbe6146d2 10.20.21.44 : 7001 slave bba828ee8151f5addb0cb3d3bf91db559837c13f 0 1460988752463 4 connected 69243875fc4a0dea0a95d559fbc8be8e8550c25f 10.20.21.59 : 7001 myself slave c034167f1ec790f4a5fdb28bb91843b03cbc77a0 0 0 5 connected bba828ee8151f5addb0cb3d3bf91db559837c13f 10.20.21.59 : 7000 master - 0 1460988752964 3 connected 10923-16383 .. . .. . Anybody can explain what is happening Thanks Comment : What is the output of the cluster info command in M2 .. . Answer : It s just the way CLUSTER RESET command works . So it is a normal behavior ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
redis
|
UNK_RELATION
|
blazeds@java@38
|
blazeds -- blazeds is a server-based @placeholder remoting and web messaging technology that allows you to connect to back-end distributed data and push data in real-time to flex and air adobe integrated runtime rich internet applications ria .
|
{
"confidence": [
52.45227813720703,
52.35285568237305,
52.28939437866211,
51.50246047973633,
51.3677864074707,
50.015140533447266,
49.5403938293457,
49.50693130493164,
49.21479797363281,
48.744361877441406,
48.28010177612305,
47.88440704345703,
47.74553298950195,
47.741424560546875,
47.51504135131836,
47.33161544799805,
46.95948791503906,
46.513954162597656,
46.485755920410156,
45.35781478881836,
45.22867202758789,
45.05854415893555,
45.05449676513672,
44.69749069213867,
44.6165657043457,
44.5938606262207,
44.313045501708984,
43.6878662109375,
43.655338287353516,
43.63200378417969,
43.421844482421875,
43.141448974609375,
43.14002227783203,
43.083377838134766,
42.81958770751953,
42.80078125,
42.70224380493164,
42.678382873535156,
42.18819808959961,
41.89617156982422,
41.7127685546875,
41.6766357421875,
41.641151428222656,
41.47367858886719,
41.41560745239258,
41.291770935058594,
41.291770935058594,
41.193233489990234,
41.13373947143555,
41.06684494018555,
41.04536056518555,
40.68800354003906,
40.39927291870117,
40.381011962890625,
40.29068374633789,
39.975868225097656,
39.973392486572266,
39.851131439208984,
39.82309341430664,
39.70563888549805,
39.589622497558594,
39.390682220458984,
39.310420989990234,
39.116050720214844,
39.090858459472656,
38.92393493652344,
38.89410400390625,
38.85997772216797,
38.7215690612793,
38.49244689941406,
38.38959884643555,
38.280906677246094,
38.18913650512695,
37.96871566772461,
37.966392517089844,
37.88897705078125,
37.87114334106445,
37.83552169799805,
37.75701904296875,
37.7241096496582,
37.7241096496582,
37.705806732177734,
37.622257232666016,
37.58186340332031,
37.58186340332031,
37.385093688964844,
37.34465789794922,
37.34465789794922,
37.33311080932617,
37.30195617675781,
37.30195617675781,
37.279823303222656,
36.83555603027344,
36.597267150878906,
36.54664993286133,
36.079994201660156,
36.072853088378906,
36.072853088378906,
36.072853088378906
],
"content": [
"The system uses a Flex front-end and a Spring BlazeDS back-end .",
"This is the Spring s integration library for BlazeDS not the BlazeDS code by Adobe .",
"I have an application based on flex client and blazeds at the server-side .",
"All .. . .. . We have a Flex Blazeds Spring based Web application .",
"I m using BlazeDS to connect Flex with Java .",
"I m coding a web app in flex blazeds and Java .",
"How to fetch data from a server with blazeds amfphp",
"Adobe has donated BlazeDS to the Apache Flex community and the source code is hosted on the Apache Flex website in a GIT repository .",
"Also if both LCDS and BlazeDS are developed by Adobe and the libraries are same then is there any real need to change the application from LCDS to BlazeDS .",
"Especially change it to using Apache Flex BlazeDS instead of Adobe BlazeD S .",
"I m attempting to implement a reasonably secure server-push from Spring BlazeDS to the Flex application based on groups whiteboards .",
"I am doing a project need real-time push data to client I am using Java+Flex+BlazeDS to achieve it .",
"That said I also use BlazeDS with ColdFusion and Flex to power push messaging in a couple of clients .",
"I am using BlazeDS for data-push feature in my Flex application project .",
"Dealing with a Flex client that needs to connect through BlazeDS to a Java backend .",
"I m using BlazeDS in Tomcat7 and Flex .",
"Adobe has two products : Livecycle Data Services ES LCDS and BlazeDS .",
"I am using blazeds to connect between Java and Flex .",
"The Java project uses BlazeDS in order to communicate with Flex front end .",
"I m trying to download a tagged version of BlazeDS and towards that end I would like to browse the Subversion repo for the BlazeDS project .",
"I am working on a Flex client front-end which connects to a Java back-end in Tomcat via BlazeDS .",
"Is there a way to use BlazeDS on a Glassfish server",
"I Integrate Blazeds messaging system with ActiveMQ : .",
"You can find BlazeDS 4 in the Spring maven repository : http : s3browse.springsource.com browse maven.springframework.org external com adobe blazeds",
"No Adobe does not have a maven repository for BlazeDS .",
"We have a Flex client and a server that is using the Spring Blazeds project .",
"Even for remoting sometimes is not possible to use BlazeDS..Adobe does not offer paid support so for some companies is not an option .",
"Or can a Flex client also open a secondary connection to a different server wich runs BlazeDS http : en.wikipedia.org wiki Adobe Flex BlazeDS for message exchange",
"Viewing the BlazeDS logs in debug mode the call is received and send back with data .",
"What material did you use to learn Flex Air itself and with ColdFusion + BlazeDS LCDS",
"I have an Adobe Air 2.0 application that is also utilizing Spring BlazeDS integration .",
"from a Flex client via a BlazeDS service",
"With the LCDS or BlazeDS installer come a few jar files like flex-messaging- .jar most likely it will be in there .",
"We have an existing no Spring Flex BlazeDS application which we are in the process of migrating to use Spring BlazeDS Integration .",
"I thought adoption of Adobe Flex was relatively sluggish but what I m hearing is that this has changed because of open-source BlazeDS .",
"I ve exposed a Spring bean to my Flex app via BlazeDS .",
"Is BlazeDS the router for the 2 webapps or are there 2 separate webapps both using BlazeDS",
"So I have written a client emulator that will act like real clients and connect to the server though Blazeds .",
"BlazeDS provides remote and messaging features the messaging features is the one allowing you to synchronize the data between the clients LCDS extends BlazeDS adding new features like data management productivity improvements PDF generation EDGE server for dealing with DMZ zones MDA development portal integration etc .",
"See the BlazeDS documentation http : livedocs.adobe.com blazeds 1 blazeds 5Fdevguide help.html content rpc 5Fhttpws 5F12.html .",
"I read over the internet that both LCDS and BlazeDS are being developed by Adobe now .",
"I can t say much about RTMP implementations but BlazeDS is clearly missing a scalable real-time messaging implementation as it uses only a synchronous servlet model .",
"Since you ll be keeping the same version of BlazeDS porting your existing code to Flex 4 should have no effect on your back end Spring BlazeDS integration iBATIS MySQL etc . .",
"My team are putting together a proof-of-concept Flex application sitting on top of a Spring-based server using BlazeDS .",
"You can implement this feature both with BlazeDS and LiveCycle Data Services .",
"I am using BlazeDS to communicate between Java and Flash Flex .",
"Yes a Flex client can connection to a variety of servers including BlazeDS .",
"I m a beginner of blazeds i wanna integrate spring with blazeds .",
"I take data from Java to Flex by AMF BlazeDS .. . .. . In java side object has Integer field .",
"https : forums.adobe.com community opensource blazeds https : forums.adobe.com community opensource blazeds commits",
"From the official tutorial Getting started with BlazeDS http : www.adobe.com devnet livecycle articles blazeds 5Fgettingstarted.html it shows messaging example with producer-consumer from API .",
"You can use subtopics for this as long as you disable wildcard subscriptions http : www.jamesward.com blog 2009 07 22 protected-messaging-in-flex-with-blazeds-and-lcds .",
"There are cool features like Data Centric Development DCD form generation etc.. . Do you know how Spring Blazeds Integration works with BlazeDS 4",
"@BenNeill I thought so too initially but they actually packaged up the Adobe jars inside their own local repository note the local-repo at the end of the URL probably because the BlazeDS Installation Guide http : sourceforge.net adobe blazeds wiki BlazeDS 204.0 20Installation 20Guide is such a joke .",
"My application uses BlazeDS for communication between Flex and Java .",
"Is there a way to do BlazeDS LCDS and ColdFusion polling without the need to use Flex to connect to them to achieve pseudo- realtime",
"If BlazeDS is your main server-side endpoint and your primary goal is load-balancing then you may want to explore the clustering capabilities of BlazeDS -- http : livedocs.adobe.com blazeds 1 blazeds devguide help.html content services clustering 1.html .",
"Communication between front and back uses BlazeDS and I have a custom marshaller in order to serialize data from flex to backend as : .. . .. . Is there a way to configure how use a custom de-serializer from back to flex",
"I developing Grails+BlazeDS server and Flex AIR client and stucked with this error : Detected duplicate HTTP-based FlexSessions generally due to the remote host disabling session-cookies .",
"I understand that this is the primary reason to use LiveCycle Data Services over BlazeDS .",
"My current development stack is MySQL + iBatis + Spring + Spring BlazeDS Integration 1.01 + BlazeDS 3.2 and Flex 3 with Mate 0.8.9 framework .",
"I have an Application consisting of a Java Server part and a Flash Flex client both communicate via BlazeDS .",
"i want to create flex application which will work with java and i see through the internet it can be done by using BlazeDS .",
"I m learning about Flash AMF and Java BlazeDS using the project I found on the internet but I noticed that the server is receiving via socket the data below : .. . .. .",
"BlazeDS can be used only to integrate Flex with Java backend .",
"There is no mechanism of lazy-loading in BlazeDS .",
"I have a blazeds server in Openshift and I m connecting to it via Flash Builder .",
"The below code is from AmfMessageDeserializer.java http : opensource.adobe.com svn opensource blazeds trunk modules core src flex messaging io amf AmfMessageDeserializer.java .",
"When flex client invokes a remote call on blazeds server server returns an arrayList containing POJOs .",
"AmfMessageDeserializer source code is here : http : opensource.adobe.com svn opensource blazeds branches 4.6 Apache modules core src flex messaging io amf AmfMessageDeserializer.java .. . .. . Also I think if you want to change the messages sent from BlazeDS to Flex you need to user Serializer rather than Deserializer .",
"The flex server may be using a different java version than your tomcat blazeDS one .",
"In this case take a look in the BlazeDS samples .",
"No there is not your flex application needs the BlazeDS XML configuration at compile-time in order to be aware of the services .",
"Actionscript supports a RemoteClass metadata tag that is used in BlazeDS to provide data-binding hints for marshalling AMF binary objects from Java to BlazeDS .",
"However I have tried the obvious http : opensource.adobe.com svn opensource blazeds as indicated on one of the Open @ Adobe project pages at Sourceforge https : sourceforge.net adobe blazeds wiki Source but I get a challenge for a user name and password .",
"The problem arise when the list was sent back to the flex browser application through blazeds .",
"The BlazeDS installation instructions here http : opensource.adobe.com wiki display blazeds Installation+Guide cover running BlazeDS under J2EE app servers of which Glassfish is one .",
"I ve been looking at the BlazeDS messaging service to push out the notifications to clients but I want to be able to send certain updates to certain clients .",
"They are from last year however both contain solid material on flex 3 with some flex 4 ColdFusion and or BlazeDs .",
"Does it have to be a blazeds",
"I m fine with BlazeDS .",
"ColdFusion BlazeDS or Java considering the fact that most of the time I will be storing large binary-data in database i.e .",
"I am trying to set up a scenario where a Flex application would be able to use resources written in two different web application implementing BlazeDS .",
"I ll edit my post above to focus on BlazeDS .",
"Anyone have any experience evaluating BlazeDS and GraniteDS",
"I played around with some settings on the BlazeDS server-side to no avail .",
"I m using activeMQ 5.3 to send messages to a flex client via blazeds 3.2 .",
"I have a flex application that communicates via BlazeDS with two webapps running inside a single instance of Tomcat .",
"I m using BlazeDS to connect my Flex front end to my Java backend and was wondering if there is any way I can get the complete stack-trace in case of an exception to be passed to the front end .",
"Although I ve ironed out small issues BlazeDs has been throwing an exception : BlazeDS Unknown AMF type 15 .",
"The url for the message broker is localhost : 8080 blazeds spring messagebroker amf http : localhost : 8080 blazeds spring messagebroker amf .",
"The most recent version of BlazeDS is 3.2.0.3978 .",
"If you want to see some code go and download BlazeDS http : opensource.adobe.com wiki display blazeds Downloads and take a look on the samples there are several ones showing the messaging features .",
"My application makes a lot of use of the RemoteObjectInvoker tag to call my BlazeDS Java service methods on the back-end .",
"We can solve the problem of converting Actionscript 3 s Date type when calling Java with a custom type marshaller plugged into BlazeDS but this appears to only be invoked for the Flex- Java BlazeDS direction and not for the Java BlazeDS- Flex direction .",
"BlazeDS 4 is used to communicate with Flex4.6 .",
"Our application uses BlazeDS inside a Jetty webserver .",
"It s a RemoteObject talking to BlazeDS on a Java backend .",
"Support for multiple users is indeed provided by BlazeDS ."
]
}
|
{
"confidence": [
83.98363494873047,
75.97685241699219,
75.00972747802734,
73.81803131103516,
73.72942352294922,
72.20930480957031,
72.0311050415039,
71.33938598632812,
69.62275695800781,
69.32369232177734,
68.97956085205078,
67.82878112792969,
67.23045349121094,
66.87118530273438,
66.03034973144531,
65.94629669189453,
65.88700866699219,
65.44158172607422,
65.37604522705078,
64.52413940429688
],
"content": [
"Question : I am new in Flex Development While creating a new Mobile project it asks me if I want to Connect it to Some Servers and gives me four options ColdFusion PHP Java and blazeDS . I have worked in java for all the time and not a PHP fellow I would have simply selected Java and ignored all other . But Since efficiency is an important concern in my current project I dont want to take a chance . According to you Which one is the best option i.e . ColdFusion BlazeDS or Java considering the fact that most of the time I will be storing large binary-data in database i.e . Audio Video files etc . Comment : Your efficiency or the code s execution efficiency Comment : As far as my efficiency is concerned obviously I would work faster in Java as I know the language. . I am interested in Application s efficiency. . .. . Answer : I ve been doing Flex - ColdFusion for several years and while I sometimes get frustrated with coding ColdFusion it has been great for handling the back end of Flex applications . That said I also use BlazeDS with ColdFusion and Flex to power push messaging in a couple of clients . Ultimately I think ColdFusion especially with the open-source CFML server Railo is a fantastic back end i.e data provider for Flex applications .",
"Question : I have a average Java knowledge . but i don t have a good knowledge about adobe flex . i want to create flex application which will work with java and i see through the internet it can be done by using BlazeDS . there is 2 configuration-files called services-config.xml and remoting-config.xml . I don t have any idea about these files . if these are automatically created through the flex or will i have to create these files manually and how to connect flex application with java web project . I followed this - http : cgrant.wordpress.com 2009 11 20 connecting-flex-to-java-with-blazeds .. . .. . Please help me . Comment : You need to read the doco . adobe.com devnet livecycle articles blazeds gettingstarted.html http : www.adobe.com devnet livecycle articles blazeds gettingstarted.html livedocs.adobe.com blazeds 1 blazeds devguide http : livedocs.adobe.com blazeds 1 blazeds devguide help.html content splash.html Comment : Those files should be included as part of BlazeDS . Comment : @ keyle n @ Reboog711 - I found it . Thank you........ . .. . Answer : There are several middlewares meet your requirement . In addition another 2 are : .. . .. . GraniteDS http : www.graniteds.org recommended much powerful than BlazeDS .. . Pimento http : www.spicefactory.org pimento docs 1.1 manual Support enum type Comment : Thank you.... . I will check it .",
"Question : I m beginner in Flex so please bear with me . I m working on an application where I have to change a Flex application using LCDS into a BlazeDS one . The current LCDS based application is using only RPC functionality which is present in BlazeDS as well . I read over the internet that both LCDS and BlazeDS are being developed by Adobe now . I downloaded the BlazeDS turnkey demo application and found that even the libraries under the lib folder are the same as that of my current LCDS based application . Furthermore APMO the way configurations are done in remoting-confix.xml service-config.xml are also same . My question is : .. . .. . 1 . If everything seems same in LCDS RPC and BlazeDS RPC then where is the difference or am I missing something crucial here 2 . Also if both LCDS and BlazeDS are developed by Adobe and the libraries are same then is there any real need to change the application from LCDS to BlazeDS . I know LCDS is paid and BlazeDS is free but I don t understand where will I make changes in the application to make it BlazeDS if the libraries are same in both cases 3 . Finally is there any difference how we create call RemoteObject in LCDS and in BlazeDS Kindly reply . Thanks . .. . Answer : LCDS has more features that are not present in blazeds and is designed to be more scalable . if you are not using any specific feature to LCDS then its painless to move to blazeds . for most apps non enterprisey apps blazeds will do just fine . remoteobject calls are the same . there is also graniteds as another option .",
"Question : null .. . Answer : I have an Adobe Air 2.0 application that is also utilizing Spring BlazeDS integration . Inside this application I have a couple of data grids . The design was for each grid s model to register a Consumer to listen for changes pushed from BlazeDS . The first grid instantiated works correctly however each subsequent grid causes the following warning in BlazeDS .. . .. . I was under the impression you could have multiple consumers inside a Flex Air application . Am I mistaken or have I just missed something in my configuration Server side channel definition .. . .. . Code for Channelset .. . .. . Code for Consumer Comment : Ok based on what I have seen so far it would appear that you cannot have more than one streaming AMF consumer at a time unless you instantiate the multiple consumers at the same time . If I change the channelset to use long-polling the code works as expected . At this point I have decided to use a single consumer and route all of my critical messages through that consumer . I will use long-polling consumers for less real-time updates where possible . If no one else comments within a couple days I will accept this as the answer .",
"Question : I m doing a tech review and looking at AMF integration with various backends Rails Python Grails etc . Lots of options are out there question is what do the Adobe products do BlazeDS etc that something like RubyAMF pyAMF don t .. . Answer : Adobe has two products : Livecycle Data Services ES LCDS and BlazeDS . BlazeDS contains a subset of LCDS features and was made open-source . Unfortunately NIO channels RTMP NIO HTTP and the DataManagement features are implemented only in LCDS not BlazeDS . BlazeDS can be used only to integrate Flex with Java backend . It offers not only remoting services using AMF serialization as RubyAMF but also messaging and collaboration features - take a look at this link http : livedocs.adobe.com blazeds 1 blazeds devguide help.html content lcoverview 3.html . Also I suppose that the support is better compared with RubyAMF pyAMF . If your backend is JAVA and you want to use only a free product you can also use GraniteDS or WebORB BlazeDS competitors",
"Question : I m trying to download a tagged version of BlazeDS and towards that end I would like to browse the Subversion repo for the BlazeDS project . However I have tried the obvious http : opensource.adobe.com svn opensource blazeds as indicated on one of the Open @ Adobe project pages at Sourceforge https : sourceforge.net adobe blazeds wiki Source but I get a challenge for a user name and password . Tried my SF username pw didn t work didn t expect it to . Tried to go to http : opensource.adobe.com to see if I could register there but got redirected back to Sourceforge . What is an appropriate username pw Or is there another URL I can try The Open @ Adobe project pages at Sourceforge are pretty disorganized . If there is a more appropriate forum for this question by all means please let me know . There doesn t seem to be a user forum for Open @ Adobe . .. . Answer : Adobe has donated BlazeDS to the Apache Flex community and the source code is hosted on the Apache Flex website in a GIT repository . http : flex.apache.org dev-sourcecode.html .. . .. . There is a forum with a commits section for BlazeDS that might add a historical viewpoint on the previous code changes but it does appear that Apache only received a commit of the latest release and started editing from there . https : forums.adobe.com community opensource blazeds https : forums.adobe.com community opensource blazeds commits",
"Question : As far as In understand the Flex http : en.wikipedia.org wiki Adobe Flex technology a Flex client connects to a Flex server to retrieve business information . Is this the only allowed connection for the client back to the originating server Or can a Flex client also open a secondary connection to a different server wich runs BlazeDS http : en.wikipedia.org wiki Adobe Flex BlazeDS for message exchange This might offer an option for load-balancing and cross-platform development . Update : thanks for the answer I have found this page which links to the Cross-domain policy file specification : .. . .. . http : www.adobe.com devnet articles crossdomain policy file spec.html .. . Answer : Yes a Flex client can connection to a variety of servers including BlazeDS . What could prevent a client from conenctiong to a BlazeDS server is the crossdomain.xml http : www.google.ch search aq 0 oq crossdomain sourceid chrome ie UTF-8 q crossdomain.xml which is a connection policy document hosted on the server . I ve got one concern about your question and that is using the term Flex server . That was something folks talked about with Flex 1 circa 2005 Adobe is now on Flex 4 and some relevant server technologies platforms software protocols of interest are BlazeDS Red5 http : osflash.org red5 FMS LiveCycle Data Services http : www.adobe.com products livecycle dataservices JSON http : www.json.org AMF3 http : www.google.ch search sourceid chrome ie UTF-8 q amf3 etc . Comment : Thanks for the pointer to crossdomain.xml . However I found information at kb2.adobe.com cps 142 tn 14213.html http : kb2.adobe.com cps 142 tn 14213.html which says that it is not possible to connect to two servers on different domains . Comment : @mjustin : Please re-read that link . The subject is much more complex there are options . Also note that article is old--It is referencing Flash 7 The devil is in the details it can be done many folks are doing it . Comment : Thank you for your hint see my update - accepted your answer",
"Question : Evenin good people I m creating a virtual whiteboard application for my third year project at university . The system uses a Flex front-end and a Spring BlazeDS back-end . I d say that I m pretty new to BlazeDS and to Flex so apologies if anything I say doesn t make a lot of sense . I m attempting to implement a reasonably secure server-push from Spring BlazeDS to the Flex application based on groups whiteboards . I ve discovered that BlazeDS offers a publish-subscribe messaging architecure which includes support for sub-groups . However I can t find a way of restricting access to particular password-protected groups available only to users pre-authenticated with the system . my system is also using a custom log-in process mediated through Flex RPC calls . Additionally I ve considered writing a custom messaging-adapter however getting this to @autowire with the rest of my project and a custom authentication system has proven difficult and so far I ve had little success . All-in-all I m at a little bit of a loss for how to continue . Any help would be greatly appreciated . .. . Answer : If I understand your problem currectly you are trying to implement Authorization based subscriptions . The user can subscribe to a group only if he is authorized to so If so Flex has a concept of subtopics the client subscribes on to a destination with this subtopic . This subscription can be manually managed by extending Adapters in flex . override a couple of methods to do so . when the client requests for subscribe on this subtopic handle the subscription in the adapter maintain a list of subscriptions also there is an overriden method in the same adapter to handle the push of the messages you can use it to find the authorization of the user and push messages accordingly . these methods are not invoked by you directly thre are classes in blazeds to construct the message objects and pushe it to the client i think it is AsyncMessage use this to push . Its been a long time since I worked on this I hope you got some direction . Comment : This actually sounds more or less like the route I chose in the end . I posted this question a while ago so I had a bunch of time since then to do a little more reading . Thanks for your input though .",
"Question : I ve seen a bunch of screencasts demonstrating the integration between blazeds and flex also some lcds tutorials model-driven or not . I ve seen that some of them the presenter opens 2 browsers and once you change one value in a grid it propagates to all other grids that presents the data . I am wondering how the heck this is done and how to reproduce . Does this feature depends of the Edge LCDS solution I don t think so but I ve never seen some code explaining about it . I feel it may or may not rely on JMS MQ messaging protocols or if this is some sort of 2 way sync and propagation of collection between instances of the same service result . Thanks for any inputs . Cheers .. . .. . Ernani .. . Answer : You can implement this feature both with BlazeDS and LiveCycle Data Services . BlazeDS provides remote and messaging features the messaging features is the one allowing you to synchronize the data between the clients LCDS extends BlazeDS adding new features like data management productivity improvements PDF generation EDGE server for dealing with DMZ zones MDA development portal integration etc . It also adds some advanced messaging features like message conflation throttling reliability . BlazeDS is free and open-source and in my opinion a robust solution you can use it if you want to synchronize the data between clients . LCDS adds a lot of things but the LCDS customers should have a large budget . How does it work There is no JMS behind for this feature however BlazeDS can integrate with a JMS provider so you can have one client in broswser and the second one running a SWING application . Instead there are some message queues on the server and a publisher - subscriber graph . In order to push the data from the clients to the server there are several choices the more advanced are available only on LCDS : HTTP polling HTTP long-polling HTTP streaming RTMP sockets LCDS only . All of them are described in details on Damon http : www.dcooper.org blog client index.cfm mode entry entry 942B63DD-4E22-1671-5B4CF844C30A0E98 blog . If you want to see some code go and download BlazeDS http : opensource.adobe.com wiki display blazeds Downloads and take a look on the samples there are several ones showing the messaging features . Also there a tomcat server is bundled in the download and the samples are already deployed in it . Comment : Great answer . I d also like to add that there are some live samples of the Messaging and Data Management features in Tour de Flex : flex.org tour http : flex.org tour The Data Management samples might be broken at the moment due to the database being down . But the TDF team is working to resolve that . Comment : Thanks great answer indeed so in order to resume this question this is only doable using a MQ endpoint I thought of managing this with RemoteObjects only but it seems impossible right Comment : Yes it is..download the Spring BlazeDS Integration Samples static.springsource.org spring-flex docs 1.0.x reference html http : static.springsource.org spring-flex docs 1.0.x reference html ch06.html and you will find a sample using ActiveMQ . Yes it is almost impossible you need to use the producers and the consumers objects . Almost impossible means that you can do something by implementing your own polling based on periodic remote calls but it is overkill . Comment : I ve managed to make some test situation using a custom polling interval request using timers but this is duct-taping programming I feel that using JMS is far better and will seek for the best . Thanks man . Really appreciate your help .",
"Question : I am using BlazeDS for data-push feature in my Flex application project . From the official tutorial Getting started with BlazeDS http : www.adobe.com devnet livecycle articles blazeds 5Fgettingstarted.html it shows messaging example with producer-consumer from API . but how can I implement server-side which doesn t need to be invoke from Flex client but from within server-side instead . I got some idea but I don t know how to do because I m a Flex developer not Java developer so I think you can help me . 1 . In Google there s a tutorial show about I need to extend ServiceAdapter class in Java-side which extends Invoke method . Do I need to extend other class instead of this to do what I want 2 . How to configure the message-config.xml to get the result like I describe above Comment : Piece of advice get someone to look over this and correct the grammar . It is very hard to follow . .. . Answer : If you want to set the url to the stream at runtime do the following : .. . .. . Just a heads up . This took some head banging to get going . I hope it helps someone .",
"Question : I am using BlazeDS for data-push feature in my Flex application project . From the official tutorial Getting started with BlazeDS http : www.adobe.com devnet livecycle articles blazeds 5Fgettingstarted.html it shows messaging example with producer-consumer from API . but how can I implement server-side which doesn t need to be invoke from Flex client but from within server-side instead . I got some idea but I don t know how to do because I m a Flex developer not Java developer so I think you can help me . 1 . In Google there s a tutorial show about I need to extend ServiceAdapter class in Java-side which extends Invoke method . Do I need to extend other class instead of this to do what I want 2 . How to configure the message-config.xml to get the result like I describe above Comment : Piece of advice get someone to look over this and correct the grammar . It is very hard to follow . .. . Answer : Here is test code I wrote and use at times to test sending data to our client . It s a stripped down bare bones Java example of a ServiceAdapter implementation . It removes a lot of unnecessary code from the existing examples on the web . It Compiles works and I use it often in testing . You need to set a few properties in tomcat to get this to work . In messaging-config.xml you need to add an adapter and destination : .. . .. . Add this line to the existing adapters tag : .. . .. . Add this destination to that same messaging-config.xml file : .. . .. . Finally make sure the my-streaming-amf channel is defined in services-config.xml as in : .. . .. . Note that in blazeDS these two config files messaging-config.xml and services-config.xml are located in the following directory : .. . .. . where nameOfYourApp is the directory your webapp lives in . I hope all that helps -kg Comment : This is awesome . Would it be possible to also recieve the message you send in that same class",
"Question : BlazeDS is implemented as a servlet and thus limited to roughly hundreds of simultaneous users . I wonder if the more recent web containers Tomcat 7 GlassFish Grizzly Jetty etc . supporting Servlet 3 could be used to create NIO endpoints to increase the number of simultaneous users to the thousands Is this a valid and practical solution Anyone do this in production Something like a mature version of this : http : flex.sys-con.com node 720304 If this was of great importance back then why now when Servlet 3 is widely available has there been no effort to try to implement NIO endpoints note I m a newbie here so feel free to state the obvious if I m missing something .. . .. . Benefit of NIO : http : www.javalobby.org java forums t92965.html .. . .. . If not is a load balancer and multiple application servers each having an instance of BlazeDS the recommended solution outside of going to LCDS etc . .. . Answer : GraniteDS Asynchronous Servlets .. . .. . GraniteDS is as far as I know the only solution that implements asynchronous servlets for real-time messaging ie . data push . This feature is not only available for Servlet 3 containers Tomcat 7 JBoss 7 Jetty 8 GlassFish 3 etc . but also for older or other containers with specific asynchronous support eg . Tomcat 6 CometProcessor WebLogic 9+ AbstractAsyncServlet etc . Other solutions don t have this feature BlazeDS or use RTMP LCDS WebORB and the last version of Clear Toolkit . I can t say much about RTMP implementations but BlazeDS is clearly missing a scalable real-time messaging implementation as it uses only a synchronous servlet model . If you need to handle many thousands concurrent users you can even create a cluster of GraniteDS servers in order to further improve scalability and robustness see this video http : www.youtube.com watch v aRLZcU-m6G8 for example . Asynchronous Servlets Performance .. . .. . The scalabily of asynchronous servlets vs . classical servlets has been benchmarked several times and gives impressive results . See for example this post http : blogs.webtide.com gregw entry comet performance on the Jetty blog : .. . .. . With a non NIO or non Continuation based server this would require around 11 000 threads to handle 10 000 simultaneous users . Jetty handles this number of connections with only 250 threads . Classical synchronous model : .. . .. . 10 000 concurrent users - 11 000 server threads . 1.1 ratio . Comet asynchronous model : .. . .. . 10 000 concurrent users - 250 server threads . 0.025 ratio . This kind of ratio can be roughly expected from other asynchronous implementations not Jetty and using Flex AMF3 instead of plain text HTTP request shouldn t change much of the result . Why Asynchronous Servlets The classical synchronous servlet model is acceptable when each request is processed immediately : .. . .. . The problem with data push is that there is no such thing as a true data push with the HTTP protocol : the server cannot initiate a call to the client to send data it has to answer a request . That s why Comet implementations rely on a different model : .. . .. . With synchronous servlet processing each request is handled by one dedicated-server thread . However in the context of data push processing this thread is most of the time just waiting for available data and does nothing while consuming significant server resources . The all purpose of asynchronous processing is to let the servlet container use these often idle threads in order to process other incoming requests and that s why you can expect dramatic improvements in terms of scalability when your application requires real-time messaging features . You can find many other resources on the Web explaining this mechanism just google on Comet . Comment : Thanks Franck for the detail response . I ll edit my post above to focus on BlazeDS . Comment : Franck should know it But it is also possible to use BlazeDS with Jetty8 NIO Servlet 3.0 and clustering with JGroups . We have done this several times with Jetty7 and now with Jetty 8-RC5 and the results are not bad . If you you ie . long-polling with polling-interval-millis 0 you will get almost real-time events on client-side .",
"Question : As far as In understand the Flex http : en.wikipedia.org wiki Adobe Flex technology a Flex client connects to a Flex server to retrieve business information . Is this the only allowed connection for the client back to the originating server Or can a Flex client also open a secondary connection to a different server wich runs BlazeDS http : en.wikipedia.org wiki Adobe Flex BlazeDS for message exchange This might offer an option for load-balancing and cross-platform development . Update : thanks for the answer I have found this page which links to the Cross-domain policy file specification : .. . .. . http : www.adobe.com devnet articles crossdomain policy file spec.html .. . Answer : If BlazeDS is your main server-side endpoint and your primary goal is load-balancing then you may want to explore the clustering capabilities of BlazeDS -- http : livedocs.adobe.com blazeds 1 blazeds devguide help.html content services clustering 1.html .",
"Question : 1 . I am configure flex with spring frame work using blaze Ds . download blaze Ds.war file then i was created web dyanmic project in eclipse . I was create web application META-INF WEB-INF place in web content copy from blazeds.war .. . i will-change service-config.xml file given below .. . .. . after i start server it can 404 error will come i will send my error details .. . Answer : It seems that you are using the wrong versions of jars as Spring-Flex-Integration tries to initialize a field it expects but the version you provieded doesnt offer . Have a look at this post .. . here someone is having similar problems : http : forum.spring.io forum spring-projects web flex 90301-nosuchfielderror-async-message-filters-element-children Comment : blazeds-common-4.0.0.14931.jar spring-flex-core-1.5.2.RELEASE.jar aopalliance-1.0.jar spring-integration-core-1.0.3.RELEASE.jar then spring jar 3.1.2 versions .... . I using same blazeds jars any find version appropriate jar for this applications Comment : Ok .. . so I am using the same versions just that I use Spring in 3.1.3.RELEASE and 4.0.0.RELEASE . But I also remember that I had to manaually deploy the jars as they were not available in any public repo . So eventually you deployed the wrong version The size of my working blazeds-common-4.0.0.14931.jar is 95.864 Bytes and of my blazeds-core-4.0.0.14931.jar is 685.390 Bytes .. . so perhaps you should check this first . Comment : Ya. . I check it out fully my blazeds-common-4.0.0.14931.jar is 95 864 bytes and blazeds-core-4.0.0.14931.jar is 685 390 bytes blazeds-proxy-4.0.0.14931.jar is 66 253 bytes blazeds-remoting-4.0.0.14931.jar is 18 852 bytes . . so mostly same what you have jar list so can i add any other ...... .",
"Question : What material did you use to learn Flex Air itself and with ColdFusion + BlazeDS LCDS .. . Answer : http : www.onflexwithcf.org index.cfm 2007 8 2 Coldfusion-8-Simple-messaging-example-using-Messaging-Event-Gateway .. . .. . New user 1 link at a time sorry about that . But there 3 are helpfull .",
"Question : What material did you use to learn Flex Air itself and with ColdFusion + BlazeDS LCDS .. . Answer : http : www.trajiklyhip.com blog index.cfm 2009 8 18 CFUnited-2009--My-AIR-Messaging-Slides-and-Code",
"Question : I m working on a webapp built using Spring + Flex . Communication between front and back uses BlazeDS and I have a custom marshaller in order to serialize data from flex to backend as : .. . .. . Is there a way to configure how use a custom de-serializer from back to flex I need an interceptor to modify some fields of data sent from back to flex so I think this approach could work . .. . Answer : In AMFEndpoint class there are fields .. . .. . So I think you can extend the AMFendpoint and specify your own serializer deserealizer and implement them obviously . AmfMessageDeserializer source code is here : http : opensource.adobe.com svn opensource blazeds branches 4.6 Apache modules core src flex messaging io amf AmfMessageDeserializer.java .. . .. . Also I think if you want to change the messages sent from BlazeDS to Flex you need to user Serializer rather than Deserializer . Btw downloading the whole source code for BlazeDS is pretty useful you can add it to Eclipse and ctrl-click on classes and see the source with comments .",
"Question : Does anybody know if Adobe has a maven repository to download the latest BlazeDS artifacts from I only can find the older versions of BlazeDS in the central mvn repository . The other option is to deploy the downloaded BlazeDS jar files from the Adobe website into my local repository but it would be nice when Adobe provides the artifacts via a maven repository . .. . Answer : https : src.springsource.org svn spring-flex tags spring-flex-1.5.0.RELEASE local-repo seems to be working . Add this repo to your pom.xml or settings.xml : .. . .. . This repository does not include checksums so you will need to run Maven with the --lax-checksums option if you use this repository . Comment : This is the Spring s integration library for BlazeDS not the BlazeDS code by Adobe . Comment : @BenNeill I thought so too initially but they actually packaged up the Adobe jars inside their own local repository note the local-repo at the end of the URL probably because the BlazeDS Installation Guide http : sourceforge.net adobe blazeds wiki BlazeDS 204.0 20Installation 20Guide is such a joke .",
"Question : Is there any reliable way to check statistics for this question I m skeptical whether measures like Google Trends really say much but I was thinking the job market for Flex jobs might be an indicator and the market seems healthy http : www.indeed.com jobtrends q 22adobe 2Bflex 22 2C 2Bactionscript l based on Indeed Trends . I thought adoption of Adobe Flex was relatively sluggish but what I m hearing is that this has changed because of open-source BlazeDS . I would like to verify this because I have an interest in Flex but was avoiding it because it seemed to be a market failure . Any info would be appreciated even if it s anecdotal . .. . Answer : The barrier to adoption of Flex has always been the requirement of Flash Player and the feeling by many that developing with it isn t standards-based and instead opt for an DHTML AJAX solution . Therefore I don t think that Blaze DS is going to push a large number of people towards Flex-based RIAs . Even before Blaze you could write some pretty large-scale applications using of XML-based services RPC SOAP RESTful . It only became problematic from a performance issue when you were dealing with some very large-data sets thousands of large records at a time . Blaze is also a Java-only solution and there are lots of other types of backend technologies being used with Flex : PHP .NET Python Ruby ColdFusion etc . Speaking to the market I can tell you that I joined one of the largest Flex shops in the world about three years ago and have seen our company grow at least 5x during that period due almost exclusively to increased demand for Flex . We are also seeing significant growth with Silverlight and WPF as Microsoft rolls out these solutions to their huge developer community . Either way I think that player-based RIA is a lot more than a flash in the pan no pun intended and is going to continue to experience incredible growth . The web browsers won t be able to keep pace with the innovation of the player-based runtimes and HTML 5 is nowhere in sight .",
"Question : I m trying to create a module for a flex application and I want to send notifications to clients . I ve been looking at the BlazeDS messaging service to push out the notifications to clients but I want to be able to send certain updates to certain clients . The Flex notification framework doesn t seem to allow this - if we have a field in the message with a value of the user s user id for example any client could theoretically subscribe to all messages for any given user id and there s no verification on the server-side to make sure that the client that has subscribed is logged in as that user id . Is there something I ve missed here or is the best way to handle this writing my own polling mechanism on the client-side .. . Answer : You can use subtopics for this as long as you disable wildcard subscriptions http : www.jamesward.com blog 2009 07 22 protected-messaging-in-flex-with-blazeds-and-lcds ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
java
|
UNK_RELATION
|
stringification@c-preprocessor@75
|
stringification -- stringification refers to the use of the operator in a @placeholder macro to use an argument as a string .
|
{
"confidence": [
49.04787063598633,
46.07422637939453,
46.03007888793945,
44.50571060180664,
42.64017868041992,
42.3486328125,
40.64223861694336,
39.61941146850586,
37.15935516357422,
35.940757751464844,
35.737701416015625,
35.11906051635742,
34.917930603027344,
34.917930603027344,
34.917930603027344,
33.692047119140625,
33.692047119140625,
33.692047119140625,
33.39927673339844,
30.42953872680664,
30.42953872680664,
30.42953872680664,
30.42953872680664,
30.42953872680664,
30.42953872680664,
30.155946731567383,
30.08749771118164,
30.08749771118164,
29.753089904785156,
29.62441062927246,
29.20365333557129,
29.068403244018555,
28.412006378173828,
28.196922302246094,
27.90723419189453,
27.900754928588867,
27.68254852294922,
27.68254852294922,
27.411102294921875,
27.278308868408203,
26.763227462768555,
26.699951171875,
26.340473175048828,
26.184173583984375,
26.07920265197754,
26.05242347717285,
25.872665405273438,
25.628644943237305,
25.414440155029297,
24.854700088500977,
24.391613006591797,
24.338245391845703,
24.118125915527344,
23.99980354309082,
23.87371063232422,
23.75971794128418,
23.758647918701172,
23.758647918701172,
23.758647918701172,
23.666532516479492,
23.666532516479492,
23.43750762939453,
23.231403350830078,
23.05385398864746,
22.93385124206543,
22.73705291748047,
22.724050521850586,
22.423839569091797,
22.277191162109375,
22.2574520111084,
22.208576202392578,
22.184024810791016,
22.00592613220215,
21.725833892822266,
21.71422576904297,
21.707965850830078,
21.697711944580078,
21.650949478149414,
21.63373374938965,
21.312108993530273,
21.312108993530273,
21.312108993530273,
21.254364013671875,
21.216596603393555,
21.13226318359375,
21.034759521484375,
20.994733810424805,
20.9526309967041,
20.74333381652832,
20.644960403442383,
20.53019142150879,
20.381410598754883,
20.289281845092773,
20.289281845092773,
20.289281845092773,
20.1844425201416,
20.156003952026367,
20.091951370239258,
20.091951370239258,
20.091951370239258
],
"content": [
"You should use the double-expansion stringification macro trick .",
"The stringification operator creates a C string which is an array of characters char .",
"The when used like this is called the stringification operator http : gcc.gnu.org onlinedocs cpp Stringification.html Stringification .",
"You only overloaded stringification not string-comparison .",
"This is done because there are cases where you do not want to expand the argument before stringification most common being the assert macro .",
"What I have is the standard Macro-Expansion-Stringification-method .",
"questions 16989730 stringification-how-does-it-work 2 answers .. . .. . My first time seeing stringification and token pasting .",
"It s a preprocessor feature called stringification http : gcc.gnu.org onlinedocs cpp Stringification.html Stringification .",
"If you want to expand a macro then stringify or concatenate its expansion you can do that by causing one macro to call another macro that does the stringification or concatenation .",
"This question already has an answer here : .. . .. . Stringification - how does it work",
"The overload pragma will however use the overloaded stringification for the string-comparison if you specify the fallback 1 parameter : .. . .. . Details on why this works : .. . .. . When handed an overloaded object the eq operator will try to invoke the eq overload .",
"Your attempt to use the well-known stringification recipe of the C preprocessor viz : .. . .. . fails for two reasons each sufficient by itself .",
"You cannot coax gfortran on its own to work the the stringification recipe .",
"But frankly I am longing for compiler support of typename stringification .",
"What may be suboptimal for the OP is the fact that this does the demangling and stringification at runtime .",
"Stringification only encloses the specified parameters within double quotes .",
"Stringification can convert your identifiers to strings but not vice versa .",
"This doesn t work after Perl 5.12 because the regex stringification changed .",
"I have realised the hard way that operator eq gives a fatal runtime-error when one of the operand is an object with overloaded stringification .",
"Read about stringification http : gcc.gnu.org onlinedocs cpp Stringification.html in GCC cpp documentation .",
"You can verify this by invoking the preprocessor directly like : .. . .. . where test.c contains some attempt to employ the stringification recipe .",
"Doing the stringification in your test source this way would look like : .. . .. . The output of that is : .. . .. . And that output is what you want to to compile .",
"For any Fortran source file fsrc you wanted to compile with a stringification preamble the actions to specify would be in the vein :",
"On the second point you have answered my question with You cannot coax gfortran on its own to work the the stringification recipe .",
"x is the stringification directive .. . .. . define Stringify x x .. . .. . means Stringify abc will be substituted with abc .. . .. . as in",
"Can I only use in a macro to create a string",
"This should work : .. . .. . The operator in a macro means make this into a string .",
"The preprocessing operator turns the macro parameter into a string .",
"And finally you can only use the stringify operator on macro parameters .",
"It allows you to convert an argument of a macro into a string literal .",
"This won t work anymore because the regex stringification doesn t do -options in Perl 5.14 .",
"To clarify assume I have the following macro : .. . .. . What I would like to do is somehow perform stringification on all the variables of X before passing it to a variadic function the keyword here is before .",
"Here is a minimal example : .. . .. . The result-of running this is : .. . .. . My expectation from reading perlop http : perldoc.perl.org perlop.html Equality-Operators would be that string context is forced on both operands firing the stringification method in test then the resulting strings are compared .",
"is the macro concatenation operator .",
"They use it with another macro that returns a string with the date and time .",
"where FILE would be defined as the string MyFile without quotes resulting in .. . .. . The stringizing operator cannot be used here as the symbol FILE is not a macro argument .",
"Also it s not meant to be copy-paste solution since it only outputs the stringification of the arguments to demonstrate POC but should be sufficient enough to demonstrate the functionality .",
"You can invoke cpp directly unencumbered by traditional mode to preprocess the Fortran source in which you want the stringification done and relay its output to gfortran .",
"You cannot use : .. . .. . since the is used as an operator to stringify the argument .",
"It .. . .. . replaces the macro parameter with the literal text of the actual argument converted to a string constant .",
"If it precedes a formal parameter in the macro definition the actual argument passed by the macro invocation is enclosed in quotation marks and treated as a string literal .",
".. . If a formal parameter in a macro definition is preceded or followed by the token-pasting operator the formal parameter is immediately replaced by the unexpanded actual argument .",
"You can t simply use FILE : LINE because the stringify operator can only be applied to a macro parameter .",
"The operator only works on macro parameters .",
"Use a macro : .. . .. . Less configurability :",
"I m trying to stringize the argument of a macro such that it will give unicode string i.e .",
"a macro or a string",
"With fallback 1 enabled http : perldoc.perl.org overload.html fallback the error is suppressed and Perl will do what it would do anyway coerce the arguments to strings which invokes stringification overloading or other magic and compare them .",
"Macro expansion is not performed on the argument prior to replacement .",
"The operator pastes two tokens such as macro parameters together .",
"Notice that the HPATH macro takes an argument wire .",
"That is as close to -traditional as we can get while still availing of the -operator on which the stringification recipe depends But with it you embrace the possibility of breaking some Fortran code if you preprocess it this way otherwise gfortran itself would not enforce -traditional .",
"It takes the tokens passed as the argument to the macro parameter x and turns them into a string literal .",
"It works because arguments to macros are themselves macro-expanded except where the macro argument name appears in the macro body with the stringifier or the token-paster .",
"It turns macro parameters into string-literals .",
"Using the answer that is often suggested will result in a compiler error when you try to use the IV SECURE macro because : .. . .. . expands to : .. . .. . You might want to try to use the stringizing operator : .. . .. . But that won t work because it only works on macro arguments - not just any old macro .",
"I m doing only for learning purpose In K R book explain how to use the to expand the macro parameter as string .",
"I m trying to stringify a macro in System Verilog so I can use it in a string for printing .",
"A mixture of and is allowed in the macro text however the use of always starts a string literal and must have a terminating .",
"@hanifr : Because the g macro stringifies its argument I guess .",
"If the argument passed to MY FILE are macros say A and B this macro will expand to home.. . A B .",
"To do this I specify that the macro has only one parameter and use it in the body of the macro without but pass all the parameters to the macro in and so the list looks like a single argument .",
"Use a stringify macro : .. . .. . EDIT1 : I added the L in L .",
"The operator applied to a prevents macro expansion so the result is literally f 1 2 .",
"https : gcc.gnu.org onlinedocs cpp Stringification.html .. . .. . If you want to stringify the result-of expansion of a macro argument you have to use two levels of macros .",
"The f a b macro concatenates its arguments g a turns its arguments to a string and h a is helper macro for g a .",
"This allows string-literals to be constructed from macro arguments .",
"Stringizing Operator http : msdn.microsoft.com en-us library 7e3a913x.aspx .. . .. . The number-sign or stringizing operator converts macro parameters to string-literals without expanding the parameter definition .",
"The GCC documentation http : gcc.gnu.org onlinedocs gcc-4.6.1 cpp Argument-Prescan.html says : .. . .. . Macro arguments are completely macro-expanded before they are substituted into a macro body unless they are stringified or pasted with other tokens .",
"I need to stringify a define argument to a wide string .",
"Stylistically you can use backslashes to split the macro up into multiple lines .",
"The standards recommend that the maximum size of a string literal be at least 65536 characters but say nothing about the maximum size of a macro argument which could presumably be larger .",
"However the argument of STR2 is macro-expanded when it s substituted into the definition of STR2 which therefore gives STR1 an argument of 42 with the result-of 42 .",
"or use sprintf if the goal is to produce a string .",
"The output is : 64 because the macro is expanded as : .. . .. . How can I print the identifier number2 as string by using the defined paste macro .",
"Without going into the gory details I want to use a define macro that will expand to a include but the sign is confusing the preprocessor as it thinks I want to quote an argument .",
"The stringify operator only escapes in string constants .",
"You should put parentheses around your macro bodies to prevent surprises due to operator-precedence at the expansion site .",
"Using a not-so-pretty macro you can convert a variable name to its string representation",
"I would like to create a C pre-processor macro that will single-quote the argument .",
"6.10.3.1 1 : .. . .. . .. . After the arguments for the invocation of a function-like macro have been identified argument substitution takes place .",
"So if you do STR1 THE ANSWER then you get THE ANSWER because the argument of STR1 is not macro-expanded .",
"Regardless of where the macro argument text is expanded before or after being passed through the outer level macro The LRM says after the should have allowed the macro that was passed through to be expanded .",
"2 . if there may be other things than string-literals involved ie . you are creating new identifiers from the macros use the preprocessor token pasting operator .",
"At least some C preprocessors let you stringize the value of a macro rather than its name by passing it through one function-like macro to another that stringizes it : .. . .. . Example use cases here http : everything2.com title stringize+macro+macro+hack .",
"I would like to use PAYLOAD LEN as a string in part of another string e.g .",
"I created a STRINGIFY macro : .. . .. . as suggested here : How to create a string from a pre-processor macro http : stackoverflow.com questions 15373113 how-to-create-a-string-from-a-pre-processor-macro 15376637 15376637 .. . .. . However the macro I m trying to stringify takes arguments .",
"I would like to use an include directive with a file name that is passed as an externally defined macro .",
"Simply use string-concatenation for separate parts .",
"You can use also define MACRO name name foo that simply rely on string-concatenation done when 2 strings are following on a single statement .",
"operator is stringizer operator .",
"Like this : .. . .. . The reason is that when macro arguments are substituted into the macro body they are expanded unless they appear with the or preprocessor operators in that macro .",
"But s is an ordinary argument to xstr so it is completely macro-expanded before xstr itself is expanded .",
"Therefore by the time str gets to its argument it has already been macro-expanded .",
"I would suggest making two separate macros say LOCAL TERMINAL and STATIC TERMINAL rather than keying off of a macro argument .",
"If you want to serialize the whole object to string use JSON http : en.wikipedia.org wiki JSON .",
"The first won t work stringizes macro arguments in macro expansions .",
"Thus after the macro wouldn t we have .. . .. . .. . essentially two string-literals back to back .",
"I am defining a macro that evaluates to a constant string holding the filename and the line number for logging purposes .",
"So the first STRINGIFY s will make anything into a string because of the the second STRINGIFY will place an expanded macro into the first define"
]
}
|
{
"confidence": [
58.5645751953125,
58.53618621826172,
52.431610107421875,
50.49362564086914,
46.2508544921875,
45.137840270996094,
44.43613052368164,
44.34021759033203,
42.749752044677734,
40.607154846191406,
40.605918884277344,
40.50929641723633,
39.906959533691406,
38.83116149902344,
38.48736572265625,
37.11688232421875,
36.990806579589844,
35.86838912963867,
35.4526481628418,
35.282447814941406
],
"content": [
"Question : I came across this example of an assertion and was wondering what the is for : .. . Answer : It s a preprocessor feature called stringification http : gcc.gnu.org onlinedocs cpp Stringification.html Stringification . It .. . .. . replaces the macro parameter with the literal text of the actual argument converted to a string constant .",
"Question : This question already has an answer here : .. . .. . Stringification - how does it work questions 16989730 stringification-how-does-it-work 2 answers .. . .. . My first time seeing stringification and token pasting . I feel like it could be a good tool for this macro : .. . .. . should output : Comment : What s wrong with printf s d n MY STRING MY NUMBER Comment : The printf is just for testing . The real question is meant to be creating the macro . Comment : Preprocessor operators and do not work inside quoted string-literals . You cannot use token concatenation to concatenate string-literals either only individual tokens . However you can concatenate two string-literals by just writing them one after another : Hello world . And finally you can only use the stringify operator on macro parameters . @alk : The linked answer is good but I fear that it is not really an answer to this confusion . .. . Answer : try this Comment : Why didn t you write define S x x directly Comment : @Nasr if S MY NUMBER then you get MY NUMBER Comment : @BLUEPIXY this works but I don t understand why Can you explain a bit more on what that second S x may be doing Comment : @tarabyte There is a need to call indirectly for make MY NUMBER expand 3 . var will stringified var to var .",
"Question : I have realised the hard way that operator eq gives a fatal runtime-error when one of the operand is an object with overloaded stringification . Here is a minimal example : .. . .. . The result-of running this is : .. . .. . My expectation from reading perlop http : perldoc.perl.org perlop.html Equality-Operators would be that string context is forced on both operands firing the stringification method in test then the resulting strings are compared . Why doesn t it work What is actually hapenning The context in which I had this problem was in a script that uses both autodie and Try : : Tiny . In the try block I die with some specific messages to be caught . But in the catch block when I test for whether eq my specific message n this gives a runtime if is an autodie : : exception . I know I will have to replace eq .. . with ref eq .. . but I would like to know why . Comment : try test eq test Comment : @HunterMcMillen that worked thanks . But I don t see what difference it makes to the interpreter Comment : eq comparison doesn t actually force test to be stringified it just use string compare on its arguments . .. . Answer : You only overloaded stringification not string-comparison . The overload pragma will however use the overloaded stringification for the string-comparison if you specify the fallback 1 parameter : .. . .. . Details on why this works : .. . .. . When handed an overloaded object the eq operator will try to invoke the eq overload . We did not provide an overload and we didn t provide a cmp overload from which eq could be autogenerated . Therefore Perl will issue that error . With fallback 1 enabled http : perldoc.perl.org overload.html fallback the error is suppressed and Perl will do what it would do anyway coerce the arguments to strings which invokes stringification overloading or other magic and compare them .",
"Question : Is is possible to convert any variable of any type to string I wrote the following .. . .. . define TO STRING val val .. . .. . Is this a valid way of converting a variable into a string Comment : ok I m the one saying this so I will appear as the picky one : there are no strings in C . Comment : @user2485710 That s a pretty weird statement . .. . Answer : You will get a string version of the variable s name i.e . it will convert a to a . The when used like this is called the stringification operator http : gcc.gnu.org onlinedocs cpp Stringification.html Stringification . For example : .. . .. . This will print a is a . What do you expect to happen You can t get the variable s value of course since that s not available when the pre-processor runs which is at compile-time .",
"Question : How can I stringify a preprocessor macro with GNU gfortran I would like to pass a macro definition to GNU gfortran which will then be used as a string in the code . Effectively I would like to do this : .. . .. . and then build with : .. . .. . I tried creating various macro for example : .. . .. . but this doesn t work with the gfortran preprocessor . I also tried using a different style of macro : .. . .. . but this just creates a string containing the text MYMACRO . I then tried changing the macro definition to : .. . .. . but this caused unrelated problem in the build-process . Thank you for your help Comment : -DMYMACRO hello is the right approach . Which problems did it cause Comment : Possible duplicate stackoverflow.com questions 31523615 http : stackoverflow.com questions 31523615 fortran-macro-function-for-literal-string 31524317 31524317 Comment : @VladimirF Escaping the quotes works fine in my example code but in the actual project some complexities of the build-process causes it to fail . Changing the build procedure is not really an option so I would like to find an alternative method if possible . Comment : Could you be more specific as to why escaping the quotes does not work in the real project It is hard to provide solutions with an unknown requirement . Comment : OK I still don t get why the solution from the linked question define STRINGIFY x x wouldn t work for you . .. . Answer : Your attempt to use the well-known stringification recipe of the C preprocessor viz : .. . .. . fails for two reasons each sufficient by itself . First and simplest the source file in which you attempt to employ it apparently has the extension .f90 . What this extension signifies to gfortran and to the GCC compiler driver by any other name is : Free form Fortran source code that should not be preprocessed . Similarly .f95 .f03 and .f08 . If you want gfortran to infer that a source file contains free form Fortran code that must be preprocessed give it one of the extensions .F90 .F95 .F03 or .F08 . See the GCC documentation of these points https : gcc.gnu.org onlinedocs gcc Overall-Options.html Overall-Options .. . .. . Even if you do that simple thing however the second reason bites . The use of the C preprocessor to preprocess Fortran source is as old as C which though old is much younger than Fortran . gfortran is obliged not to break ancient working code so when it invokes the C preprocessor it invokes it in traditional mode . The traditional mode of the C preprocessor is the way in which the preprocessor behaved prior to the first standardization of the C language 1989 insofar as that unstandardized behaviour can be pinned down . In traditional mode the preprocessor does not recognize the stringizing operator which was introduced by the first C Standard . You can verify this by invoking the preprocessor directly like : .. . .. . where test.c contains some attempt to employ the stringification recipe . The attempt fails . You cannot coax gfortran on its own to work the the stringification recipe . But there is a workaround . You can invoke cpp directly unencumbered by traditional mode to preprocess the Fortran source in which you want the stringification done and relay its output to gfortran . If you already know this and were looking for a gfortran -alone solution you need read no further . Doing the stringification in your test source this way would look like : .. . .. . The output of that is : .. . .. . And that output is what you want to to compile . You could accomplish that as well by : .. . .. . Then you will find that . test exists and that executing it outputs hello . You can eliminate the intermediate temporary file with further refinement . Your F90 source code will compile as F95 as the latter is conservative of the former . So you can take advantage of the fact that GCC will compile source piped to its standard input if you tell it what language you are piping using its -x language option . The Fortran dialects that you may specify in this way are f77 f77-cpp-input f95 and f95-cpp-input where the -cpp-input prefix denotes that the source is to be preprocessed and its absence denotes that it is not . Thus .. . .. . works as well as the previous solution minus the temporary file and emits the innocuous warning : .. . .. . Note and retain the final - on the commandline . That is what tells gfortran to compile the standard input . . The meaning of -x f95 brings the additional economy that the source which is preprocessed by cpp is not preprocessed again by the compiler . The use of the option -std c89 when invoking cpp calls for a cautionary explanation . It has the effect of making cpp conform to the earliest C Standard . That is as close to -traditional as we can get while still availing of the -operator on which the stringification recipe depends But with it you embrace the possibility of breaking some Fortran code if you preprocess it this way otherwise gfortran itself would not enforce -traditional . In the case of your test program you could safely omit -std c89 allowing cpp to conform to the default C standard when it was built . But if you permit it or direct it to conform to -std c99 or later then the standard will mandate recognition of as the beginning of a one-line comment as per C++ by which any line of Fortran that contains the concatenation operator will be truncated at the first occurrence . Naturally if you use are using make or another build-system to build the code in which you want the stringified macros you will have a way of telling the build-system what actions constitute compiling a given class of compilable files . For any Fortran source file fsrc you wanted to compile with a stringification preamble the actions to specify would be in the vein : Comment : Thank you for writing such a comprehensive answer . In response to your first point that was just a typo on my part -- I was using the .F90 suffix rather than .f90 . I have edited the question to reflect this . On the second point you have answered my question with You cannot coax gfortran on its own to work the the stringification recipe . It looks like I am either going to have to find a different way to do what I want or convince the project owner to modify their build procedure . The remainder of your second answer gives me a solution to offer . Thanks again .",
"Question : Using Pelles C I would like to show or log an unsigned char array . Is it possible to use the stringize macro to show the whole array as hex values instead of iterating through the array with printf x .. . Answer : No . Stringification only encloses the specified parameters within double quotes .",
"Question : I m looking for a way to convert a preprocessor token to a string . Specifically I ve somewhere got : .. . .. . and I want to use it to prevent buffer overrun : .. . .. . I m open to other ways to accomplish the same thing but standard-library only . Comment : stackoverflow.com questions 195975 http : stackoverflow.com questions 195975 how-to-make-a-char-string-from-a-c-macros-value Comment : Possible duplicate of C Macros to create strings http : stackoverflow.com questions 798221 c-macros-to-create-strings .. . Answer : You should use the double-expansion stringification macro trick . Or just have a .. . .. . and keep it in sync . That s a bit of a bother but as long as the definitions are right next to each other you ll probably remember . Actually in this particular case wouldn t strncpy suffice If it were printf though this would be easier : Comment : Yeah I wish the or another symbol were available for length-limiting scanf routines with an argument . sprintf in that form works better than strncpy imo because strncpy won t terminate the string if it overruns the buffer and writes extra data if the string is too short .",
"Question : I ve went through a number of similar questions and almost got it to work but not quite . What I have is the standard Macro-Expansion-Stringification-method . Then I have a macro PREFIX like this : .. . .. . What I was trying to do was : .. . .. . What this is supposed to output is : XY2Ar-update What it outputs on my GCC-type compiler is : .. . .. . Now I assume that he s replacing the macro correctly but apparently doesn t want to append update to XY2Ar- because of the - . I also tried : .. . .. . which once again almost does what I want however it outputs XY2Ar-.update which is not what I want either . I m out of ideas . .. . Answer : Your thinking seems too complicated : - Do not create a single token to stringify . Simply use string-concatenation for separate parts . Comment : Yeah I get that a lot . I also came to the same conclusion a little while ago . Thanks for pointing it out again though . :",
"Question : I am defining a macro that evaluates to a constant string holding the filename and the line number for logging purposes . It works fine but I just can t figure out why 2 additional macros are needed - STRINGIFY and TOSTRING when intuition suggests simply FILE : LINE . This just seems like an ugly hack to me . Can someone explain in detail what happens stage by stage so that LINE is stringified correctly and why neither of FILE : STRINGIFY LINE and FILE : LINE works Comment : You might find these answers helpful . http : stackoverflow.com questions 3419332 c-preprocessor-stringify-the-result-of-a-macro Comment : The C++ FAQ has an item on this and even says Try concatenating a symbol with LINE and see what happens then . : parashift.com c++-faq-lite misc-technical-issues.html faq-39.6 http : www.parashift.com c++-faq-lite misc-technical-issues.html faq-39.6 .. . Answer : Because of the order of expansion . The GCC documentation http : gcc.gnu.org onlinedocs gcc-4.6.1 cpp Argument-Prescan.html says : .. . .. . Macro arguments are completely macro-expanded before they are substituted into a macro body unless they are stringified or pasted with other tokens . After substitution the entire macro body including the substituted arguments is scanned again for macros to be expanded . The result is that the arguments are scanned twice to expand macro calls in them . So if the argument will be stringified it is not expanded first . You are getting the literal text in the parenthesis . But if it s being passed to another macro it is expanded . Therefore if you want to expand it you need two levels of macros . This is done because there are cases where you do not want to expand the argument before stringification most common being the assert macro . If you write : .. . .. . you want the message to be : .. . .. . and not some insane thing the MIN macro expands to in gcc it uses several gcc-specific extensions and is quite long IIRC .",
"Question : Given define LOG OBJECT object NSLog @ object @ @ @ : d object description NSString stringWithUTF8String : FILE lastPathComponent LINE The statement LOG OBJECT self will produce : .. . .. . 2014-07-18 17 : 43 : 30.041 FrogCamera 12484 : 2144843 self ViewController.m : 20 .. . .. . I wish to understand how the preprocessor code works . How can I see the statement that the pre processor produced Specifically : .. . .. . 1 . Why the whole define statement is wrapped in 2 . Is object a text replacement for what ever value was provided 3 . Why the requirement for @ before the object 4 . Namely how is @ object @ @ @ : d is transformed to @ self @ @ : d Here s a usage example : .. . .. . See GlobalUtilities.h https : github.com amattn AMNGlobalUtilities blob master GlobalUtilities.h L49 for origin of LOG OBJECT statement . Comment : Based on C 2 . is an operator . 4 . Adjacent string-literals are concatenated . .. . Answer : This is rather simple : .. . .. . 1 . Parenthesis in macros are used everytime when the expanded macro could do something unexpected . A typical example is : .. . .. . define SUM A B A + B .. . SUM 1 1 3 the expected result is 6 the real result is 1 + 1 3 4 .. . .. . Adding parenthesis around every macro is a good programming convention to prevent this type of errors . 2 . param is a stringification operator . It wraps the parameter in quotes - e.g . parameter value is converted to value . 3 . The stringification operator creates a C string which is an array of characters char . The author wanted a NSString that s why he is adding an @ in the beginning . Note that @ aaa bbb is equivalent to @ aaabbb this feature enables us to split strings over multiple lines . However this is not very elegant . Using a s would make it a bit simpler . 4 . It is converted only to @ self @ @ @ : d . The compiler considers consecutive strings as one string .",
"Question : My guess is the answer to this question is no but it would be awesome if there was a way . To clarify assume I have the following macro : .. . .. . What I would like to do is somehow perform stringification on all the variables of X before passing it to a variadic function the keyword here is before . I realize there s no way to really access the individual arguments from within the macro definition but is there a way to stringify all the arguments with maybe something like the following .. . Answer : Okay I didn t mean to answer my own question here but I ve come up with a decent solution that is somewhat of a combination of Mark Wilkins answer and the example I gave in the question . It is possible to stringify the entire set variadic set which then includes the delimiting commas in the string . Here s a quick example : .. . .. . Using the above macro shows you that the entire set of arguments passed to the macro gets stringified . Then you can then define a function to tokenize these arguments using the delimiting comma thereby getting the set of tokenized strings by using the variadic-macro : .. . .. . Then there s actually no longer the dependency of having the variadic-macro call a variadic function and I can iterate nicely through my array of constant C strings rather than iterating through va arg . New Stuff from Edit Follows .. . .. . Per Tim s comment here s the details of the solution . Please forgive any errors since it was done in haste and I had to port from what I m working on . Also it s not meant to be copy-paste solution since it only outputs the stringification of the arguments to demonstrate POC but should be sufficient enough to demonstrate the functionality . Although this solution requires some run time computation variadic macros often times call variadic functions and requires iterating through va args so the iteration takes place in finding the tokens although a bit of performance is probably sacrificed . However for maintainability versatility and ease of implementation this seems to be the best option at the moment : Comment : Also another nice feature of this is that I can easily find the number of arguments without having to have some type of information passed through the macro to determine where the arguments in the list ends . Comment : Interesting but before you mark this as a solution post your actual code that solved this . I m sure it will come in handy for others . Comment : @Tim Will do I ve already tested a simple case and will make it a nicer example.. . have some deadlines and will post either tomorrow 5 11 2011 or the following day . Comment : @Tim Updated with the details . Comment : +1 . It seems a good solution . I did not realize C99 supported variadic macros . Nice . I am using a Microsoft compiler that doesn t support it at least not in that form .",
"Question : Using Pelles C I would like to show or log an unsigned char array . Is it possible to use the stringize macro to show the whole array as hex values instead of iterating through the array with printf x .. . Answer : Unfortunately you can t . Stringification can convert your identifiers to strings but not vice versa . Also it can do nothing to the value a variable contains neither read nor write because values can be determined at run time and macros expand at compile-time . In fact I think preprocessor tricks such as and should be avoided if possible because they greatly reduce the readability . include define and if are enough for the most time .",
"Question : My guess is the answer to this question is no but it would be awesome if there was a way . To clarify assume I have the following macro : .. . .. . What I would like to do is somehow perform stringification on all the variables of X before passing it to a variadic function the keyword here is before . I realize there s no way to really access the individual arguments from within the macro definition but is there a way to stringify all the arguments with maybe something like the following .. . Answer : You can use various recursive macro techniques to do things with variadic macros . For example you can define a NUM ARGS macro that counts the number of arguments to a variadic-macro : .. . .. . Then with that you can write a FOREACH macro that expands another macro for each element of a list : .. . .. . Which will in turn allow you to to define your macro that stringifies each of its arguments : Comment : I m aware of those recursive techniques but as seen from above they are tedious and they also have the unfortunate restriction that you re limited to the number of args you account for at compile-time . I ll update my answer soon with the details of that solution that is not as tedious to implement and is not restricted to a predefined max which is easier to maintain . It might be the best solution for all cases but for what I need it is a better answer than above . Thanks for the input though",
"Question : This question already has an answer here : .. . .. . What s the difference between the macros define STR x x and define STR x VAL x with define VAL x x questions 8283596 whats-the-difference-between-the-macros-define-strx-x-and-define-strx 2 answers .. . .. . Consider the following code : .. . .. . With the following command-line : cpp test.cpp -DVAR xxx .. . .. . I would expect from the pre-processor to change both M x and M2 x into xxx . But only M2 is replaced . Why is that Comment : VAR is VAR . M VAR is xxx which is xxx . Comment : stackoverflow.com questions 8283596 http : stackoverflow.com questions 8283596 whats-the-difference-between-these-two-macros 8283625 8283625 Comment : It should change both . Post the complete program . Comment : @Mahesh this is the complete program remmeber that bin cpp only run the pre-processor . Comment : @Mahesh not really http : ideone.com yL2aHB . .. . Answer : When I try this I get : .. . .. . WHICH YOU SHOULD HAVE INCLUDED IN YOUR QUESTION As this page explains . https : gcc.gnu.org onlinedocs cpp Stringification.html .. . .. . If you want to stringify the result-of expansion of a macro argument you have to use two levels of macros . s is stringified when it is used in str so it is not macro-expanded first . But s is an ordinary argument to xstr so it is completely macro-expanded before xstr itself is expanded . Therefore by the time str gets to its argument it has already been macro-expanded . This happens because of the preprocessor s rules for prescanning macro arguments which are explained here https : gcc.gnu.org onlinedocs cpp Argument-Prescan.html Argument-Prescan : .. . .. . The important point from that page is : .. . .. . Macros that call other macros that stringify or concatenate . .. . If an argument is stringified or concatenated the prescan does not occur . If you want to expand a macro then stringify or concatenate its expansion you can do that by causing one macro to call another macro that does the stringification or concatenation . For instance if you have .. . .. . .. . define AFTERX x X x .. . define XAFTERX x AFTERX x .. . define TABLESIZE 1024 .. . define BUFSIZE TABLESIZE .. . .. . .. . AFTERX BUFSIZE expands to X BUFSIZE and XAFTERX BUFSIZE expands to X 1024 . Not to X TABLESIZE . Prescan always does a complete expansion . Comment : Obviously the question is why is that Comment : The short answer is because that is the way the preprocessor has always worked . For the long answer read the page I linked to click on As this page explains . Don t forget to follow the Argument Prescan link . I ll edit my answer to include info from that page too",
"Question : I came across this example of an assertion and was wondering what the is for : .. . Answer : x is the stringification directive .. . .. . define Stringify x x .. . .. . means Stringify abc will be substituted with abc .. . .. . as in",
"Question : My guess is the answer to this question is no but it would be awesome if there was a way . To clarify assume I have the following macro : .. . .. . What I would like to do is somehow perform stringification on all the variables of X before passing it to a variadic function the keyword here is before . I realize there s no way to really access the individual arguments from within the macro definition but is there a way to stringify all the arguments with maybe something like the following .. . Answer : This is probably is not very close to what you are wanting but something like the following might get you there : .. . .. . Then use it like the following . Enclose the parameters in parens so that it appears as one parameter to the macro . MY VARIADIC MACRO var1 var2 string .. . .. . You could then have the macro call some function that strips off the outer parens or possibly parses the given string . Comment : That s almost there but the idea is relieve the need to enclose the parenthesis.. . darn return adds the comment to quick need to remember shift-return . I think the above is very close to a solution I m working towards though . I ll vote up this answer since it is almost there but can t mark it as the main answer since it doesn t fully satisfy the requirements . Comment : @Zach : I guessed as much . I would love to see how that could be done . My understanding is that it is not possible but I would like to be shown differently . Comment : I posted the answer above that I m going to go with pretty stoked about it solves A LOT of the issues I was facing .",
"Question : I ve went through a number of similar questions and almost got it to work but not quite . What I have is the standard Macro-Expansion-Stringification-method . Then I have a macro PREFIX like this : .. . .. . What I was trying to do was : .. . .. . What this is supposed to output is : XY2Ar-update What it outputs on my GCC-type compiler is : .. . .. . Now I assume that he s replacing the macro correctly but apparently doesn t want to append update to XY2Ar- because of the - . I also tried : .. . .. . which once again almost does what I want however it outputs XY2Ar-.update which is not what I want either . I m out of ideas . .. . Answer : Sometimes I keep finding myself forgetting the KISS-principle...and it s times like these where it shows . These simple lines no further expansion or anything return the desired output . As for the reason why it does that : .. . .. . Since there aren t any in there it expands SW PREFIX to XY2Ar- and appends update to it which results in XY2Ar- update which for the compiler is the same as XY2Ar-update . Thanks to the guy who erased his answers for reminding me .",
"Question : Is it possible in C++ to stringify template arguments I tried this : .. . .. . But what I get is a T and not an int . Seems that the preprocessors kicks in before template resolution . Is there any other way to do this Is there any way for the preprocessing to take place after template resolution Compiler is VC++ . Comment : Template resolution kicks in long after the preprocessor does its job . Anyway templates are much more than text substitution well it s not even text substitution so changing the order-of-operations it would not solve your problem . Comment : The preprocessor kicks in before pretty much everything . Hence the name pre -processor . Comment : I ve seen people do template typename T char const get type name return PRETTY FUNCTION and then extract the T .. . out of the string . Comment : Macro expansion happens long before the compiler gets involved . Comment : @litb : a nice hack but why don t you post it as answer so I can upvote that : .. . Answer : You could use some template magic . This has an advantage over RTTI i.e . typeinfo - it is resolved during compilation and disadvantage - you need to provide type information yourself unless there is some library that does that already that I m not aware of maybe something in Boost even . Or as Matrin York http : stackoverflow.com users 14065 martin-york suggested in comments use inline function-templates instead : .. . .. . But if you ll ever need to store more information about that particular type then class templates will probably be better . Comment : Rather than building variables . Build inline-functions that return the appropriate string . Then you will not have the problem of multi-definintions that may crop up with this method . Comment : Good idea I ve edited my answer . Comment : Interestingly the template specializations for each type of interest can be most easily and DRY-ly implemented with a macro : define TYPE STRING T template const char TypeName T : : name STRINGIFY T Comment : @Novelocrat : yes I have already made this exact system in my company . But frankly I am longing for compiler support of typename stringification . This will help serilization frameworks so much .",
"Question : Is there an easy way to add regex modifiers such as i to a quoted regular expression For example : .. . .. . The only way I can think of is to print pat n and get back -xism : F o+ B a+ r and try to remove the i in -xism : with a substitution .. . Answer : You can modify an existing regex as-if it was a string as long as you recompile it afterwards .. . .. . OUTPUT Comment : +1 for showing the appropriate way to plant a modifier into an existing regex . The part is documented in perldoc.perl.org perlre.html Extended-Patterns http : perldoc.perl.org perlre.html Extended-Patterns Comment : This doesn t work after Perl 5.12 because the regex stringification changed .",
"Question : Is it possible in C++ to stringify template arguments I tried this : .. . .. . But what I get is a T and not an int . Seems that the preprocessors kicks in before template resolution . Is there any other way to do this Is there any way for the preprocessing to take place after template resolution Compiler is VC++ . Comment : Template resolution kicks in long after the preprocessor does its job . Anyway templates are much more than text substitution well it s not even text substitution so changing the order-of-operations it would not solve your problem . Comment : The preprocessor kicks in before pretty much everything . Hence the name pre -processor . Comment : I ve seen people do template typename T char const get type name return PRETTY FUNCTION and then extract the T .. . out of the string . Comment : Macro expansion happens long before the compiler gets involved . Comment : @litb : a nice hack but why don t you post it as answer so I can upvote that : .. . Answer : Here s what I do : I have a demangle function implemented on top of abi : : cxa demangle which I call with a couple of convenience template function overloads nameof with either the type I want stringified or an instance of same . It s fairly compact so I ll reproduce it here in all its glory . In demangle.hh we have : .. . .. . And then in demangle.cpp : .. . .. . To use this I think you ll have to link-to libc++ or whatever your local equivalent is to use abi : : cxa demangle . What may be suboptimal for the OP is the fact that this does the demangling and stringification at runtime . I d personally love something constexpr -friendly in leu of this but since I suffer from a severe macro-abuse allergy I find this to be the least generally-unreasonable solution to this problem . the terminator namespace is inconsequential I use this code in a libunwind-based stacktracer called from termination handler feel free to s g that token"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
c-preprocessor
|
UNK_RELATION
|
thrust@stl@126
|
thrust -- thrust is a template library of parallel algorithms with an interface resembling the c++ standard template library @placeholder for nvidia cuda .
|
{
"confidence": [
52.0846061706543,
50.68648910522461,
50.22990417480469,
49.78292465209961,
49.458560943603516,
48.533260345458984,
48.460182189941406,
46.52817916870117,
46.16227340698242,
45.63252639770508,
45.142032623291016,
44.913631439208984,
44.60678482055664,
44.59287643432617,
44.189300537109375,
44.04194259643555,
44.04194259643555,
43.789466857910156,
43.71626663208008,
43.67649459838867,
43.49435806274414,
43.47404479980469,
43.421932220458984,
43.410926818847656,
43.21479797363281,
42.70707702636719,
42.65423583984375,
42.50333786010742,
42.2530517578125,
41.98189163208008,
41.98189163208008,
41.958717346191406,
41.751583099365234,
41.751583099365234,
41.67813491821289,
41.673458099365234,
41.56884765625,
41.56884765625,
41.4224739074707,
41.282344818115234,
41.240455627441406,
41.19102096557617,
41.19102096557617,
41.18495178222656,
41.06587219238281,
41.06587219238281,
41.06587219238281,
41.06587219238281,
40.89208984375,
40.817230224609375,
40.552093505859375,
40.51933670043945,
40.51933670043945,
40.51933670043945,
40.51933670043945,
40.46795654296875,
40.236907958984375,
40.10563278198242,
40.10563278198242,
40.10563278198242,
40.10563278198242,
39.8722038269043,
39.84652328491211,
39.74776077270508,
39.602657318115234,
39.602657318115234,
39.48668670654297,
39.451881408691406,
39.262306213378906,
39.262306213378906,
39.241722106933594,
39.21944046020508,
39.162899017333984,
39.162899017333984,
39.134925842285156,
39.01805114746094,
38.773780822753906,
38.75102996826172,
38.70466995239258,
38.70466995239258,
38.70466995239258,
38.70466995239258,
38.70466995239258,
38.70466995239258,
38.64813232421875,
38.64813232421875,
38.63195037841797,
38.63195037841797,
38.467864990234375,
38.40898895263672,
38.40898895263672,
38.40898895263672,
38.40898895263672,
38.27909851074219,
38.27909851074219,
38.27909851074219,
38.08541488647461,
38.05602264404297,
38.05171203613281,
37.97151184082031
],
"content": [
"I discovered Thrust a C++ library that allows easier implementation of CUDA .",
"thrust : : reduce or thrust : : reduce by key will perform a parallel reduction .",
"I m evaluating CUDA and currently using Thrust library to sort numbers .",
"Starting from Thrust 1.8.1 CUDA Thrust primitives can be combined with the thrust : : device execution policy to run in parallel within a single CUDA thread exploiting CUDA dynamic parallelism .",
"Thrust v1.8 available with CUDA 7 RC or via direct download from the thrust github repository https : github.com thrust thrust includes support for nesting thrust algorithms https : github.com thrust thrust blob master CHANGELOG by including a thrust algorithm call within a custom functor passed to another thrust algorithm .",
"Example syntax : thrust : : sort thrust : : cuda : : par stream keys.begin keys.end",
"There is no problem with CUDA or thrust .",
"docs.nvidia.com cuda thrust iterators-and-static-dispatching http : docs.nvidia.com cuda thrust iterators-and-static-dispatching",
"For using data parallel algorithms on the GPU with CUDA there are two standard libraries CUDPP and Thrust which implement sorting reduction prefix sum etc .",
"http : code.google.com p thrust source browse examples cuda wrap pointer.cu .. . .. . Thrust provides a good example for this question .",
"That s not what Thrust does : Compaction algorithms in Thrust e.g .",
"How to debug cuda thrust programs in visual-studio with parallel nsight",
"Create a thrust : : device ptr using thrust : : device pointer cast on that device pointer see here http : code.google.com p thrust source browse examples cuda wrap pointer.cu for more information .. . .. . You can the either make a thrust : : device vector using the thrust : : device ptr or dirctly pass the thrust : : device ptr to any algorithms which accept an iterator .",
"Thrust is an open-source template library so it is theoretically possible for you to study all the code yourself but that is probably difficult .",
"This is true for both stl and thrust algorithms .",
"I did not update the Thrust library after that .",
"Is it possible to sort objects using the Thrust library",
"Thrust s custom temporary allocation https : github.com thrust thrust blob 1.6.0 examples cuda custom temporary allocation.cu example demonstrates how to build your own custom allocator for the temporary storage used internally by Thrust algorithms .",
"I want to update the answer provided by talonmies following the release of Thrust 1.8 which introduces the possibility of indicating the CUDA execution stream as .. . .. . see also .. . .. . Thrust Release 1.8.0 https : github.com thrust thrust releases .",
"@einpoklum It is a Thrust execution policy just like thrust : : seq or thrust : : device .",
"Starting from Thrust 1.8 CUDA Thrust primitives can be combined with the thrust : : seq execution policy to run sequentially within a single CUDA thread or sequentially within a single CPU thread .",
"I want to take advantage of polymorphism with CUDA Thrust .",
"I want to use Thrust library to calculate prefix sum of device array in CUDA .",
"I also ran the correpsonding expamples for .. . .. . thrust : : gather if .. . thrust : : scatter .. . thrust : : count .. . thrust : : inclusive scan .. . thrust : : sort by key .. . thrust : : reduce by key .. . .. . And of these only the last three inclusive scan sort by key reduce by key work i.e . do not crash cuda-gdb .",
"This seems to be a bug : github.com thrust thrust issues 776 https : github.com thrust thrust issues 776 .",
"You can pass the device memory encapsulated inside a thrust : : device vector to your own kernel like this : .. . .. . and you can also use device memory not allocated by thrust within thrust algorithms by instantiating a thrust : : device ptr with the bare cuda device memory pointer .",
"The reason you are observing a difference in performance is because Thrust is implementing the sort with different algorithms depending on the arguments provided to thrust : : sort .",
"I am using CUDA Thrust CUDPP .",
"Note that the version of thrust that shipped with CUDA 7 has an issue https : github.com thrust thrust issues 664 that prevents proper issuing of thrust kernels to streams in some cases .",
"I ve looked in thrust : : system and thrust : : system : : cuda and haven t found anything that looks like a static system allocator .",
"There is a full working example of this included with thrust : unwrap pointer.cu http : code.google.com p thrust source browse examples cuda unwrap pointer.cu",
"After my failure with Thrust I focused on cuDPP library which used to be a part of CUDA toolkit .",
"You should open an issue here : github.com thrust thrust issues https : github.com thrust thrust issues",
"github.com thrust thrust issues 655 https : github.com thrust thrust issues 655",
"Perhaps you should read the thrust quick start guide https : github.com thrust thrust wiki Quick-Start-Guide which discusses dispatch of thrust algorithms .",
"Related link : How to use CUB and Thrust in one CUDA code http : stackoverflow.com questions 26812038 how-to-use-cub-and-thrust-in-one-cuda-code",
"Does thrust library ensure that there wont be a memcpy from host to device in the process",
"Does thrust library ensure that there wont be a memcpy from host to device in the process",
"Thrust algorithms can be launched from device code .",
"Thrust fallback allocator example https : github.com thrust thrust blob master examples cuda fallback allocator.cu gives a possible implementation along the lines of what talonmies describes to implement mapped pinned memory with thrust .",
"How to sort with less precision on keys with Thrust library http : stackoverflow.com questions 11012040 how-to-sort-with-less-precision-on-keys-with-thrust-library 11126833 11126833",
"The traditional way to do this is to wrap the device pointer into a thrust : : device ptr and pass that to thrust algorithms .",
"You seem to be going down an odd path here for a thrust beginner running Thrust algorithms from within a functor .",
"You can work around it with this : uint64 t min iter thrust : : min element thrust : : device thrust : : device pointer cast dev thrust : : device pointer cast dev+5 .get",
"I happened to be using CUDA 5.0 and thrust 1.5.3 for this exercise .",
"The Visual Profiler timeline shows the concurrency of CUDA Thrust operations and memory transfers .. . .. .",
"I just write an simple CUDA Thrust program but when I run it .",
"I am trying to solve a problem using CUDA Thrust .",
"In the thrust example there is code expand.cu .",
"If you pass a thrust : : device ptr it will return a thrust : : device ptr .",
"Yes it s possible to use thrust to do something similar with parallel execution on the host CPU using OMP threads underneath the thrust OMP backend https : github.com thrust thrust wiki Device-Backends .",
"This has been confirmed as a bug https : github.com thrust thrust issues 776 in Thrust .",
"Here s an example from the Thrust docs : .. . .. . Use thrust : : inclusive scan or thrust : : exclusive scan to compute the prefix sum .",
"The thrust expand example https : github.com thrust thrust blob master examples expand.cu demonstrates some ideas that may be useful .",
"Purely as a matter of conjecture this issue may be related to thrust issue 715 https : github.com thrust thrust issues 715",
"But according to Jared Hoberock NVIDIA this might be due to problems with CUDA drivers on Windows : groups.google.com forum topic thrust-users nXQD6j7 xfs https : groups.google.com forum topic thrust-users nXQD6j7 xfs",
"You initialize and populate thrust vectors just like standard containers i.e .",
"I m using Thrust library and want to use my own in my kernel .",
"I am new to thrust library and trying to use it in my project .",
"I want to combine the thrust library and cufft in my project .",
"I ve tried the one from Thrust library but it s a way too slow .",
"You could use thrust : : device vector or thrust : : device ptr instead .",
"1.508 ms pure Thrust implementation with thrust : : inclusive scan by key .. . .. .",
"Thrust is fundamentally intended to allow data parallel versions of typical STL algorithms to be applied to POD types .",
"How can I use CUDA Thrust reduction with double2 arrays",
"Yes the thrust version that ships with CUDA 7.5 picked up the fix for this issue .",
"Here s how to implement that computation with Newton https : github.com jaredhoberock newton which is the library mentioned in talonmies comment : .. . .. . The library is built using thrust : : zip iterator and thrust : : transform iterator to implement expressions with an arbitrary number of inputs .",
"I have the following custom functor : .. . .. . The functor is called from the below code located in main .. . .. . Example errors : .. . - no instance of function template GetAverage : : operator matches the argument list .. . - no operator matches these operands .. . - no suitable conversion function from InputValueType to TemporaryType exists .. . - no suitable conversion function from thrust : : detail : : tuple of iterator references thrust : : device reference int int thrust : : null type thrust : : null type thrust : : null type thrust : : null type thrust : : null type thrust : : null type thrust : : null type thrust : : null type to TemporaryType exists .. . .. . Does anyone have any ideas on how to fix this",
"Is this possible with Thrust",
"Arrayfire : .. . .. . Thrust :",
"Below is code that exemplifies what I m trying to do : .. . .. . .. . .. . Unfortunately this yields such errors as error : no operator matches these operands error : no suitable conversion function from InputValueType to TemporaryType exists and error : no suitable conversion function from const thrust : : tuple int int thrust : : null type thrust : : null type thrust : : null type thrust : : null type thrust : : null type thrust : : null type thrust : : null type thrust : : null type to int exists .",
"But I am facing strange behaviour using the thrust : : system : : cuda : : experimental : : pinned allocator from the thrust library : .. . .. . Which in my setup gives : .. . .. . Why does the copy from device to host seems to fail",
"You can use a functor with thrust https : github.com thrust thrust wiki Quick-Start-Guide or lambda expressions https : devblogs.nvidia.com parallelforall new-features-cuda-7-5 .",
"In the particular failing case I believe the kernel launch is arising from here https : github.com thrust thrust blob master thrust system cuda detail detail launch closure.inl .",
"Don t know thrust library but in most libraries tuples are immutable for a good reason .",
"Thrust deliberately abstracts all of the underlying CUDA API calls away sacrificing some performance for ease of use and consistancy keep in mind that thrust has backends other than CUDA .",
"The workaround would be to 1 . update the thrust on CUDA 7 to the current development version https : github.com thrust thrust which includes the fix for the issue or 2 . revert to CUDA 6.5 or advance to some future CUDA toolkit version when it becomes available .",
"Here s some documentation : github.com thrust thrust wiki Direct-System-Access https : github.com thrust thrust wiki Direct-System-Access",
"It looks like a bug of thrust .",
"It is a bug of thrust : : min element .",
"This is a better way to use thrust .",
"Don t use thrust : : reduce .",
"I am a newbie to Thrust .",
"Here is the example with Thrust",
"Here http : stackoverflow.com questions 37519394 thrust-error-with-cuda-separate-compilation is a working example of thrust with separable compilation turned on not using CMake .",
"See the custom temporary allocation example https : github.com thrust thrust blob master examples cuda custom temporary allocation.cu to see how to create a cache for your pre-allocated slab .",
"Thrust 1.7 ships with CUDA 5.5 which may not be publicly released yet .",
"I m rather new to CUDA Thrust and have a problem with a code snippet .",
"How do you suggest that I go about debugging a much larger CUDA program with several thrust calls embedded in it I don t care to debug into the thrust kernels themselves just my own kernels problem is having thrust calls in the program causes cuda-gdb to crash",
"Is there a conversion between thrust : : device vector thrust : : complex double and cuDoubleComplex",
"how about using thrust : : tabulate with a custom UnaryOperation instead of thrust : : sequence",
"I am trying to input a thrust : : vector of thrust : : vectors into a functor .",
"Is there a way to ensure that the thrust internals are using the proper allocator in older versions of thrust",
"There now appears to be a patch https : github.com thrust thrust pull 777 which has been added to the current Thrust development branch to address this problem .",
"For a general review of transform iterator counting iterator and permutation iterator refer to the thrust quick start guide https : github.com thrust thrust wiki Quick-Start-Guide .",
"Use thrust : : max element thrust : : min element in thrust extrema.h : .. . .. . Be careful when passing an empty range to max element -- you won t be able to safely dereference the result .",
"The thrust OMP device backend https : github.com thrust thrust wiki Device-Backends does not use the GPU .",
"The sort code uses thrust library : .. . .. . I want to know how thrust dispatch the sort function to cuda kernels so I tried to add breakpoints in front of lines above and compiled the project in debug mode .",
"here http : stackoverflow.com questions 17703990 cuda-gdb-crashes-with-thrust-cuda-release-5-5 .. . .. . To quote a comment : Thrust is known to not compile and run correctly when built for debugging .. . .. . And from the docs https : code.google.com p thrust wiki Debugging : nvcc does not support device debugging Thrust code .",
"I just want to know the details of decision processes in thrust library ."
]
}
|
{
"confidence": [
68.88795471191406,
68.4357681274414,
66.82156372070312,
66.4311294555664,
64.59831237792969,
63.28744125366211,
62.906639099121094,
62.79784393310547,
62.26105499267578,
62.014869689941406,
61.73949432373047,
61.3281135559082,
61.2630615234375,
60.96995544433594,
60.5357666015625,
60.42570877075195,
60.360389709472656,
59.93638229370117,
59.90544128417969,
59.70446014404297
],
"content": [
"Question : For using data parallel algorithms on the GPU with CUDA there are two standard libraries CUDPP and Thrust which implement sorting reduction prefix sum etc . So what are the main differences between the libraries in terms of performance and features .. . Answer : I have used both for sorting and prefix sums about a year ago with CUDA 4.1 but I can t remember the versions of Thrust and CUDPP and I experienced that CUDPP is a little bit faster but Thrust is easier to use using float-array with about 20M entries . As for the features as far as I can recall you can use Thrust also with host memory not only with device memory as opposed to CUDPP but this might be outdated .",
"Question : I have two vectors oldvector and newvector . I need to calculate the value of the residual which is defined by the following pseudocode : .. . .. . Currently I am calculating this with two CUDA Thrust operations which are essentially doing : .. . .. . followed by a thrust : : transform reduce with a square as unary operator which is doing : .. . .. . The problem with this is obviously the intermediate store to global memory before transform reduce . Is there a more efficient approach to this problem which would fuse these two steps Apart from writing my own CUDA kernel is there any other option One approach I thought of was to write a thrust : : reduce with zip iterators . The problem with this is that the return-type of the operator has to be the same type as its input . What this means according to me is that the reduction operator would be returning a tuple which would mean an extra addition . If I do write a reduction CUDA kernel has there been any improvements made over the CUDA 1.1 example for the reduction kernel Comment : thrust : : inner product http : thrust.github.io doc group transformed reductions.html gad9df36f7648745ca572037727b66b48d will do what you want . Provide a binary op2 which computes the difference-squared . Your binary op1 can just be thrust : : plus . .. . Answer : thrust : : inner product http : thrust.github.io doc group transformed reductions.html gad9df36f7648745ca572037727b66b48d will do it in a single function-call . Your original idea can be made to work also zipping together the two vectors and using thrust : : transform reduce This code demonstrates both methods : .. . .. . You can also investigate eliminating the functor definition used with the inner product example by using thrust placeholders http : thrust.github.io doc namespaceplaceholders.html . Even if you want to write your own CUDA code the standard recommendation now for oft-used algorithms like parallel reductions and sorting is to use cub http : nvlabs.github.io cub . And yes the CUDA parallel reduction sample http : docs.nvidia.com cuda cuda-samples index.html cuda-parallel-reduction and accompanying presentation http : docs.nvidia.com cuda samples 6 Advanced reduction doc reduction.pdf is still a good basic intro to a fast parallel reduction .",
"Question : I am using visual-studio-2010 parallel nsight 2.2 and cuda 4.2 for learning . My system is Windows 8 pro x64 . I opened the radix sort project which included by cuda computing SDK in VS and compiled it with no error . The sort code uses thrust library : .. . .. . I want to know how thrust dispatch the sort function to cuda kernels so I tried to add breakpoints in front of lines above and compiled the project in debug mode . But when I use parallel nsight for cuda debugging there are always errors that no source correspondence for breakpoint . So my problems are : .. . .. . 1 . How to debug cuda thrust programs in visual-studio with parallel nsight 2 . Or is there anyone can instruct me using another way to know how cuda thrust dipatch functions to cuda kernels or other functions Any advise will be appreciated .. . Answer : Normally to debug device code in CUDA it s necessary to pass the : .. . .. . switches to nvcc . However this modality is not supported with thrust code http : code.google.com p thrust wiki Debugging . You can get an idea of how thrust code gets dispatched to the device by following the structure in the thrust include files . Since thrust is entirely templatized code there are no libraries to worry about . However that s a challenging proposition . You can also tell the compiler to generate ptx : .. . .. . which is one of the intermediate code types http : docs.nvidia.com cuda parallel-thread-execution index.html that cuda code gets compiled to . However that is not a trivial thing to parse either . This link http : code.google.com p thrust wiki Debugging gives some alternate ideas for debugging with Thrust . Comment : Thank you Robert I ve read the thrust wiki on debugging already . But I think its contents are not very usable to my problems . I just want to know the details of decision processes in thrust library . So I was trying to read the source code and may also try to read ptx code . Thank you",
"Question : I am coding in C++ and I have a Matrix and a Vector which have to be multiplied . Both are classes that I defined and both wrap a 1-D std : : vector the data-type is long-long int . I have already parallelized the code with std : : thread s but now I would like to take advantage of my NVIDIA GPU and code the multiplication in CUDA . In order to keep my hands as clean as possible do you know if there exists a library that implements such an algorithm and that I can easily use I have seen there is Thrust but from this example https : solarianprogrammer.com 2012 05 31 matrix-multiplication-cuda-cublas-curand-thrust it does not seem exactly what I am looking for which instead would be something like .. . .. . Am I asking for too much Comment : do you know if there exists a library.. . You may want to read this http : stackoverflow.com help on-topic where it states Questions asking us to recommend or find a book tool software library tutorial or other off-site resource are off-topic for Stack Overflow .. . Answer : mat-vec multiplication is a standard BLAS https : en.wikipedia.org wiki Basic Linear Algebra Subprograms operation . However your data type is not a standard one float or double . So it may not be the best choice to convert your data to double use BLAS routines like gemv http : docs.nvidia.com cuda cublas cublas-lt-t-gt-gemv and convert the result back to long-long . Alternatively you could create your own CUDA kernel or use Thrust https : thrust.github.io to avoid writing kernel code but with some performance degrade . You could start from this example https : github.com thrust thrust blob master examples sum rows.cu to see how to sum a matrix row-by-row into a column vector which is the second step for mat-vec-mul operation after you finish the element-wise multiplication between each row the matrix and the vector . Comment : OK thanks for the advice",
"Question : Is it possible to sort objects using the Thrust library I have the following struct : .. . .. . Is it possible to use thrust in order to sort an array of OB according to N Can you provide a simple example on using thrust to sort objects If thrust is not able to do so is there any other CUDA libraries that allows me to do so .. . Answer : Up until now you cannot sort custom objects . You can do key based sorting but not of custom objects like the struct you mentioned . There are a couple of other open CUDA based algorithms available for doing this but that too requires some modification etc to make them work for you . Comment : That is not correct . There are versions of all the basic thrust sorting algorithms which take a functor modelled on the STL strict weak ordering binary predicate . If you provide a functor which acts like this model on a given user object the sort will work correctly .",
"Question : Looking at kernel launches within the code of CUDA Thrust it seems they always use the default stream . Can I make Thrust use a stream of my choice Am I missing something in the API .. . Answer : Up to the current release snapshot which ships with CUDA 6.0 - No you are not missing anything . Thrust deliberately abstracts all of the underlying CUDA API calls away sacrificing some performance for ease of use and consistancy keep in mind that thrust has backends other than CUDA . If you want that level of flexbility you will need to try another library CUB for example . In later version it has become possible to set a stream of choice . Comment : It should be possible with the master development branch of thrust to begin experimenting with using streams with thrust . The experimental announcement is here https : groups.google.com forum topic thrust-users i6pxQ9jPZFU . Comment : Example syntax : thrust : : sort thrust : : cuda : : par stream keys.begin keys.end",
"Question : I ve written kernels using normal CUDA code which does not use thrust device vectors . The kernels outputs some results stored in an array on the device say array X . I d like to now do a reduction on X . Is there a way to use the thrust : : reduction function without first copying X into a thrust : : device vector variable .. . Answer : The traditional way to do this is to wrap the device pointer into a thrust : : device ptr and pass that to thrust algorithms . The tag based template model in Thrust will ensure that a device execution results because of the type of the input sequence supplied in the call . From Thrust 1.7 onwards the concept of execution policies have been introduced . This removes the need for explicit wrapping of the device address using device ptr . So instead you can use to thrust : : device policy to indicate that the input iterators are on the device and do something like .. . .. . Which way you choose to do this should be guided by what version of Thrust you have and which code style you prefer .",
"Question : I would like to use Thrust to evaluate expressions consisting of elementwise matrix operations . To make it clear let us consider an expression like : .. . .. . D A B+3 sin C .. . .. . where A B C and D are matrices of course of the same size . The Thrust Quick Start Guide http : docs.nvidia.com cuda thrust index.html provides the saxpy example for which y is used both as input and as output while in my case the output argument is different from the input ones which by the way are more than two . At Element-by-element vector multiplication with CUDA http : stackoverflow.com questions 16899237 element-by-element-vector-multiplication-with-cuda the case of output different than the input but of only two inputs is considered . Could anyone provide some suggestions and possibly the rationale behind on how using Thrust to implement the expression above output matrix different from the inputs and more than two inputs Thanks . Comment : Have you looked at Newton https : github.com jaredhoberock newton That is a working prototype of expression-templates using thrust . Comment : @talonmies No . Actually I have my own expression-templates library and wanted to benchmark the performance against thrust.. . : - .. . Answer : Here s how to implement that computation with Newton https : github.com jaredhoberock newton which is the library mentioned in talonmies comment : .. . .. . The library is built using thrust : : zip iterator and thrust : : transform iterator to implement expressions with an arbitrary number of inputs . You can refer to the implementation for the details . Comment : Thank you very much for your answer . I will surely take a look at your implementation of expression-templates using thrust . As I have mentioned to talonmies I have my own implementation of expression-templates in CUDA and I would like to figure out how faster it is as compared to a standard implementation involving temporaries . Therefore I was planning to use matrix operations with pure thrust . My concern is that if I use Newton as you suggest then I would not see the effect of the creation of temporaries . What do you think about Comment : There are no temporaries created in the D A B + 3.f sin C expression . The assignment should result in a single kernel launch . Comment : Yes of course . But in my test now I do want the creation of temporaries to understand how much do I gain by expression templates.. . Comment : It sounds like you re asking how to implement that expression as inefficiently as possible : I suppose you could create functions such as operator+ which take device vector float parameters and return device vector float as a value . The implementation of such functions would just use thrust : : transform . Comment : In some sense yes : - I verified that evaluating expressions by my metaprogramming implementation takes the same time as by hand-written kernels so I m happy . I wanted then to compare such performance with that of an already available library and I thought about thrust . But thrust means pure thrust without the help of Newton : - Of course it would be interesting to compare the performance of my implementation with that of your own library and if my mine will tend to yours I will be happy : - From what you mentioned making the test with thrust will require some effort .",
"Question : I have a 5000x500 matrix and I want to sort each row separately with cuda . I can use arrayfire but this is just a for-loop over the thrust : : sort which should not be efficient . https : github.com arrayfire arrayfire blob devel src backend cuda kernel sort.hpp .. . .. . Is there a way to fuse operations in thrust so as to have the sorts run in parallel Indeed what I am looking for is a generic way to fuse for-loop iterations into . Comment : Could you adapt the approach in How to normalize matrix columns in CUDA with max performance http : stackoverflow.com questions 14211093 how-to-normalize-matrix-columns-in-cuda-with-max-performance Comment : I would try nesting a call to thrust : : sort inside a call to thrust : : for each . Comment : I am trying to understand both approaches.. . Thank you . Comment : Ok I give up . Going to do it the easy way . .. . Answer : I can think of 2 possibilities one of which is suggested already by @JaredHoberock . I don t know of a general methodology to fuse for-loop iterations in thrust but the second method is the more general approach . My guess is that the first method would be the faster of the two approaches in this case . 1 . Use a vectorized sort . If the regions to be sorted by your nested for-loops are non-overlapping you can do a vectorized sort using 2 back-to-back stable-sort operations as discussed here https : groups.google.com forum topic thrust-users BoLsxO6b4FY . 2 . Thrust v1.8 available with CUDA 7 RC or via direct download from the thrust github repository https : github.com thrust thrust includes support for nesting thrust algorithms https : github.com thrust thrust blob master CHANGELOG by including a thrust algorithm call within a custom functor passed to another thrust algorithm . If you use the thrust : : for each operation to select the individual sorts you need to perform you can run those sorts with a single thrust algorithm call by including the thrust : : sort operation in the functor you pass to thrust : : for each . Here s a fully worked comparison between 3 methods : .. . .. . 1 . the original sort-in-a-loop method .. . 2 . vectorized batch sort .. . 3 . nested sort .. . .. . In each case we re sorting the same 16000 sets of 1000 ints each . Notes : .. . .. . 1 . These results will vary significantly from GPU to GPU . 2 . The nested time method may vary significantly on a GPU that can support dynamic parallelism as this will affect how thrust runs the nested sort functions . To test with dynamic parallelism change the compile switches from -arch sm 20 to -arch sm 35 -rdc true -lcudadevrt .. . 3 . This code requires CUDA 7 RC . I used Fedora 20 . 4 . The nested sort method also will allocate from the device side therefore we must substantially increase the device allocation heap using cudaDeviceSetLimit . 5 . If you are using dynamic parallelism and depending on the type of GPU you are running on the amount of memory reserved with cudaDeviceSetLimit may need to be increased perhaps by an additional factor of 8 . Comment : Thank you extremely much Not only have you answered my question you have also shown me how to do a lot of things correctly . I must add I saw this : stackoverflow.com questions 9037906 http : stackoverflow.com questions 9037906 fast-cuda-thrust-custom-comparison-operator And realized that the normal thrust sort would be faster than anything else besides a hand coded parallel sorting approach . My data was unsigned and the 16 most significant bits of my data were all zero . So I just put the row-number in the 16 msb and sorted it will thrust sort .",
"Question : I am a newbie to Thrust . I see that all Thrust presentations and examples only show host code . I would like to know if I can pass a device vector to my own kernel How If yes what are the operations permitted on it inside kernel device code .. . Answer : This is an update to my previous answer . Starting from Thrust 1.8.1 CUDA Thrust primitives can be combined with the thrust : : device execution policy to run in parallel within a single CUDA thread exploiting CUDA dynamic parallelism . Below an example is reported . The above example performs reductions of the rows of a matrix in the same sense as Reduce matrix rows with CUDA http : stackoverflow.com questions 17862078 reduce-matrix-rows-with-cuda but it is done differently from the above post namely by calling CUDA Thrust primitives directly from user written kernels . Also the above example serves to compare the performance of the same operations when done with two execution policies namely thrust : : seq and thrust : : device . Below some graphs showing the difference in performance . Timings http : i.stack.imgur.com Vzc3L.jpg .. . .. . Speedups http : i.stack.imgur.com ajYbj.jpg .. . .. . The performance has been evaluated on a Kepler K20c and on a Maxwell GeForce GTX 850M .",
"Question : I met some problems When using functions in thrust library I am not sure if I should add cudaDeviceSynchronize manually before it . For example .. . .. . Since kernel 1 is non-blocking host will execute the next statement . The problem is I am not sure if the thrust : : max element is blocking . If it is blocking then it works well otherwise will host skip it and execute the printf statement Thanks .. . Answer : Your code is broken in at least 2 ways . 1 . it is presumably a device pointer : .. . .. . kernel 1 blocks threads it .. . .. . .. . .. . it is not allowed to use a raw device pointer as an argument to a thrust algorithm : .. . .. . dt thrust : : max element it it + 10 .. . .. . .. . .. . unless you wrap that pointer in a thrust : : device ptr or else use the thrust : : device execution policy explicitly as an argument to the algorithm . Without any of these clues thrust will dispatch the host code path which will probably seg fault as discussed in the thrust quick start guide https : github.com thrust thrust wiki Quick-Start-Guide . 2 . If you fixed the above item using either thrust : : device ptr or thrust : : device then thrust : : max element will return an iterator https : thrust.github.io doc group extrema.html of a type consistent with the iterators passed to it . If you pass a thrust : : device ptr it will return a thrust : : device ptr . If you use thrust : : device with your raw pointer it will return a raw pointer . In either case it is illegal to dereference such in host code : .. . .. . dt thrust : : max element it it + 10 .. . .. . .. . .. . again I would expect such usage to seg fault . Regarding asynchrony it is safe to assume that all thrust algorithms that return a scalar quantity stored in stack variable are synchronous . That means the CPU thread will not proceed beyond the thrust call until the stack variable has been populated with the correct value .. . .. . Regarding GPU activity in general unless you use streams all GPU activity is issued to the same default stream . This means that all CUDA activity will be executed in-order and a given CUDA operation will not begin until the preceding CUDA activity is complete . Therefore even though your kernel launch is asynchronous and the CPU thread will proceed onto the thrust : : max element call any CUDA activity spawned from that call will not begin executing until the previous kernel launch is complete . Therefor any changes made to the data referenced by it by kernel 1 should be finished and completely valid before any CUDA processing in thrust : : max element begins . And as we ve seen thrust : : max element itself will insert synchronization . So once you fix the defects in your code there should not be any requirement to insert additional synchronization anywhere . Comment : Thanks for your extensive explanation .",
"Question : I am currently trying to parallelize thrust cuda code that currently runs sequentially in a main function and therefore does not harness the power of the GPU . I have essentially taken functional code an put it into a functor that thrust : : for each can call using cuda streams . However if I define the functor using .. . .. . VS2013 throws all sorts of warnings saying that I am trying to launch host functions from the device . These errors are occurring in places were I am defining a vector using .. . .. . as well as some thrust : : transform functions . It specifically quotes problems with the thrust : : device malloc allocator . If I define the functor as strictly a host functor these errors all go away however when I use the profiler it becomes evident that only 0.01 of the device is being used leading me to believe for each is not actually launching the thrust code in the functor . EDIT below is some code that compiles and shows this error .. . .. . Is it possible that thrust : : for each cannot call host functors Are some thrust calls innately connected to the host behind the scenes The only potential workaround I can see is creating a host device fucntor that has separate host and device defined code within it . It is also possible that I have missed something while researching this subject . Any advice would be greatly appreciated . Comment : You many want to create a MCVE code to reproduce your problem . stackoverflow.com help mcve http : stackoverflow.com help mcve .. . Answer : Thrust provides a host and a device path for all its algorithms but algorithms can only be launched from the host . At compile-time Thrust looks at the types of the iterators to determine which path to build . If it builds a device path then the same restrictions apply as for regular CUDA code one of which is that device code cannot call functions on the host . So a statement like thrust : : sort launches an algorithm and can only exist in host code . At compile-time the iterators passed to sort are examined and the Thrust templates are used for building either a host or a device version of sort that handles your particular types . If a device version is built and it takes a functor it must also be possible to build a device version of the functor which means that the functor can t contain a Thrust statement that launches a new algorithm . At runtime the device version of a statement like thrust : : sort will launch one or more CUDA kernels so what you might want to look into is Thrust s ability to combine separate algorithms into the same kernel which Thrust calls kernel fusion . There are a couple of ways to do this one of which is to use a transform iterator . See the Thrust docs for details . Comment : Thrust algorithms can be launched from device code . This answer is incorrect . OP has already asked several questions demonstrating that thrust algorithms can be launched from device code . Comment : I can clearly see that some can be launched from device code but it seems like some cannot . Is it just that some cannot at least in the form I m using specifically transforms and device vector allocations Are these set up differently in the library I tried to send the thrust : : device and also the thrust : : seq flag and it still threw a bunch of errors and did not work . Comment : A device vector is not an algorithm . You may want to read the thrust quick start guide . thrust : : device vector which is a container not an algorithm cannot be used in device code as the other answer already indicated to you . And no thrust : : for each or any algorithm cannot use a host only functor if the algorithm is working with device data . Comment : Oh I see . This makes much more sense now . Also when the containers are properly passed in the errors for the thrust : : transform also goes away . So this solves my problem . Thank you .",
"Question : I would like to copy memory from the host to the device using thrust as in .. . .. . using CUDA streams analogously to how you would copy memory from the device to the device using streams : .. . .. . The problem is that I can t set the execution policy to CUDA to specify the stream when copying from the host to the device because in that case thrust would assume that both vectors are stored on the device . Is there a way to get around this problem I m using the latest thrust version from github it says 1.8 in the version.h file . Comment : The announcement I read https : groups.google.com forum topic thrust-users i6pxQ9jPZFU made it sound like streams were implemented for underlying kernel calls not necessarily across-the-board in thrust . If you did use streams for copying from host vector to device vector it s likely that you would want to use a pinned allocator http : thrust.github.io doc classthrust 1 1system 1 1cuda 1 1experimental 1 1pinned allocator.html on the host . I believe therefore that what you re asking for could be accomplished with thrust vectors and cudaMemcpyAsync . Comment : Yes you should use cudaMemcpyAsync for this directly as Robert suggests . Comment : Af of today May 2016 I find the first entry in the documentation here : thrust.github.io doc http : thrust.github.io doc group copying.html ga3e43fb8472db501412452fa27b931ee2 really disturbing . It says that we can write thrust : : copy thrust : : cuda : : par.on cudaStream HostPtr HostPtr+size DevicePtr as a valid syntax without getting your copy issued asynchronously to the particular stream you pass in parameter.. . .. . Answer : As indicated in the comments I don t think this will be possible directly with thrust : : copy . However we can use cudaMemcpyAsync in a thrust application to achieve the goal of asynchronous copies and overlap of copy with compute . Here is a worked example : .. . .. . For my test case I used RHEL5.5 Quadro5000 and cuda 6.5RC . This example is designed to have thrust create very small kernels only a single threadblock as long as KSIZE is small say 32 or 64 so that the kernels that thrust creates from thrust : : for each are able to run concurrently . When I profile this code I see : .. . .. . nvvp output for thrust streams application http : i.stack.imgur.com RoGmb.png .. . .. . This indicates that we are achieving proper overlap both between thrust kernels and between copy operations and thrust kernels as well as asynchronous data copying at the completion of the kernels . Note that the cudaDeviceSynchronize operation fills the timeline indicating that all the async operations data copying thrust functions were issued asynchronously and control returned to the host thread before any of the operations were underway . All of this is expected proper behavior for full concurrency between host GPU and data copying operations . Comment : is the use pf pinned allocator necessary to make cudaMemcpyAsync work correctly on a thrust : : host vector What would happen if I used a standard thrust : : host vector Comment : Standard host vector uses an unpinned i.e . not page-locked allocator . That means that when you try to do a cudaMemcpyAsync the operation will not be asynchronous . And if you are attempting to overlap that operation with something else it will not overlap . Take a look here http : docs.nvidia.com cuda cuda-c-programming-guide index.html page-locked-host-memory and here http : docs.nvidia.com cuda cuda-c-programming-guide index.html asynchronous-concurrent-execution Comment : Note that the version of thrust that shipped with CUDA 7 has an issue https : github.com thrust thrust issues 664 that prevents proper issuing of thrust kernels to streams in some cases . The workaround would be to 1 . update the thrust on CUDA 7 to the current development version https : github.com thrust thrust which includes the fix for the issue or 2 . revert to CUDA 6.5 or advance to some future CUDA toolkit version when it becomes available . Comment : Was this fixed in 7.5 or does it still remain Comment : Yes the thrust version that ships with CUDA 7.5 picked up the fix for this issue .",
"Question : I m looking for high performance multiscan multi prefix-sum many rows in a one kernel execution function for my project in CUDA . I ve tried the one from Thrust library but it s a way too slow . Also thrust crash after being compiled with nvcc debug flags -g -G . After my failure with Thrust I focused on cuDPP library which used to be a part of CUDA toolkit . The cuDPP performance is really good but the library is not up to-date with latest cuda 5.5 and there are some global memory violation issues in cudppMultiScan function while debugging with memory checker . cuda 5.5 nsight 3.1 visual-studio-2010 gtx 260 cc 1.3 .. . .. . Does anybody have any idea what to use instead of these two libraries R . Comment : Have you looked at ArrayFire http : accelereyes.com arrayfire which we work on at AccelerEyes Comment : no haven t seen this before looks pretty interesting thanks : what about its performance Is it more productivity or performance oriented library Comment : If you want to use Thrust to scan the rows of a matrix don t call inclusive scan repeatedly . Assign each row an index and use inclusive scan by key . You can adapt this example https : github.com thrust thrust blob master examples sum rows.cu . Comment : @user1946472 For a single vector it is either better at thousands of elements or equal to thrust at million of elements . For multiple matrices arrayfire launches a single kernel and hence is faster than launching thrust multiple times . Source : I wrote the code . You can contact me email on my profile for more information . Comment : @JaredHoberock Having to read an extra vector for a memory bound algorithm is not ideal . However it is better than launching the kernels multiple times . .. . Answer : To write your own prefix scan you may refer to .. . .. . 1 . The scan example of the CUDA SDK .. . 2 . Chapter 13 of N . Wilt The CUDA Handbook .. . 3 . Chapter 6 of S . Cook CUDA Programming A Developer s Guide to Parallel Computing with GPUs .. . 4 . Parallel Prefix Sum Scan with CUDA http : developer.download.nvidia.com compute cuda 1.1-Beta x86 website projects scan doc scan.pdf . To do multi prefix-sum you can launch many times the same kernel as suggested by a.lasram or try to achieve cuncurrency by CUDA streams although I do not know it this will effectively work for your card . Comment : Using streams is an excellent idea but I think it s even better to launch one single kernel where each thread would clamp the computation in one selected row Comment : I have 231 rows of 1424 floats so executing each row in separate kernel gives too big time overhead caused by cudalaunch . cuDPP does this job in about 0.11 ms on my machine gtx260 which for me is excellent result In case of performance cuDPP lib is perfect . For now I ll try arrayFire library suggested by @accelereyes . Thank you for your answer .",
"Question : I m looking for high performance multiscan multi prefix-sum many rows in a one kernel execution function for my project in CUDA . I ve tried the one from Thrust library but it s a way too slow . Also thrust crash after being compiled with nvcc debug flags -g -G . After my failure with Thrust I focused on cuDPP library which used to be a part of CUDA toolkit . The cuDPP performance is really good but the library is not up to-date with latest cuda 5.5 and there are some global memory violation issues in cudppMultiScan function while debugging with memory checker . cuda 5.5 nsight 3.1 visual-studio-2010 gtx 260 cc 1.3 .. . .. . Does anybody have any idea what to use instead of these two libraries R . Comment : Have you looked at ArrayFire http : accelereyes.com arrayfire which we work on at AccelerEyes Comment : no haven t seen this before looks pretty interesting thanks : what about its performance Is it more productivity or performance oriented library Comment : If you want to use Thrust to scan the rows of a matrix don t call inclusive scan repeatedly . Assign each row an index and use inclusive scan by key . You can adapt this example https : github.com thrust thrust blob master examples sum rows.cu . Comment : @user1946472 For a single vector it is either better at thousands of elements or equal to thrust at million of elements . For multiple matrices arrayfire launches a single kernel and hence is faster than launching thrust multiple times . Source : I wrote the code . You can contact me email on my profile for more information . Comment : @JaredHoberock Having to read an extra vector for a memory bound algorithm is not ideal . However it is better than launching the kernels multiple times . .. . Answer : These libraries especially thrust try to be as generic as possible and optimization often requires specialization : For example a specialization of an algorithm can use shared-memory for fundamental types like int or float but the generic version can t . It happens that for a particular situation a specialization is missing It s a good idea to use these well tested generic libraries as much as possible but sometimes for some performance critical sections your own implementation is an option to consider . In your situation you want many scans in parallel-for different rows . A good implementation would not run the scan separately for different rows : It would have the same kernel call running simultaneously for all elements of all the rows . Depending on its index a thread can know which row it s processing and will ignore all data out of the row . Such specialization requires a functor that returns an absorbing value that prevent mixing rows . Still your own careful implementation would be likely way faster .",
"Question : I am a newbie to Thrust . I see that all Thrust presentations and examples only show host code . I would like to know if I can pass a device vector to my own kernel How If yes what are the operations permitted on it inside kernel device code .. . Answer : I would like to provide an updated answer to this question . Starting from Thrust 1.8 CUDA Thrust primitives can be combined with the thrust : : seq execution policy to run sequentially within a single CUDA thread or sequentially within a single CPU thread . Below an example is reported . If you want parallel execution within a thread then you may consider using CUB http : nvlabs.github.io cub which provides reduction routines that can be called from within a threadblock provided that your card enables dynamic parallelism . Here is the example with Thrust",
"Question : null .. . Answer : I m trying to compile the boost example lorenz parameters.cu https : github.com headmyshoulder odeint-v2 blob master examples thrust lorenz parameters.cu referenced by the boost tutorial http : www.boost.org doc libs 1 60 0 libs numeric odeint doc html boost numeric odeint tutorial using cuda or openmp tbb via thrust.html . The build environment is debian sid using : .. . .. . libcuda1 : amd64 361.45.18-2 .. . libthrust-dev 1.8.1-1 .. . nvidia-cuda-toolkit 7.5.18-2 .. . libboost1.60-all-dev 1.60.0+dfsg-6 .. . gcc-5 5.4.0-6 .. . .. . I building inside a VM so I changed the example to work with thrust : : host vector and also set value-type float to reduce the number of compiling errors . But still I m facing the following compilation error : .. . .. . Please help me to solve this issue so I can start my own project . edit : better title and minor changes Comment : Also tried with gcc-4.9 but same error occurred . gcc-6 is not supported by nvcc",
"Question : Looking at kernel launches within the code of CUDA Thrust it seems they always use the default stream . Can I make Thrust use a stream of my choice Am I missing something in the API .. . Answer : I want to update the answer provided by talonmies following the release of Thrust 1.8 which introduces the possibility of indicating the CUDA execution stream as .. . .. . see also .. . .. . Thrust Release 1.8.0 https : github.com thrust thrust releases . In the following I m recasting the example in .. . .. . False dependency issue for the Fermi architecture http : stackoverflow.com questions 24754878 false-dependency-issue-for-the-fermi-architecture .. . .. . in terms of CUDA Thrust APIs . The Utilities.cu and Utilities.cuh files needed to run such an example are maintained at this github page https : github.com OrangeOwlSolutions CUDA-Utilities . The Visual Profiler timeline shows the concurrency of CUDA Thrust operations and memory transfers .. . .. . enter image description here http : i.stack.imgur.com n4oMI.jpg Comment : What does par signify Comment : @einpoklum It is a Thrust execution policy just like thrust : : seq or thrust : : device . Comment : another worked example is here http : stackoverflow.com questions 25064383 how-to-asynchronously-copy-memory-from-the-host-to-the-device-using-thrust-and-c",
"Question : I am a newbie to CUDA . I simply tried to sort an array using Thrust . Time took to sort d vec is 7.4s and time took to sort h vec is 0.4s .. . .. . I am assuming its parallel computation on device memory so shouldn t it be faster Comment : Most likely you are measuring the context creation time http : stackoverflow.com q 10415204 5085250 . Additionally you cannot expect that small vectors are sorted faster on highly parallel architectures . Try with vector sizes 10000 . Comment : Yes you are right these timings were on first execution . Furthermore I tried with 50k points and I got timing on both host and device to be 0.12s . Difference gets large when size is close to 100000 . Can I assume that sorting using h vec is on CPU Comment : Yes sorting on h vec is done on the host . Perhaps you should read the thrust quick start guide https : github.com thrust thrust wiki Quick-Start-Guide which discusses dispatch of thrust algorithms . Comment : @havogt if you want to provide an answer I would upvote . .. . Answer : Probably the main problem is context creation time : the first CUDA call will initialize the CUDA context which takes some time see here http : stackoverflow.com questions 10415204 how-to-create-a-cuda-context . Therefore you should start measuring time only after the first CUDA call . In general you can only expect speed-up with GPU code compared to CPU code if the degree of parallelism is high enough . The vector size of 10 as in the example code is definitely too small to achieve speed-up . With a vector size 10000 you can expect to fully utilize a modern GPU . You should also think about measuring only the time for sorting without the copy d vec h vec since often you will work with the device vector in the next step . Then you can consider the copy operation as a one time setup cost . However if sorting is the only operation on device it is of course reasonable to include the memcopy in the measurement .",
"Question : Just a couple facts for setup : .. . .. . Thrust doesn t operate in-place for all of it s operations . You can supply custom allocators to thrust : : device vectors . I ve looked in thrust : : system and thrust : : system : : cuda and haven t found anything that looks like a static system allocator . By that I mean I can t see a way of replacing the allocator that thrust uses internally to allocate extra memory for the out-of-place algorithms . I also find it hard to believe that the functions that are not in-place use the allocators for the given thrust : : device vectors to allocator working memory . Question : Does thrust have a way of replacing the internal allocator with a user defined one Related questions : .. . .. . implies that thrust operates out-of-place http : stackoverflow.com questions 10979229 how-to-estimate-gpu-memory-requirements-for-thrust-based-implementation .. . .. . example of custom thrust allocator http : stackoverflow.com questions 9007343 mix-custom-memory-managment-and-thrust-in-cuda .. . Answer : Thrust s custom temporary allocation https : github.com thrust thrust blob 1.6.0 examples cuda custom temporary allocation.cu example demonstrates how to build your own custom allocator for the temporary storage used internally by Thrust algorithms . The example uses a caching scheme to perform allocation but in principle you could use any strategy you like . Basically the idea is to build a custom backend derived from the CUDA backend specifically for the purpose of customizing allocation . Then when you d like to use an algorithm with your custom allocator you point Thrust at your custom backend when you call the algorithm . Note that this feature requires Thrust 1.6 or better . Comment : Thank you . That example does make sense but I have thrust 1.4 so it doesn t work for me . Is there a way to ensure that the thrust internals are using the proper allocator in older versions of thrust Comment : I m not sure what you mean by proper allocator . Thrust versions older than 1.6 can t customize temporary allocation . Comment : Yeah I don t either . I didn t have a full understanding how thrust allocates when you pass a device vector with a custom allocator to a thrust function . Playing around the with allocator example above answered it for me . Thanks again ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
stl
|
UNK_RELATION
|
styleframe@openpyxl@68
|
styleframe -- styleframe is a python library that wraps pandas and @placeholder and makes outputting styled dataframes to excel easy .
|
{
"confidence": [
55.719993591308594,
50.419708251953125,
42.96022033691406,
23.06825065612793,
15.246545791625977,
15.246545791625977,
15.246545791625977,
15.246545791625977,
15.246545791625977,
15.246545791625977,
15.246545791625977,
15.246545791625977,
15.246545791625977,
15.246545791625977,
15.246545791625977,
15.246545791625977,
15.246545791625977
],
"content": [
"prefer to use openpyxl since I already use StyleFrame to style the excel .",
"While using the StyleFrame package for styling pandas DataFrame with openpyxl i got the following Exception .",
"Here is the solution using StyleFrame I had to use the row to add filters with index 0 to add filters to the columns... .",
"I need to create excel with columns that can be filited .",
"When i try this code with an english title it works as i excepted .",
"You are probably using version 0.0.7 or earlier .",
"Version 0.0.8 has an improved support in unicode so try to upgrade .",
"Now Working",
"thanks",
"example http : postimg.org image uhx7lbvt7",
"Filters are supported by openpyxl .",
"class openpyxl.worksheet.filters.AutoFilter link https : openpyxl.readthedocs.org en 2.0 openpyxl.worksheet.html module-openpyxl.worksheet.filters",
"thank you very much it works",
"This code is using xlwt .",
"It writes lines and colums .",
"myfirstgeneratedexcel.xls",
"xlwt doesn t support XLSX files ."
]
}
|
{
"confidence": [
67.2330322265625,
59.739227294921875,
58.614013671875
],
"content": [
"Question : I need to create excel with columns that can be filited . prefer to use openpyxl since I already use StyleFrame to style the excel . example http : postimg.org image uhx7lbvt7 Comment : Filters are supported by openpyxl . Comment : class openpyxl.worksheet.filters.AutoFilter link https : openpyxl.readthedocs.org en 2.0 openpyxl.worksheet.html module-openpyxl.worksheet.filters Comment : thank you very much it works .. . Answer : Here is the solution using StyleFrame I had to use the row to add filters with index 0 to add filters to the columns... .",
"Question : While using the StyleFrame package for styling pandas DataFrame with openpyxl i got the following Exception . When i try this code with an english title it works as i excepted . .. . Answer : You are probably using version 0.0.7 or earlier . Version 0.0.8 has an improved support in unicode so try to upgrade . Comment : Now Working thanks",
"Question : I need to create excel with columns that can be filited . prefer to use openpyxl since I already use StyleFrame to style the excel . example http : postimg.org image uhx7lbvt7 Comment : Filters are supported by openpyxl . Comment : class openpyxl.worksheet.filters.AutoFilter link https : openpyxl.readthedocs.org en 2.0 openpyxl.worksheet.html module-openpyxl.worksheet.filters Comment : thank you very much it works .. . Answer : This code is using xlwt . It writes lines and colums . myfirstgeneratedexcel.xls Comment : xlwt doesn t support XLSX files ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
openpyxl
|
UNK_RELATION
|
pgm@netpbm@52
|
pgm -- pgm is a grayscale image format used by the @placeholder library and other graphics software .
|
{
"confidence": [
48.86743927001953,
48.41261291503906,
47.57379150390625,
47.28288269042969,
45.639217376708984,
45.26292037963867,
45.00579071044922,
44.21171569824219,
43.945430755615234,
42.80741500854492,
42.55009078979492,
42.55009078979492,
41.758941650390625,
41.55811309814453,
41.49888610839844,
41.33513641357422,
41.22285842895508,
40.98246383666992,
40.90873718261719,
40.45996856689453,
40.283931732177734,
40.13219451904297,
39.97355651855469,
39.97355651855469,
39.938514709472656,
39.938514709472656,
39.938514709472656,
39.938514709472656,
39.938514709472656,
39.938514709472656,
39.3838996887207,
38.974159240722656,
38.92235565185547,
38.87541198730469,
38.87541198730469,
38.35395812988281,
37.87900924682617,
37.8242073059082,
37.8242073059082,
37.79934310913086,
37.79934310913086,
37.76338195800781,
37.76338195800781,
37.698516845703125,
37.698516845703125,
37.66246032714844,
37.38960266113281,
37.38960266113281,
37.38960266113281,
37.38960266113281,
37.38960266113281,
37.302757263183594,
37.302757263183594,
37.302757263183594,
37.302757263183594,
37.044219970703125,
36.74814224243164,
36.393035888671875,
36.35441207885742,
36.17882537841797,
36.17882537841797,
36.17882537841797,
36.17882537841797,
36.17882537841797,
36.17882537841797,
36.17882537841797,
36.17882537841797,
36.04286193847656,
35.934349060058594,
35.510196685791016,
35.510196685791016,
35.387420654296875,
35.12762451171875,
35.12762451171875,
35.12762451171875,
35.12762451171875,
35.12762451171875,
35.062896728515625,
34.817039489746094,
34.817039489746094,
34.817039489746094,
34.817039489746094,
34.817039489746094,
34.66231918334961,
34.624916076660156,
34.621212005615234,
34.621212005615234,
34.41665267944336,
34.3428955078125,
33.92564010620117,
33.92564010620117,
33.92564010620117,
33.92564010620117,
33.92564010620117,
33.92564010620117,
33.75727844238281,
33.41963577270508,
33.23248291015625,
33.23248291015625,
33.23248291015625
],
"content": [
"PGM is a simple format .",
"It is initialized as PGM pgm",
"I need to make a program that convert a RGB image to a GRAYSCALE image and save it in PGM format .",
"Binary or text pgm format",
"I d say the easiest is to transform the PGM color to a Java Color is using HSB to express the PGM grayscale .",
"this is the format of a .pgm file as indicted here :",
"My problem is that despite all frames are saved and phenomenically in the right format for example as frame 1.pgm when I open them they are not in grayscale as a .pgm photo should be .",
"The input format ist PGM or TIFF .",
".. . .. . EDIT I .. . .. . Add PGM image .",
"Why do you write pgm .foo instead of pgm- foo",
"The PGM format defines the size as WIDTH first then HEIGHT .",
"Yeah cgohlke s right the call writes the PGM format .",
"i am trying to read pgm image in Matlab with : .. . .. . img imread out001.pgm .. . .. . and i am getting an error : .. . .. . Error using imread line 382 Unable to determine the file-format .",
"Edit : this is the definition of the pgm :",
"I chose PGM as it is the easier format to implement .",
"I want to read pgm image in python .",
"My program reads a pgm and writes the data of it to a new pgm-file .",
"To visualize the image in matlab .. . .. . To convert the image from pgm to jpeg :",
"I have to display an image with PGM format and then get the values from that image to draw a path with A .",
"In PGM format each pixel is specified by a gray value between 0 and MaxVal .",
"I am reading in a PGM image and making changes to it .",
"od -xc out001.pgm head -n 10",
"PGM is for Grey scale images .",
"Perhaps your PGM is not correct .",
"@Obicere The original file is a .pgm file",
"@lbalazscs PGM is Portable Gray Map .",
"I want to read pgm file .",
"How is pgm- data defined and initialized",
"I ve put the definition of pgm in the post .",
"PGM is half text half binary .",
"I need to read a PGM image and get its points in Java .",
"stackoverflow.com questions 11922252 reading-a-pgm-file-in-java http : stackoverflow.com questions 11922252 reading-a-pgm-file-in-java",
".pgm is in practice a text file .",
"One easy way is to use the PGM format itself in P5 binary mode .",
"My bad I didn t read the PGM file-format specification .",
"Paste your .pgm file here .",
"this what i got x imread out001.pgm Error using imread line 363 Unable to determine the file-format .",
"I need to convert a base64Binary-string in the format pgm to a bitmap in android .",
"But Android s BitmapFactory probably has no direct support for PGM format .",
"I m trying to load and display a .PGM image using OpenCV 2.4.0 for C++ .",
"I opened every pgm image I have and all seems to be right .",
"I m trying to read a .pgm version p5 file .",
"I am trying to read and write PGM Files .",
"I m looking for a raw image file-format as simplistic as PGM but encoded in binary so that I can write pixels in bursts .",
"cv2.imwrite image.pbm image cv2.IMWRITE PXM BINARY 0 writes PGM format not PBM .",
"PIL does not support PGM .",
"pgm file is the binary version not ASCII .. . .. . This is my code I was attempting to only read the header portion of pgm file :",
"How can I convert Binary PGM Files to ASCII PGM Files using Java",
"This binary PGM file can be acquired by converting JPG to PGM using IrvanView http : www.irfanview.com .",
"Then I wanted to test PGM all I did was to replace the address tcp : : 5556 with pgm : 239.0.0.1 : 5557 on both sides .",
"You are not using OpenPGM you are using what is called ms-pgm Microsoft implementation of PGM .",
"Unfortunately ImageIO does not support pgm .",
"Instead of pgm it should say pnm .",
"Below are the example of array in the PGM file :",
"So what are the requirements for using PGM",
"The question is quite simple : How to read a .pgm image file into a 2D double array in C . I do not have a .pgm buffer in memory .",
"This should take a buffered image jpeg png...etc and convert it properly to a pgm .",
"Working with ASCII PGM Magic number P2 is easy but I am having some confusion in working with Raw PGM Files magic number P5 .",
"here is the crucial part of my code : .. . .. . .. . .. . .. . .. . Now if i try to load the image : frame 55.pgm I get an Unsupported format error while it works fine with other .pgm images",
"could you give a link-to your PGM file",
"so i wrote an I O for a pgm-file .",
"Here is the code : .. . .. . It gives me for this PGM : .. . .. . this output :",
"A sample binary PGM file is as follows : .. . .. . like .. . .. .",
"I will provide my PGM file for testing .",
"Your understanding about PGM is about P2 not P5 .",
"I m trying to read PGM images using Java .",
"I m looking into ZeroMQ for its PGM support .",
"Could I use BMP or PGM",
"See PGM format http : netpbm.sourceforge.net doc pgm.html format from the Netpbm documentation .",
"I think you are somehow confusing the binary P5 and ASCII P2 modes of the PGM format .",
"Keep in mind that the PGM format headers are all ASCII so there s really no need to use UTF here .",
"So I have a PNG image file like the following example and I need it to be converted into PGM format .",
"I do not have a pgm buffer in memory .",
"which gives you functions to handle a pgm file .",
"The new file will automatically have the pgm extension .",
"epgm and pgm work only for PUB SUB .",
"How do I enable the use of PGM",
"The problem is that every time I try to read some PGM images I have as examples on my PC I m not even able to read the header properly because it never recognizes the right P2 PGM format .",
"Any advice or tips for writing to .pgm files would be great",
"How can i read and write pgm p5 file",
"This is a part of my function for reading a PGM file byte by byte .",
"0..65535 value since PGM values can be shorts as well as bytes .",
"When I open the file with a PGM viewer everything shows up correctly .",
"PGM Image Sample https : docs.google.com leaf id 0B1jK9RMcqhcvNmQyNjk5MGItMjcyNS00MmY1LWJiZjEtYjE5NjNkY2E0MDlk hl en US .. . Add function to create image histogram .",
"I have a group of RGBA images saved in a folder my goal is to convert these images into another folder in a pgm format below is the code : .. . .. . however I get an error stating KeyError : PGM it seems that the pgm format is not in the modes .. . .. . Thanks for the advice :",
"As a homework assignment we are supposed to read in a .pgm file and then draw a square in by changing the pixel values and then output the new image .",
"I have a pgm image with 1251 different pixel values ranging from 0 to 1250 .",
"I have a program which loads a .PGM image file into std : : vector m data : .. . .. . Where the ReadNumber is : .. . .. . My question is how can I load instead of .pgm file an OpenCV Mat into m data without creating a file .",
"I have been provided with a dataset consisting of .pgm images to be used for some coding in Matlab .",
"If you absolutely need or want files in the PGM format you will have to use a converter like png2pnm .",
"This is probably the most common format for PGM as it is extremely easy and fast to both read and write .",
"I always get errors like : not valid pgm file-type or format unsupported .",
"My current code is : .. . .. . I have read some pages related to my problem How to read .PGM format file",
"You can read the specs http : netpbm.sourceforge.net doc pgm.html for the PGM format and use the functions you listed .",
"I m trying to save multiple-files in RAW format PGM from a video source by using Gstreaamer .",
"I cannot use PIL to load 16-bit PGM images due to a PIL bug http : stackoverflow.com questions 7363735 python-and-16-bit-pgm .",
"The question is how can I read and write PGM P5 image in PHP without using any additional PHP extension library",
"I am having trouble even reading a pgm file in perl .",
"Why can t you use PGM in binary P5 mode",
"PGM files can be a short array - or they can be a byte array ."
]
}
|
{
"confidence": [
61.825897216796875,
57.860748291015625,
56.56113815307617,
56.31850814819336,
55.521602630615234,
55.36894989013672,
54.25294494628906,
53.61088943481445,
52.599761962890625,
52.14488983154297,
51.82994079589844,
51.82738494873047,
51.3897705078125,
50.6712646484375,
50.5378303527832,
50.490299224853516,
50.461753845214844,
49.87388610839844,
49.86267852783203,
49.58823776245117
],
"content": [
"Question : I need to make a program that convert a RGB image to a GRAYSCALE image and save it in PGM format . I use DevIL library but when I save the image I obtain always a 3D image 3 matrix in grayscale but if I load it in MATLAB I have 3 matrices instead of just one . How can I obtain just one matrix in my output file using DevIL .. . .. . .. . Answer : Unfortunately due to a bug in the PNM export DevIL can and will only write PPM Portable Pixmaps 3 channel RGB files regardless of the file extension . The only solution to this is to use a different file-format that supports single channel grayscale images like PNG . Matlab should be able to use that just as well . If you absolutely need or want files in the PGM format you will have to use a converter like png2pnm .",
"Question : In PHP a simple read and write file can be done by using fread and fwrite . The unpack and pack operator are used to extract binary information . The question is how can I read and write PGM P5 image in PHP without using any additional PHP extension library Comment : You can read the specs http : netpbm.sourceforge.net doc pgm.html for the PGM format and use the functions you listed . This is a Q A site not a job site . If you have a specific problem we d be glad to help . Comment : docs.google.com https : docs.google.com leaf id 0B1jK9RMcqhcvNmQyNjk5MGItMjcyNS00MmY1LWJiZjEtYjE5NjNkY2E0MDlk hl en US Comment : May be you should know the real file first before you judge . docs.google.com https : docs.google.com leaf id 0B1jK9RMcqhcvNmQyNjk5MGItMjcyNS00MmY1LWJiZjEtYjE5NjNkY2E0MDlk hl en US The problem was how to use the those functions properly . .. . Answer : I wrote a simple function to convert an image resource to PGM portable graymap in order to feed it to an OCR program . It works just like the rest of the image output functions and will convert to grayscale for you : Comment : Your answer or your purposed function does not clearly answer the question . Comment : Also notice that my question does not want any additional php library such as GD Cairo ImageMagick .",
"Question : I want to save every single frame of a real-time video in .pgm format . I am working with opencv 2.4.8 in c++ . My problem is that despite all frames are saved and phenomenically in the right format for example as frame 1.pgm when I open them they are not in grayscale as a .pgm photo should be . Moreover I opened the images with a hexeditor and compared them with a correct pgm photo and there are obvious differences Can somebody give any advice on what I am doing wrong here is the crucial part of my code : .. . .. . .. . .. . .. . .. . Now if i try to load the image : frame 55.pgm I get an Unsupported format error while it works fine with other .pgm images Thnx in advance guys for your time Comment : did you resolve this problem i m having a very similar issue . Comment : unfortunately no...if I find though I will update the post please if you find anything do the same.. . thanks Comment : one suggestion i do have is to an imdecode on an array if it s an in-memory representation of an image . Comment : i solve the problem...I had to convert each frame to grayscale first before calling imwrite Comment : what did you use to convert to greyscale if you post the answer and it works you can even accept your own answer . I will surely upvote it if it works for me too . .. . Answer : This is the corrected code :",
"Question : I need to read a PGM image and get its points in Java . Anyone knows a good library to do that I have to display an image with PGM format and then get the values from that image to draw a path with A . Cumps . Comment : stackoverflow.com questions 11922252 reading-a-pgm-file-in-java http : stackoverflow.com questions 11922252 reading-a-pgm-file-in-java Comment : thanks it works fine it allows me to get the points . .. . Answer : PGM is a simple format . You can read it manually . It s specification is given here http : netpbm.sourceforge.net doc pgm.html . Also this http : www.cs.olemiss.edu jxue teaching csci112 S11 notes hw1 PgmImage.java provides code to read it and display on a Component . Good luck . Comment : Thanks . It makes my work easier : D Comment : Glad to know it helped .",
"Question : With Java a grayscale image from an array with 32-bit floating-point values . Could I use BMP or PGM What its the best image format with no compression for this array with these 32-bit floating-point values .. . Answer : There s a variant of PGM called PFM http : netpbm.sourceforge.net doc pfm.html in Pf mode for grayscale that supports IEEE 32-bit floating-point samples . You could also store these images in an uncompressed TIFF http : www.awaresystems.be imaging tiff faq.html q1 file too . I m not sure what software does support floating-point TIFFs though as this is certainly outside of Baseline TIFF . BMP is not suitable for floating-point . I have a Java ImageIO plugin that reads PFM http : haraldk.github.io TwelveMonkeys netpbm-portable-any-map-pnm-31 and it s not too hard to extend it to write I guess . If your task is to implement read-write yourself I d certainly choose the PFM format for simplicity . I also have a TIFF plugin available on the same link but it doesn t support floating-point sample format TIFF sample format 3 yet . Feel free to propose such a feature https : github.com haraldk TwelveMonkeys issues and supply a few sample images for test purposes .",
"Question : null .. . Answer : i am trying to read pgm image in Matlab with : .. . .. . img imread out001.pgm .. . .. . and i am getting an error : .. . .. . Error using imread line 382 Unable to determine the file-format . what should i do Comment : Try running this and posting the results so we can see if the header looks correct . od -xc out001.pgm head -n 10 Comment : this what i got x imread out001.pgm Error using imread line 363 Unable to determine the file-format . Comment : The command I gave above needs to be typed into your terminal not into Matlab itself . Comment : If you cannot run the command I suggested you can click on my name and profile and see my Email address and Email me your unhappy image . Comment : is is a 3D image . the header of the image has the form P7 100 100 14 255",
"Question : How can I take the values from a PGM file set the value as the color then use that color to fillRect .. . Answer : I d say the easiest is to transform the PGM color to a Java Color is using HSB to express the PGM grayscale .",
"Question : I have a group of RGBA images saved in a folder my goal is to convert these images into another folder in a pgm format below is the code : .. . .. . however I get an error stating KeyError : PGM it seems that the pgm format is not in the modes .. . .. . Thanks for the advice : .. . Answer : As far as I can see scikit-image uses the Python Imaging Library plugin for saving image files . PIL does not support PGM . Refer to http : effbot.org imagingbook decoder.htm for how to write your own file decoder for PIL . Extract :",
"Question : null .. . Answer : I am trying to read and write PGM Files . Working with ASCII PGM Magic number P2 is easy but I am having some confusion in working with Raw PGM Files magic number P5 . Here is the PGM file that I am trying to read : A.pgm https : www.dropbox.com s 9znbcsplx8phuxo A.pgm dl 0 .. . .. . After PGM Header when I try to read the Image data using the following Java code : .. . .. . Then it gives the following output : .. . .. . What is this output Also why I am unable to read the while by using scan Raw.nextByte input mismatch exception because as I understand the image data in P5 is saved as Bytes Comment : The problem is you can t use Scanner which is for text input to parse raw bytes . Instead use the scanner only for parsing the header then - if the format is P5 - read the bytes directly from the InputStream using the read or read b off len methods . In many ways reading the P5 format is actually easier as the data is already in the native format used by BufferedImage.TYPE BYTE GRAY . Comment : PS : I m assuming you want to write your own reader writer for educational purposes . If not have a look at my PNM plugin for ImageIO https : github.com haraldk TwelveMonkeys tree master imageio imageio-pnm src main java com twelvemonkeys imageio plugins pnm which supports reading PBM PGM PPM and other derivates . Comment : @haraldK Yes it is for learning . Thanks for the plugin I can learn from it .",
"Question : I m looking for a raw image file-format as simplistic as PGM but encoded in binary so that I can write pixels in bursts . I ve searched over Wikipedia and Google and found none that didn t start to have complex headers and such . Can anybody recommend me such a type of a file-format Comment : Why can t you use PGM in binary P5 mode See netpbm.sourceforge.net doc pgm.html http : netpbm.sourceforge.net doc pgm.html Comment : Sorry I only saw P2 . Thank you . .. . Answer : One easy way is to use the PGM format itself in P5 binary mode . See PGM format http : netpbm.sourceforge.net doc pgm.html format from the Netpbm documentation . Set maxVal to 255 to use the full 8 bit range . This is probably the most common format for PGM as it is extremely easy and fast to both read and write .",
"Question : This question is challenging to get more understanding on Image Processing using pure C . I have done a simple program reading non-binary PGM file using C compiled with GCC . Now it is becoming a problem when I try to read binary PGM file . This binary PGM file can be acquired by converting JPG to PGM using IrvanView http : www.irfanview.com . NOTE : Please don t answer with any image-processing library such as : OpenCV . My current code is : .. . .. . I have read some pages related to my problem How to read .PGM format file http : www.cplusplus.com forum general 2393 but I cannot find any clear and simple answer . I apologize for any mistake in my code . Any suggestion and critic regarding my code would be appreciated . My script above could not display correct color histogram because if you think rationally you might get pixel color above 100 not only below 100 . So the main question is How to fix this problem .. . .. . EDIT I .. . .. . Add PGM image . PGM Image Sample https : docs.google.com leaf id 0B1jK9RMcqhcvNmQyNjk5MGItMjcyNS00MmY1LWJiZjEtYjE5NjNkY2E0MDlk hl en US .. . Add function to create image histogram . EDIT II .. . .. . Add one more fgets see sample image https : docs.google.com leaf id 0B1jK9RMcqhcvNmQyNjk5MGItMjcyNS00MmY1LWJiZjEtYjE5NjNkY2E0MDlk hl en US . Comment : C C++ is not a language pick one . You will likely get different answers . Comment : @Andre Thanks for criticizing . I just did some changes . .. . Answer : And.. . what s the question Your code looks almost fine for reading binary PGM P5 it s just missing newline check for each pixel data row according to wikipedia article both ASCII and binary format have newlines at the end of each pixel data row . Some comments : .. . .. . Don t hardcode the width and height you should use information from the header instead .. . Check the magic number throw return error if it s not P5 or handle it correctly .. . The file could have line comments consider that Comment : Well when I create histogram reading the color variations I could not get any rational result . I will provide my PGM file for testing . BTW My title is my question . Don t you read it : Comment : An idea : try converting it to ASCII format P2 and view it that should check whether you read it correctly or not Comment : @exodream : the title might be a question but you seem to have posted a solution . Therefore the only question we have is already answered and there is no question left . A sample question would be : It behaves as .. . in situation .. . when it should be doing .. . . Can anyone see a bug",
"Question : I m here to ask you a little help . I d like to write a C code that reads a PGM file P2 not binary and I have found many ways to do it on the Web . The problem is that every time I try to read some PGM images I have as examples on my PC I m not even able to read the header properly because it never recognizes the right P2 PGM format . I always get errors like : not valid pgm file-type or format unsupported . Here s the last code I m trying : Comment : Perhaps your PGM is not correct . It should be a simple ASCII file so open it with a code editor of choice and verify against the specifications http : netpbm.sourceforge.net doc pgm.html . Comment : Note that they say you shouldn t cast the result-of malloc in C http : stackoverflow.com questions 605845 do-i-cast-the-result-of-malloc . Comment : I opened every pgm image I have and all seems to be right . .. . Answer : It seems that there are libraries that can do this : libnetpbm from netpbm http : netpbm.sourceforge.net or PGMA IO https : people.sc.fsu.edu jburkardt c src pgma io pgma io.html . If you cannot use an external library for some reason a look at the source code may help you to figure out how the header is read . By the way have you already had a look at the answer to this question : how-to-read-a-pgm-image-file-in-a-2d-double-array-in-c http : stackoverflow.com questions 6085390 how-to-read-a-pgm-image-file-in-a-2d-double-array-in-c rq 1 Comment : Yes I did . Anyway thank you very much the libraries you suggested me were very useful",
"Question : In PHP a simple read and write file can be done by using fread and fwrite . The unpack and pack operator are used to extract binary information . The question is how can I read and write PGM P5 image in PHP without using any additional PHP extension library Comment : You can read the specs http : netpbm.sourceforge.net doc pgm.html for the PGM format and use the functions you listed . This is a Q A site not a job site . If you have a specific problem we d be glad to help . Comment : docs.google.com https : docs.google.com leaf id 0B1jK9RMcqhcvNmQyNjk5MGItMjcyNS00MmY1LWJiZjEtYjE5NjNkY2E0MDlk hl en US Comment : May be you should know the real file first before you judge . docs.google.com https : docs.google.com leaf id 0B1jK9RMcqhcvNmQyNjk5MGItMjcyNS00MmY1LWJiZjEtYjE5NjNkY2E0MDlk hl en US The problem was how to use the those functions properly . .. . Answer : According to the spec : Portable Gray Map http : netpbm.sourceforge.net doc pgm.html .. . .. . This looks pretty simple . You don t even need pack unpack as sscanf should cope with most of the ASCII to integer translation . This C program http : fossies.org unix misc netpbm-10.35.83.tgz dox ppmtobmp 8c source.html which converts PGM to BMP may give you a few pointers . Comment : The P5 format is not purely ASCII . Your understanding about PGM is about P2 not P5 .",
"Question : This is a part of my function for reading a PGM file byte by byte . In this for after something like 2000 bytes every byte that it reads is 0 . Instead of reading the image like this enter image description here http : i.stack.imgur.com zGgvb.jpg .. . .. . I get it like this .. . .. . enter image description here http : i.stack.imgur.com MELJu.jpg .. . .. . How can i solve this Edit : this is the definition of the pgm : Comment : Why do you write pgm .foo instead of pgm- foo How is pgm- data defined and initialized Comment : this is how my teacher made his notes . I ve put the definition of pgm in the post . It is initialized as PGM pgm Comment : your teacher must have pretty good reasons for reading an image file in such an awful way one byte at a time and using fscanf . Tell him her to read at least one image line at a time e.g . using fread and avoid parsing the input. . it s a binary file after all Comment : PGM is half text half binary . The header with the height width and max are in ASCII with whitespace . The maxvalue must be followed by exactly one whitespace character usually a newline after which the rest of the file is binary . Comment : @user3629249 I don t think any of that is true . .. . Answer : If you are using Windows you need to make sure that you open the file in binary mode . Otherwise a byte which happens to have the value 26 0x1A will be interpreted as an end of file after which no further bytes will be read . Other modifications will also be made which will produce other problems . On any OS it is best to open binary files in binary mode but on Windows it is hugely important . It is also important to check the return-value of fscanf . Fscanf is an awful way of reading a binary file for what its worth . If your teacher told you to do that you might want to have a discussion with him about good programming practice .",
"Question : As a homework assignment we are supposed to read in a .pgm file and then draw a square in by changing the pixel values and then output the new image . After I go through and change the pixels I print them all to a .txt as a way to check that they actually got added . The part I m having trouble with is writing the new file . I know it s supposed to be binary so after googling I think I should be using DataOutputStream but I could be wrong . After I write the file its size is 1.9MB where as the original is only 480KB so right off the bat I suspect something must be wrong . Any advice or tips for writing to .pgm files would be great When I try to open the new file i get an error message saying illegal image format and the original file opens properly . Comment : Did you read the Java Tutorial on Byte Streams http : docs.oracle.com javase tutorial essential io bytestreams.html Comment : @Obicere we are supposed to read in a .pgm file The question is if the original file is binary or ASCII . Comment : @Obicere The original file is a .pgm file Comment : @LutzHorn its P5 so that would be a binary file . And reading the Tutorial now Thanks Comment : @LutzHorn Im not sure how I could manipulate the values that way .. . Answer : I think you are somehow confusing the binary P5 and ASCII P2 modes of the PGM format . The ASCII version has spaces between each pixel and optional line feeds like you have in your code . For the binary format you should just write the pixel values as bytes as you have max value 250 . No spaces or line feeds . I don t write the code for you as this is an assignment but you are almost there so I m sure you ll make it : - .. . .. . PS : Also carefully read the documentation on DataOuputStream.writeUTF .. . : .. . .. . First two bytes are written to the output stream as-if by the writeShort method giving the number of bytes to follow . Are you sure this is what you want Keep in mind that the PGM format headers are all ASCII so there s really no need to use UTF here .",
"Question : I want to read pgm file . I kept image content in byte array . When I accessed pixels I see that some values are negative . So I applied 0xFF each byte . I hope it is ok but when I write to file it isn t same as original image . How can i read and write pgm p5 file .. . Answer : Keep in mind that the P5 format is binary . You are using a Writer and cast the value to-char . This is good for text but not for binary-data . Instead use an OutputStream and write the value in i directly to the stream . .. . .. . PS : If you don t feel like implementing the PGM format yourself I have created an ImageIO plugin for the NetPBM formats PNM http : haraldk.github.io TwelveMonkeys netpbm-portable-any-map-pnm you could use . It s open-source BSD license .",
"Question : This question is challenging to get more understanding on Image Processing using pure C . I have done a simple program reading non-binary PGM file using C compiled with GCC . Now it is becoming a problem when I try to read binary PGM file . This binary PGM file can be acquired by converting JPG to PGM using IrvanView http : www.irfanview.com . NOTE : Please don t answer with any image-processing library such as : OpenCV . My current code is : .. . .. . I have read some pages related to my problem How to read .PGM format file http : www.cplusplus.com forum general 2393 but I cannot find any clear and simple answer . I apologize for any mistake in my code . Any suggestion and critic regarding my code would be appreciated . My script above could not display correct color histogram because if you think rationally you might get pixel color above 100 not only below 100 . So the main question is How to fix this problem .. . .. . EDIT I .. . .. . Add PGM image . PGM Image Sample https : docs.google.com leaf id 0B1jK9RMcqhcvNmQyNjk5MGItMjcyNS00MmY1LWJiZjEtYjE5NjNkY2E0MDlk hl en US .. . Add function to create image histogram . EDIT II .. . .. . Add one more fgets see sample image https : docs.google.com leaf id 0B1jK9RMcqhcvNmQyNjk5MGItMjcyNS00MmY1LWJiZjEtYjE5NjNkY2E0MDlk hl en US . Comment : C C++ is not a language pick one . You will likely get different answers . Comment : @Andre Thanks for criticizing . I just did some changes . .. . Answer : A few notes about your program : .. . .. . you should read the header instead of hardcoding the width height and max pixel value . it s way more efficient to load the whole image into memory and do the processing from memory .. . PGM files are binary you should use rb in the fopen in case you ever run this on Windows where binary vs . text are different .. . your histogram print function is missing the last pixel 255 is a valid pixel value .. . not sure why your histogram array goes to 64K are you planning to support 16-bit PGMs as well you should have error-handling to avoid crashes or other unexpected behavior .. . .. . Below is an improved version of your program with the above points addressed . I hope it helps . Comment : your answer is straightforward . I accept Andre s answer instead because Andre answered and paraphrased my question first . Thanks for improving my code .",
"Question : I looked through the internet but I could not find an answer . I have a pgm file which I use as a BufferedImage to do a convolution I use JAI for that but I am having trouble in saving it back to a pgm file . So far I used following code to save : .. . .. . With that I get a pgm file but when I open the image IfranView tells me that it is a TIF file with incorrect extension . What do I need to change I appreciate any help Please provide code examples if possible . Thanks everyone . Kind regards Staniel .. . Answer : This should take a buffered image jpeg png...etc and convert it properly to a pgm . EDIT : The JAI Plugin which allows for .pgm files to be used with ImageIO can be found at http : www.oracle.com technetwork java index.html Comment : Unfortunately ImageIO does not support pgm . Comment : It does with the JAI plugin . Comment : Hmm interesting . ImageIO does not create anything . Do I need to connect it with the JAI plugin somehow The JAI is already in my project library . Comment : @Staniel You need the jai imageio.jar JAR to be able to use the JAI PNM plugin for ImageIO . Or you could use the TwelveMonkeys PNM plugin http : haraldk.github.io TwelveMonkeys netpbm-portable-any-map-pnm-31 but I guess you are already using JAI .",
"Question : I have been provided with a dataset consisting of .pgm images to be used for some coding in Matlab . I was just wondering if it is possible to view the same image as a .jpeg .png in Matlab itself Thanks .. . Answer : To visualize the image in matlab .. . .. . To convert the image from pgm to jpeg :",
"Question : I looked through the internet but I could not find an answer . I have a pgm file which I use as a BufferedImage to do a convolution I use JAI for that but I am having trouble in saving it back to a pgm file . So far I used following code to save : .. . .. . With that I get a pgm file but when I open the image IfranView tells me that it is a TIF file with incorrect extension . What do I need to change I appreciate any help Please provide code examples if possible . Thanks everyone . Kind regards Staniel .. . Answer : I found the answer . I already added the external JAI imageio to my library . Instead of pgm it should say pnm . The new file will automatically have the pgm extension ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
netpbm
|
UNK_RELATION
|
slick@scala@119
|
slick -- slick acronym for scala language-integrated connection kit is a modern database query and access library for @placeholder by typesafe .
|
{
"confidence": [
57.128902435302734,
55.85957336425781,
55.15473937988281,
53.02861785888672,
52.9478759765625,
52.30451202392578,
50.709171295166016,
50.56067657470703,
49.71052932739258,
49.15327453613281,
48.474918365478516,
48.292259216308594,
47.113685607910156,
46.44032287597656,
46.26881790161133,
46.10975646972656,
46.07859802246094,
45.966156005859375,
45.56175994873047,
45.532623291015625,
45.029762268066406,
43.594268798828125,
42.98936462402344,
42.803749084472656,
42.17205047607422,
42.110443115234375,
42.09210205078125,
41.93944549560547,
41.522804260253906,
41.50165557861328,
41.48921585083008,
41.39133834838867,
41.39133834838867,
41.15668487548828,
40.893272399902344,
40.6361198425293,
40.6361198425293,
40.6361198425293,
40.222206115722656,
40.10484313964844,
40.04890823364258,
39.98506164550781,
39.972957611083984,
39.80534362792969,
39.74365997314453,
39.73303985595703,
39.73100280761719,
39.63589859008789,
39.561824798583984,
39.533233642578125,
39.51872253417969,
39.51872253417969,
39.51872253417969,
39.21642303466797,
39.148170471191406,
39.02817153930664,
38.89542770385742,
38.84765625,
38.726661682128906,
38.726661682128906,
38.698753356933594,
38.606842041015625,
38.606842041015625,
38.490516662597656,
38.437313079833984,
38.37397766113281,
38.37397766113281,
38.29497146606445,
38.0372200012207,
37.89520263671875,
37.89520263671875,
37.826690673828125,
37.82203674316406,
37.74803924560547,
37.72233581542969,
37.58411407470703,
37.57421112060547,
37.51392364501953,
37.51392364501953,
37.51392364501953,
37.40747833251953,
37.40747833251953,
37.40747833251953,
37.371315002441406,
37.371315002441406,
37.371315002441406,
37.371315002441406,
37.365379333496094,
37.223758697509766,
37.19218826293945,
37.18632888793945,
37.07218933105469,
36.98275375366211,
36.85908508300781,
36.85908508300781,
36.85850524902344,
36.69662094116211,
36.69662094116211,
36.64525604248047,
36.63948440551758
],
"content": [
"yes but Hibernate is an ORM while Slick is a modern database query and access library for Scala . .",
"@Tomalak : These queries was generated by typesafe slick 3.0.0-M1 scala .",
"The code will look like this taken from the Slick test cases https : github.com slick slick blob 2.1.0 slick-testkit src main scala com typesafe slick testkit tests InsertTest.scala L130 :",
"Check out the differences between these two examples : play-slick https : github.com playframework play-slick blob master samples play-slick-cake-sample app models DAO.scala and slick https : github.com slick slick-examples blob master src main scala com typesafe slick examples lifted MultiDBExample.scala .. .",
"He suggested however that we have nested projections over the flat 22+ columns table : .. . .. . which is now a test https : github.com slick slick blob 006d8a71b629099712e53ca04abc156b50818684 slick-testkit src main scala com typesafe slick testkit tests JdbcMapperTest.scala L144 at Slick including one for version 3 https : github.com slick slick blob master slick-testkit src main scala com typesafe slick testkit tests JdbcMapperTest.scala .",
"You can find plenty of examples here : github.com slick slick blob master slick-testkit src main scala https : github.com slick slick blob master slick-testkit src main scala com typesafe slick testkit tests TemplateTest.scala",
"Is it scala query or slick",
"There is no documentation about this feature but you can find usages in : github.com slick slick blob master slick-testkit src main scala https : github.com slick slick blob master slick-testkit src main scala com typesafe slick testkit tests MapperTest.scala and github.com cvogt migrations blob master src main scala scala https : github.com cvogt migrations blob master src main scala scala slick jdbc reflect reflect.scala",
"See here https : github.com slick slick blob 2.1 slick-testkit src main scala com typesafe slick testkit tests JdbcMapperTest.scala L312-337 for an HList example .",
"this example might be of use to someone : github.com slick slick-examples blob 2.0.0-RC1 src main scala https : github.com slick slick-examples blob 2.0.0-RC1 src main scala com typesafe slick examples lifted MultiDBCakeExample.scala",
"What is the correct way to write this Scala Slick query",
"I ve found this example from slick testing : .. . https : github.com slick slick blob master slick-testkit src main scala com typesafe slick testkit tests MapperTest.scala .. . .. . But I m trying to create a TypeMapper for org.joda.time.DateTime to from java.sql.Timestamp - but without much success .",
"This helped a lot : http : tastefulcode.com 2015 03 19 modern-database-access-scala-slick .",
"I am working on a scala project which uses slick as it s database access library .",
"I m trying to create a typesafe dynamic DSL for a Slick table but not sure how to achieve this .",
"j3d a great explanation of foreign-keys are in this recent talk by stefan zeiger : skillsmatter.com podcast scala slick-database-access-with-scala http : skillsmatter.com podcast scala slick-database-access-with-scala skip to minute 32 : 00 .",
"Also have the same problem for the 22 columns limitation the test case https : github.com slick slick blob 2.1 slick-testkit src main scala com typesafe slick testkit tests JdbcMapperTest.scala L129-141 helps very much .",
"I m struggling a bit in Slick and i m a recent Scala Slick adopter .",
"The play-slick https : github.com playframework play-slick does exactly the same as what is proposed in the other answers and it seems to be under the umbrella of Play Typesafe .",
"The code or Slick s shapes is here : github.com slick slick blob 2.1.0 src main scala scala slick https : github.com slick slick blob 2.1.0 src main scala scala slick lifted Shape.scala But it is definitely advanced stuff to understand .",
"I m using slick to access database .",
"This is a talk http : skillsmatter.com podcast scala slick-database-access-with-scala ac-5896 by the creators where most of this is described correctly .",
"There is no reason that in a language as powerful as Scala that lifted embedding should be implemented as it is in Slick .",
"Following this slick example https : github.com slick slick-examples blob master src main scala com typesafe slick examples lifted MultiDBCakeExample.scala database abstraction and this article http : crisdev.wordpress.com 2013 12 11 crud-trait-for-slick-2-0 CRUD trait I came up with the following shortened code snippet : .. . .. . The code is invalid due to a type mismatch .",
"A real schema are : .. . .. . users count 1.5 Million .. . event count 1.0 Million .. . subscribe count 1.2 Million .. . .. . Queries was generated by typesafe slick 3 scala .",
"possible duplicate of Scala Slick delete not working http : stackoverflow.com questions 24000759 scala-slick-delete-not-working",
"I m new to Scala as well as Slick .",
"Here is the relevant code for both questions https : github.com slick slick blob 3.1.1 slick src main scala slick backend DatabaseComponent.scala L235-L241 .",
"Digging a little more at the code you can see that the JDBC implementation creates a BaseSession https : github.com slick slick blob 3.1.1 slick src main scala slick jdbc JdbcBackend.scala L38-L47 which holds a connection https : github.com slick slick blob 3.1.1 slick src main scala slick jdbc JdbcBackend.scala L414-L418 and also closes it when the close method is invoked https : github.com slick slick blob 3.1.1 slick src main scala slick jdbc JdbcBackend.scala L432-L434 .",
"Or indeed wait until Typesafe fix the issue in a future version of Scala .",
"github.com slick slick issues 627 https : github.com slick slick issues 627 can help",
"Basically the same question has been asked about a year ago for slick 2.x scala slick one-to-many collections http : stackoverflow.com questions 25547237 scala-slick-one-to-many-collections .",
"solved it.Problem was I had 2 libraries - play-slick and scala-slick The autogen code was using scala slick so the Table caseClassType should be scala.slick.driver.MySQLDriver not play.api.db.slick.Config.driver.simple.Table caseClassType which was the case in error message",
"I can wholeheartedly recommend the Getting Started part of the Slick documentation http : slick.typesafe.com doc 3.1.1 gettingstarted.html .. . .. . There is also a Typesafe Activator Template for Slick - Hello Slick - which you can find here http : www.lightbend.com activator template hello-slick-3.0 and then explore and continue from there .. . .. . 1 .",
"I m new to Slick and have little experience with Scala .",
"I m using Slick 3.1.0 and Slick-pg 0.10.0 .",
"I am new to Slick and using Slick 3.1.1 .",
"If it was simple slick project refer to hello-slick template .",
"http : stackoverflow.com questions 19636611 how-can-i-handle-a-22-column-table-with-slick-using-nested-tuples-or-hlists .. . .. . I ve seen this test which shows how to define a custom mapping function and I d like to do that : .. . .. . https : github.com slick slick blob 2.1 slick-testkit src main scala com typesafe slick testkit tests JdbcMapperTest.scala L129-141 .. . .. . The problem is that I can t make it",
"In Slick 1.0.1 .. . .. . In Slick 2.0",
"Scala 2.10.4 Play 2.3 Slick 2.0.2 .. . .. . Table classes generated by Slick code generator below : .. . .. . UPDATE - SOLUTION The final solution is in this question http : stackoverflow.com questions 24190955 slick-dynamic-sortby-in-a-query-with-left-join .",
"The jdbc library conflicts with play-slick so how do I get the database instance from slick",
"github.com slick slick issues 1316 https : github.com slick slick issues 1316 github.com slick slick pull 1513 https : github.com slick slick pull 1513",
"in Slick .",
"I was previously generating database-schema from my models somehow like this before in an earlier version of play-slick with slick but not with play-slick-evolutions .",
"Possible duplicate : Create a MySQL connection in Playframework with slick http : stackoverflow.com questions 16569050 create-a-mysql-connection-in-playframework-with-slick rq 1 .. . .. . I am using play-slick plugin to try connecting with mysql database .",
"this is somewhat related stackoverflow.com questions 19030875 http : stackoverflow.com questions 19030875 how-can-i-create-a-custom-column-type-with-typesafe-slick-in-scala 19040124 19040124",
"There is an open ticket that I believe intends to solve your problem : github.com slick slick issues 1015 https : github.com slick slick issues 1015",
"The reason why delete is not available on the Query is cause the play-slick Query does not contain a equivalent method of the delete method from slick Query .",
"Ex : .. . .. . Useful links : .. . .. . https : github.com slick slick issues 1038 .. . .. . https : github.com slick slick issues 809",
"There are fixes if you want to patch Scala or Slick yourself .",
"I m using Scala and new to Play and Slick .",
"I am using Slick 2.1.0 with Scala 2.10 .",
"This is the default in Slick .",
"I m creating a test suite for a Java application with Scala ScalaTest and Slick .",
"Take a look github.com satendrakumar06 slick-for-production https : github.com satendrakumar06 slick-for-production This has been written in slick 3.0.1 .",
"Is it Slick 2.x or Slick 3.x",
"This is working here : .. . .. . This is how my SQL looks : .. . .. . Update : .. . .. . The specific problem with regard to a mapped table with User as in the question can be solved as follows : .. . .. . This is from the test cases in the Slick git repository https : github.com slick slick blob 797e81172cd152ed7fce8cd2e3335a8dac8edb9b slick-testkit src main scala com typesafe slick testkit tests MapperTest.scala L20 .",
"So basically this means transforming a Scala case class representing my filters to a Slick query .",
"I am trying to write a succinct Scala Slick query to find all date times that are less than the current DateTime.now .",
"There is no direct communication from Slick to the database server to reuse an old query .",
"I have used Slick 1.0.0 with Scala 2.10 .",
"I m using Scala 2.10.0-RC1 and Slick 0.11.2 .",
"I m a new slick user and I m having trouble creating a slick query .",
"slick 0.8.1 and slick 2.1.0 and I had the same Issue .",
"I ve done it : github.com slick slick issues 104 https : github.com slick slick issues 104",
"not an answer but this thread looks relevant : github.com slick slick issues 519 https : github.com slick slick issues 519",
"Any suggestions would be great as I m new to Scala and Slick .",
"I realize you ve tagged this as a Slick 2 question but the enhancement is slated for Slick 3.1 : https : github.com slick slick issues 179 .. . .. . In the meantime you can manage the join yourself .",
"print Users.autoInc.insert User None Jack Green .. . .. . See also : .. . .. . https : github.com slick slick issues 10 .. . .. . https : github.com slick slick commit 09a65a8e88a0363412e218dc5c06023b69809649",
"Note this code doesn t seem to work with the current release due to github.com slick slick issues 540 https : github.com slick slick issues 540 .",
"Something like this could work : .. . .. . See this example https : github.com blinkboxbooks common-slick.scala blob master src main scala com blinkbox books slick SlickSupport.scala for database type parameterisation in slick .",
"If you are new to slick I would like to suggest you should use slick as a plugin https : github.com playframework play-slick .",
"I am looking to use the Slick 3 framework for a Scala application to manage database interactions .",
"It doesn t work because the StaticQuery object Q expects to implicitly set the parameters in the query-string using the type parameters of the query method to create a sort of setter object of type scala.slick.jdbc.SetParameter T https : github.com slick slick blob master src main scala scala slick jdbc SetParameter.fm .",
"Workaround in here : https : github.com slick slick pull 995",
"I m very new to the slick framework and I m trying to insert a record into my database using slick .",
"I am using Scala with PlayFramework and Slick .",
"And Slick is not yet distributed for Scala 2.11 pre-releases .",
"Now I m writing sample for learning scala slick .",
"Seems like you are learning Scala and Slick at the same time .",
"I am new in Slick and scala and I have the following question .",
"I am trying to convert long into timestamps in scala slick .",
"I m new to Slick .",
"Or in newer versions of Slick : .. . .. . and",
"Yes Slick vs . ORM",
"Is is the right way to do it in slick",
"I m using play-slick for data-access and evolutions to handle migrations .",
"You find an example on how to use the cake-pattern dependency-injection to decouple the Slick driver from the database access layer here : https : github.com slick slick-examples .",
"The difference between Slick and Anorm is that Slick s queries are checked by the Scala compiler .",
"I have the problem writing query in SLICK Here is my request to MySql database : .. . .. . How can I write it using SLICK",
"See Slick 3.0 withTransaction blocks are required to interact with libraries https : github.com slick slick issues 1197 .",
"I m in the middle of upgrading my Play Framework application using slick 2.1.0 to play-slick 1.0.0 which includes slick 3.0.0 .",
"I have a query method that returns Slick queries .",
"Slick how to map a query to an inheritance table model",
"I believe Play-Slick is not integrated with jdbcdslog but you can get the queries directly from Slick .",
"method https : github.com slick slick commit 5ec6039a0bb54c3156f499d3678c96e9e7e926b3 lined up .",
"Apparently https : github.com slick slick issues 6 this is not yet",
"I m trying to generate the Scala code for the database tables and views in my schema using Slick 3.0.3 .",
"I m setting up a slick Database object from typesafe-config like so : .. . .. . The config object tells Slick to use HikariCP like so : .. . .. . After instantiating the DatabaseService I can then run queries by running dbService.db.run someQuery ."
]
}
|
{
"confidence": [
70.12599182128906,
67.3695297241211,
64.47007751464844,
63.992374420166016,
63.685401916503906,
62.64250946044922,
62.25028991699219,
61.784202575683594,
60.953250885009766,
60.674400329589844,
60.47576141357422,
60.01279830932617,
59.957252502441406,
59.470611572265625,
59.464839935302734,
59.32457733154297,
59.09319305419922,
58.19999694824219,
58.06319046020508,
57.8958740234375
],
"content": [
"Question : I m setting up a slick Database object from typesafe-config like so : .. . .. . The config object tells Slick to use HikariCP like so : .. . .. . After instantiating the DatabaseService I can then run queries by running dbService.db.run someQuery . The first question is do I need to do something to get a connection from the pool or does that happen behind the scenes when I invoke db.run Secondly once that query or queries execute how do I return the current database-connection to the connection pool .. . Answer : The first question is do I need to do something to get a connection from the pool or does that happen behind the scenes when I invoke db.run That happens behind the scenes . Secondly once that query or queries execute how do I return the current database-connection to the connection pool Thats also happens behind the scenes . Here is the relevant code for both questions https : github.com slick slick blob 3.1.1 slick src main scala slick backend DatabaseComponent.scala L235-L241 . Basically is acquires a session executes the given action in your case someQuery and then release the session closes it . Digging a little more at the code you can see that the JDBC implementation creates a BaseSession https : github.com slick slick blob 3.1.1 slick src main scala slick jdbc JdbcBackend.scala L38-L47 which holds a connection https : github.com slick slick blob 3.1.1 slick src main scala slick jdbc JdbcBackend.scala L414-L418 and also closes it when the close method is invoked https : github.com slick slick blob 3.1.1 slick src main scala slick jdbc JdbcBackend.scala L432-L434 . Also from the docs http : slick.lightbend.com doc 3.1.1 gettingstarted.html populating-the-database : .. . .. . Database connections and transactions are managed automatically by Slick . By default connections are acquired and released on demand and used in auto-commit mode . Comment : Awesome thanks for linking the code in your answer Do you happen to know where I can find a list of complete config options for the Database class Doesn t seem to be one in the docs . Comment : At the scaladocs forConfig method http : slick.lightbend.com doc 3.1.1 api index.html slick.jdbc.JdbcBackend 24DatabaseFactoryDef@forConfig path : String config : com.typesafe.config.Config driver : java.sql.Driver classLoader : ClassLoader : JdbcBackend.this.Database you need to expand the method documentation . It was linked here http : slick.lightbend.com doc 3.1.1 database.html . Comment : Ah I totally missed that expand icon . Thanks again",
"Question : I ve a table user-permissions which has 46 permission columns along with id and created date . This table has a corresponding UserPermissions class : .. . .. . and slick mapping table .. . .. . Now I want to update UserPermission set which is identified by id . The function that I ve is : .. . .. . This is not working and throwing Exception : .. . .. . which makes sense as the SQL generated by Slick is : .. . .. . Problem 1 So my first problem is that I m unable to update a full UserPermission object with slick . If I ve a solution to this problem then it would be great . .. . .. . Since I m unable to update full object then I thought to yield the columns I want to update then fire an update query . The code looks like this : .. . .. . Problem 2 Now slick is not updating 46 columns in query.update function . It can handle only 22 columns at one time . How can I update my UserPermissions object One bad solution I can think is to update 22 first time then 22 second then 2 in third query . It ll be 3 db update queries which I don t want . Any solutions to my problem .. . .. . Dependencies are : .. . .. . .. . .. . .. . .. . .. . Answer : Stefan Zeiger the Slick lead said https : groups.google.com forum msg scalaquery qjNW8P7VQJ8 ntqCkz0S4WIJ we couldn t . He suggested however that we have nested projections over the flat 22+ columns table : .. . .. . which is now a test https : github.com slick slick blob 006d8a71b629099712e53ca04abc156b50818684 slick-testkit src main scala com typesafe slick testkit tests JdbcMapperTest.scala L144 at Slick including one for version 3 https : github.com slick slick blob master slick-testkit src main scala com typesafe slick testkit tests JdbcMapperTest.scala . As for updating : .. . .. . The nested objects with Slick s projections can be flattened for the single object that you bring in or take away with .",
"Question : I have a simple method to retrieve a user from a db with Sclick plain SQL method : .. . .. . The result is List String but I would like it to be something like Map String String - column name and value pair map . Is this possible If so how My stack is Play Framework 2.2.1 Slick 1.0.1 Scala 2.10.3 Java 8 64bit Comment : also see stackoverflow.com questions 19891881 http : stackoverflow.com questions 19891881 scala-slick-plain-sql-retrieve-result-as-a-map 19892330 noredirect 1 comment29592959 19892330 .. . Answer : Comment : Thanks it seems to be working although I can see why I didn t figure it out myself - didn t think it can possibly be that complicated.. . Comment : There is no documentation about this feature but you can find usages in : github.com slick slick blob master slick-testkit src main scala https : github.com slick slick blob master slick-testkit src main scala com typesafe slick testkit tests MapperTest.scala and github.com cvogt migrations blob master src main scala scala https : github.com cvogt migrations blob master src main scala scala slick jdbc reflect reflect.scala",
"Question : How does one insert records into PostgreSQL using AutoInc keys with Slick mapped tables If I use and Option for the id in my case class and set it to None then PostgreSQL will complain on insert that the field cannot be null . This works for H2 but not for PostgreSQL : .. . .. . Using the above with H2 succeeds but if I comment it out and change to PostgreSQL then I get : Comment : this example might be of use to someone : github.com slick slick-examples blob 2.0.0-RC1 src main scala https : github.com slick slick-examples blob 2.0.0-RC1 src main scala com typesafe slick examples lifted MultiDBCakeExample.scala .. . Answer : This is working here : .. . .. . This is how my SQL looks : .. . .. . Update : .. . .. . The specific problem with regard to a mapped table with User as in the question can be solved as follows : .. . .. . This is from the test cases in the Slick git repository https : github.com slick slick blob 797e81172cd152ed7fce8cd2e3335a8dac8edb9b slick-testkit src main scala com typesafe slick testkit tests MapperTest.scala L20 . Comment : Sorry I m a scala beginner I think I misunderstood your example . I m using the driver version 9.1-901-1.jdbc4 . I ve edited my answer to illustrate exactly what I m doing here . Hope it helps . Comment : @JacobusR have you solved the issue with id being null when sending it as in your question with None Because I have that issue too.. . Comment : Hi Christian I m not sure I understand.. . Won t you please ask it as a separate question so that you can post a larger part of your code . With a bit of luck some other clever Slick guru stumbles over your question and sets us both straight : - Comment : Just a note . If your data type is int or bigint and you want to use AutoInc you need to create a sequence and set the default to use the sequence . Comment : What can be done when tables are larger maybe 15-20 columns.. . the forInsert method becomes a monster",
"Question : I am getting unresolved dependencies errors when trying to use slick or play-slick with Play Framework 2.2.2 sbt 0.13.0 and Scala 2.10.3 on Mac OS X Mavericks . I have tried clearing my ivy cache running play clean and adding different resolvers but nothing has worked . This is the build.sbt file : .. . .. . UPDATE : Looked into resolvers .. . .. . play21-osm show resolvers info List Typesafe Releases Repository : http : repo.typesafe.com typesafe releases Typesafe Releases : http : typesafe.artifactoryonline.com typesafe pk11 repo : http : pk11-scratch.googlecode.com svn-trunk play21-osm show externalResolvers info ArrayBuffer FileRepository local FileConfiguration true None Patterns ivyPatterns List ivy.home local organisation module scala scalaVersion sbt sbtVersion revision type s artifact . ext artifactPatterns List ivy.home local organisation module scala scalaVersion sbt sbtVersion revision type s artifact . ext isMavenCompatible false Maven2 Local : file : Users mr .m2 repository public : http : repo1.maven.org maven2 Typesafe Releases Repository : http : repo.typesafe.com typesafe releases Typesafe Releases : http : typesafe.artifactoryonline.com typesafe pk11 repo : http : pk11-scratch.googlecode.com svn-trunk .. . Answer : Your slick dependency has the wrong group name . It should be com.typesafe.slick instead of com.typesafe.play : Comment : Thanks but it still gives the error . error : update sbt.ResolveException : unresolved dependency : com.typesafe.slick slick 2.10 2.0.0 : not found Comment : @MichaelRichardson This is strange . It should work fine with the correct gorup on my machine it does . Do you have a proxy or special resolvers Comment : I am pretty sure that I don t have a proxy or special resolvers . I think that Play sbt or ivy may have become corrupted and that this is the source of my problem . I used brew to install play and sbt . I used brew to uninstall and reinstall play and sbt but this hasn t fixed it . I deleted the entire cache of play as suggested by lpiepiora and now I get the error Error during sbt execution : No repositories defined . when I run the play command .",
"Question : I am trying to write a generic CRUD trait for Slick 2.0 . The trait should a provide generic methods to read update delete entities as well as b abstract from the database . Following this slick example https : github.com slick slick-examples blob master src main scala com typesafe slick examples lifted MultiDBCakeExample.scala database abstraction and this article http : crisdev.wordpress.com 2013 12 11 crud-trait-for-slick-2-0 CRUD trait I came up with the following shortened code snippet : .. . .. . The code is invalid due to a type mismatch . The return-type of the 2nd function seems to be of type List T TableElementType but needs to be List A . Any ideas on how to solve the issue . Additional references to further readings on generic Slick 2.0 operations are welcome too . Comment : It works if you use Table instead of AbstractTable but for that you need a concrete Profile . I m confused how profiles in slick-2.0 are intended to use . .. . Answer : type TableElementType is abstract inside of class AbstractTable A . Scala doesn t know about any relationship between A and TableElementType . class Table on the other hand defines final type TableElementType A which tells Scala about this relationship and apparently Scala is smart enough to use the final annotation to know that the relationanship even holds for a subtype T : Table A eventhough Table A is not co-variant in A . So you need to use T : Table A instead of T : AbstractTable A . And because Table is inside the Slick driver cake as in cake-pattern you need to move your Crud into your cake as well . Cakes are viral .",
"Question : How does one insert records into PostgreSQL using AutoInc keys with Slick mapped tables If I use and Option for the id in my case class and set it to None then PostgreSQL will complain on insert that the field cannot be null . This works for H2 but not for PostgreSQL : .. . .. . Using the above with H2 succeeds but if I comment it out and change to PostgreSQL then I get : Comment : this example might be of use to someone : github.com slick slick-examples blob 2.0.0-RC1 src main scala https : github.com slick slick-examples blob 2.0.0-RC1 src main scala com typesafe slick examples lifted MultiDBCakeExample.scala .. . Answer : I ve faced the same problem trying to make the computer-database sample from play-slick-3.0 when I changed the db to Postgres . What solved the problem was to change the id column primary-key type to SERIAL in the evolution file conf evolutions default 1.sql originally was in BIGINT . Take a look at https : groups.google.com forum fromgroups 21topic scalaquery OEOF8HNzn2U .. . for the whole discussion . Cheers ReneX",
"Question : This question is based on a very similar previous request for help http : stackoverflow.com questions 24624151 where-can-i-define-methods-to-be-called-on-tables . With the introduction of a DAO and multiple database drivers the same problem requires a different approach and I hope warrants a new SO question . .. . .. . I have a class and Slick Table defined like this : .. . .. . And a data-access object : .. . .. . This is pretty awesome because now I can add something like the following to my application.conf : .. . .. . .. . and if I do the following in a Controller : .. . .. . I have access to my foos TableQuery and it automagically gets the driver and database url given for db.default in application.conf . In a similar but not-quite-as-nice way I can do the following in my test Specification : .. . .. . However what if I want to define a method which can act on a TableQuery Foo Something like this : .. . .. . .. . .. . Problem .. . .. . What s the correct way of writing the findByTitle method and where should I put it so that I can : .. . .. . Call it in a way such that it won t collide with a method of the same name which acts on TableQuery Bar . Coming from OO I feel like I want to do something like foos.findByTitle someFoo but if there s a better way of doing this functional-style I m open to suggestions . Call it from an application Controller such that the query will work with my db.default h2 driver and from my test Specification so that it will work with my db.test postgres driver . .. . .. . As an aside if I can put this in my DAO : .. . .. . and then import models.dao.current . anywhere I want to use this DAO how can I extend the same form to the following : .. . .. . If I try to do this the compiler complains about not having an implicit Application in scope . Comment : For anyone confused like I was about why my DAO doesn t contain the Table and has class DAO override val profile : JdbcProfile extends FooComponent with Profile instead of class DAO val driver : JdbcProfile like you might see in other examples I m using the play-slick plugin . Check out the differences between these two examples : play-slick https : github.com playframework play-slick blob master samples play-slick-cake-sample app models DAO.scala and slick https : github.com slick slick-examples blob master src main scala com typesafe slick examples lifted MultiDBExample.scala .. . .. . Answer : If you use the play slick plugin it will need a started play application to be able to call code that uses the DB access from that plugin you can make sure to start a play app in your tests using WithApplication as described in the docs : http : www.playframework.com documentation 2.3.x ScalaFunctionalTestingWithSpecs2",
"Question : I have the follow enum : .. . .. . I need to persist the value of the enum A but when the sql is generated the result is 0 . this is the table mapping : .. . .. . how to persiste the enum value I implemented .. . .. . but result in : Comment : this is somewhat related stackoverflow.com questions 19030875 http : stackoverflow.com questions 19030875 how-can-i-create-a-custom-column-type-with-typesafe-slick-in-scala 19040124 19040124 Comment : This is also discussed on the Slick mailing list groups.google.com d msg scalaquery Cd5iG-tJchM fEIhq8IPVJQJ https : groups.google.com d msg scalaquery Cd5iG-tJchM fEIhq8IPVJQJ Comment : also related to stackoverflow.com questions 18752929 http : stackoverflow.com questions 18752929 how-to-use-enums-in-scala-slick .. . Answer : After some help I found the solution the enum : .. . .. . and the table mapping :",
"Question : I am getting unresolved dependencies errors when trying to use slick or play-slick with Play Framework 2.2.2 sbt 0.13.0 and Scala 2.10.3 on Mac OS X Mavericks . I have tried clearing my ivy cache running play clean and adding different resolvers but nothing has worked . This is the build.sbt file : .. . .. . UPDATE : Looked into resolvers .. . .. . play21-osm show resolvers info List Typesafe Releases Repository : http : repo.typesafe.com typesafe releases Typesafe Releases : http : typesafe.artifactoryonline.com typesafe pk11 repo : http : pk11-scratch.googlecode.com svn-trunk play21-osm show externalResolvers info ArrayBuffer FileRepository local FileConfiguration true None Patterns ivyPatterns List ivy.home local organisation module scala scalaVersion sbt sbtVersion revision type s artifact . ext artifactPatterns List ivy.home local organisation module scala scalaVersion sbt sbtVersion revision type s artifact . ext isMavenCompatible false Maven2 Local : file : Users mr .m2 repository public : http : repo1.maven.org maven2 Typesafe Releases Repository : http : repo.typesafe.com typesafe releases Typesafe Releases : http : typesafe.artifactoryonline.com typesafe pk11 repo : http : pk11-scratch.googlecode.com svn-trunk .. . Answer : Very hard to tell if this really was what fixed the problem but it is now working for me . I think that my sbt or ivy repositories had become corrupted and this resulted in them being rebuilt . Comment : I wonder if they became corrupted because there was a lock on one of the files so sbt was unable to read change it",
"Question : I m struggling a bit in Slick and i m a recent Scala Slick adopter . I m used to Hibernate and or Rails ActiveRecord but i m having a bit difficulty joining plenty of tables . I have the Following class pattern . I m trying to have this as a Domain Model and having the Persistence Layer just fetch and join the tables to return a domain single object . 1 . Is is the right way to do it in slick 2 . Is there anyway to cache the Query Results instead of being constantly querying the database 3 . Does this Lib https : github.com strongtyped active-slick help 4 . What s the best way of joining for example these 3 tables 1 Query to each of them via separate DAO s or Inner Joins and use Scala s groupBy Sorry if this is a newbish question . I m just trying to figure out how to Think Slick . .. . Answer : I wrote a small tutorial on play + slick some time ago . check it and see if it helps http : pedrorijo.com blog play-slick .. . .. . I usually have : .. . .. . but maybe there s a better approach Comment : The thing is i don t want to have Id s in my Domain Classes . I m trying to do Hibernate Style Comment : yes but Hibernate is an ORM while Slick is a modern database query and access library for Scala . . Still if someone can suggest a better approach to referring other domain classes in a slick case class I would be happy to know Comment : Ok ok . Got it . 1 more thing . What s the best way to join those tables . Multiple Queries or Join the Tables and in-memory groupBy",
"Question : This question is based on a very similar previous request for help http : stackoverflow.com questions 24624151 where-can-i-define-methods-to-be-called-on-tables . With the introduction of a DAO and multiple database drivers the same problem requires a different approach and I hope warrants a new SO question . .. . .. . I have a class and Slick Table defined like this : .. . .. . And a data-access object : .. . .. . This is pretty awesome because now I can add something like the following to my application.conf : .. . .. . .. . and if I do the following in a Controller : .. . .. . I have access to my foos TableQuery and it automagically gets the driver and database url given for db.default in application.conf . In a similar but not-quite-as-nice way I can do the following in my test Specification : .. . .. . However what if I want to define a method which can act on a TableQuery Foo Something like this : .. . .. . .. . .. . Problem .. . .. . What s the correct way of writing the findByTitle method and where should I put it so that I can : .. . .. . Call it in a way such that it won t collide with a method of the same name which acts on TableQuery Bar . Coming from OO I feel like I want to do something like foos.findByTitle someFoo but if there s a better way of doing this functional-style I m open to suggestions . Call it from an application Controller such that the query will work with my db.default h2 driver and from my test Specification so that it will work with my db.test postgres driver . .. . .. . As an aside if I can put this in my DAO : .. . .. . and then import models.dao.current . anywhere I want to use this DAO how can I extend the same form to the following : .. . .. . If I try to do this the compiler complains about not having an implicit Application in scope . Comment : For anyone confused like I was about why my DAO doesn t contain the Table and has class DAO override val profile : JdbcProfile extends FooComponent with Profile instead of class DAO val driver : JdbcProfile like you might see in other examples I m using the play-slick plugin . Check out the differences between these two examples : play-slick https : github.com playframework play-slick blob master samples play-slick-cake-sample app models DAO.scala and slick https : github.com slick slick-examples blob master src main scala com typesafe slick examples lifted MultiDBExample.scala .. . .. . Answer : I think you need to read up in implicit-conversion and implicit parameters in Scala . There are online Scala books available . When you get an error message about a missing implicit it either means you ran into a failing type-check provided by a library preventing you from doing something wrong but that s not the case here . Or you simply forgot to make the implicit available . There are two ways to make an implicit available . Either import it into the scope where you get the error message . Or basically defer the lookup to the callsite of your method . Not sure which one is the right one for play . You either need to import the implicit Application from play or you need turn val dao into a method and request an implicit application in an implicit argument list def dao implicit app : Application .. . . You can alternatively turn test into a class and request it there .",
"Question : I m trying to map a DB row with more than 22 columns to a case class tree . I d rather not using HList as I don t want to work with that API and also for some exponential compilation time feedbacks that I ve read somewhere.. . I have read this thread answered by Stefan Zeiger : How can I handle a 22 column table with Slick using nested tuples or HLists http : stackoverflow.com questions 19636611 how-can-i-handle-a-22-column-table-with-slick-using-nested-tuples-or-hlists .. . .. . I ve seen this test which shows how to define a custom mapping function and I d like to do that : .. . .. . https : github.com slick slick blob 2.1 slick-testkit src main scala com typesafe slick testkit tests JdbcMapperTest.scala L129-141 .. . .. . The problem is that I can t make it I ve tried by smaller steps . It seems that when I call .. . .. . The type is ShapedValue Column String Column String Column String Nothing .. . .. . While this one seems to work fine .. . .. . The U type-parameter is not Nothing but as expected String String String .. . .. . I don t really understand how all the Slick internals are working . Can someone explain me why I can t make my code work Is there a missing import or something I guess I need to get a value of type .. . .. . but I don t know why it returns me Nothing and don t really understand where these implicit Shape parameters come from.. . .. . .. . What I want is just to be able to easily split my column into 2 case classes .. . .. . Thanks .. . Answer : Also have the same problem for the 22 columns limitation the test case https : github.com slick slick blob 2.1 slick-testkit src main scala com typesafe slick testkit tests JdbcMapperTest.scala L129-141 helps very much . Not sure why the example code not working for you the following code works fine for me Comment : thanks it seems you are right it works fine . It s just so easy to make a typo when you have very large tuples I think I had a problem with type-inference and maybe a typo so I decided to go step by step providing types explicitly at each step and now it works",
"Question : I ve started using the Slick framework and the Code Generator that it s recommended to use . My problem is that after I generate the code for a table with more than 22 columns I know about the limits but the Code Generator let me get over it easily I just can t compile the project anymore . I m getting this error : .. . .. . I have searched through the whole internet and didn t come up with a solution to this error in the actual version of Slick 3.1.0 . Comment : This looks like an error in the compiler and involving IDEA . try to compile in the terminal with sbt . Comment : Tried it didn t worked too : .. . Answer : This is to do with a Scala limit of 22 things in a Tuple . There s more information on it over here https : stackoverflow.com questions 4152223 why-are-scala-functions-limited-to-22-parameters on why this is the case . 22 columns in a database-table is rather a lot though so I would suggest if it was possible to split that up into multiple joined tables that would be a way around the issue . Or indeed wait until Typesafe fix the issue in a future version of Scala . If indeed that ever happens . Comment : But in their tutorial http : slick.typesafe.com doc 3.1.0 code-generation.html they support more than 22 values in a tuple .",
"Question : I have the follow enum : .. . .. . I need to persist the value of the enum A but when the sql is generated the result is 0 . this is the table mapping : .. . .. . how to persiste the enum value I implemented .. . .. . but result in : Comment : this is somewhat related stackoverflow.com questions 19030875 http : stackoverflow.com questions 19030875 how-can-i-create-a-custom-column-type-with-typesafe-slick-in-scala 19040124 19040124 Comment : This is also discussed on the Slick mailing list groups.google.com d msg scalaquery Cd5iG-tJchM fEIhq8IPVJQJ https : groups.google.com d msg scalaquery Cd5iG-tJchM fEIhq8IPVJQJ Comment : also related to stackoverflow.com questions 18752929 http : stackoverflow.com questions 18752929 how-to-use-enums-in-scala-slick .. . Answer : Maybe you could create a TypeMapper for your enum type : .. . .. . .. . implicit val LoginStatusTypeMapper MappedTypeMapper.base LoginStatus.Value Int .. . conversion from LoginStatus to int .. . .. . status status.id .. . .. . conversion back from int to enum .. . .. . id LoginStatus id .. . .. . .. . .. . .. . then you need to reference your column as : .. . .. . columnLoginStatus.Value .. . .. . This way it will be transformed back to your enum when you load data from the database . If you insist on storing your values as characters in the DB you just need to create a mapper that maps to a char and define your Comment : I implemented a mapper but resulted in error :",
"Question : I use the following code to request items from a mysql table The Account class just is a case class representing the database fields .. . .. . The line .. . .. . throws the following exception : .. . .. . What could be the reason for it I m using Scala 2.10.0-RC1 and Slick 0.11.2 . Here the way the Account class looks like : Comment : not sure but try db.withSession .. . Comment : Doesn t make a difference : Comment : not familiar with slick but what is this toList method Can you not explicitly tell the compiler that you are expecting a List Account On ScalaQuery I do something like list Foo someQuery where list is a helper method that invokes SQ s list method on the query and casts to the given T . Not typesafe but highly convenient... . Comment : Not familiar with slick too . SlickBackend.toList was a way I found to actually execute the query . The type inferencer tells me that r is of type List String as I d expect it . Comment : well the error is the clue give the compiler a hand and explicitly specify the type . .. . Answer : This means the types don t match the mysql types . ie id should be a Int not a Long .",
"Question : I m new to Scala using 2.10 and Slick using 2.0-M2 . I see that one of the ways to get around the 22 column limit for tables in Slick is to use nested tuples . I can t figure out how to do that despite finding this partial code on GitHub https : github.com slick slick commit 7f8668e49da34cf0cb52ac21a6f5b46d0b0fdb47 . Current dev branch Scala 2.11-M5 supports case classes with more than 22 elements but not tuples with arity 22 . And Slick is not yet distributed for Scala 2.11 pre-releases . How can I define a 33 column table and have it work with all Slick s syntactic-sugar N.B . I m trying to support an existing schema and can t change the table normalization . Comment : Won t help you but related stackoverflow.com questions 19593137 http : stackoverflow.com questions 19593137 can-i-output-a-collection-instead-of-a-tuple-in-scalding-map-method putting it there because if somebody will comeup with answer to this question it could answer to that guy as well . Comment : This related question has lots of useful information : stackoverflow.com questions 13906684 http : stackoverflow.com questions 13906684 scala-slick-method-i-can-not-understand-so-far .. . Answer : The test code you linked to is outdated . If you don t use mappings for your tables it s straight-forward : The type of corresponds to the return-type you get when querying the table whether it is a single tuple an HList or nested tuples . Since Slick 2.1 this works for all operations . In 2.0 it was not supported for the projection so you had to define an alternate projection and override create . See here https : github.com slick slick blob 2.1 slick-testkit src main scala com typesafe slick testkit tests JdbcMapperTest.scala L312-337 for an HList example . If you want to map the projection to a custom type you also use the operator as for a single tuple but you don t get the convenience of the tupled and unapply methods that are automatically generated for case classes so you have to write the two mapping functions from the unmapped to the mapped type and back manually as shown here https : github.com slick slick blob 2.1 slick-testkit src main scala com typesafe slick testkit tests JdbcMapperTest.scala L129-141 . Note that Scala 2.11 does not improve this situation . While it allows case classes with more than 22 fields there are no corresponding Function types for arities 22 so you still can t use tupled and unapply . As an alternative to writing these functions you can define a lifted type corresponding to your mapped type as explained in the manual http : slick.typesafe.com doc 2.1.0 userdefined.html monomorphic-case-classes . This is especially useful when you have nested case classes of 22 fields each for your mapped type . You only have to define separate mappings for each case class and they will automatically compose when you use them in a projection or any other place in a projection or query . Comment : I can t make this custom case class mapping based on the test to work . I ve opened a related question here : stackoverflow.com questions 28305023 http : stackoverflow.com questions 28305023 custom-mapping-to-nested-case-class-structure-in-slick-more-than-22-columns",
"Question : I m trying to create a typesafe dynamic DSL for a Slick table but not sure how to achieve this . Users can post filters to the server by sending filters in form json format and I need to build a Slick query with all that . So basically this means transforming a Scala case class representing my filters to a Slick query . It seems the predicates can have 3 different shapes . I ve seen the trait CanBeQueryCondition . Can I fold over these different possible shapes I ve seen the extension-methods and and know there is something to do with this but I just don t know how to do . Basically I have a list of predicates which takes the following types : .. . .. . or .. . .. . The problem to me is that there is not a single supertype for all the 3 different types that have a CanBeQueryCondition so I don t really know how do fold the predicates with as once added to the list these differently shaped predicate takes a very generic type List PatientTable Column : Boolean with Option Boolean . Also I m not sure about what can be considered a predicate in Slick . A composable predicate seems to be Column Boolean but actually the filter method only accept parameters of type PatientTable Column Boolean .. . Answer : fold is already the keyword here . Or reduce since you don t need a seeding value . buildFilter.reduce Comment : I read about dynamic filtering a couple of times in the last days on stackoverflow . Maybe it is worth documenting it . What do you think I could help . Comment : Yes it is a feature that everybody building an UI with form filters need . I m kind of surprised this is not a main feature provided by Slick for querying as it s so commun . Hibernate and JPA have the Criteria API for years Comment : I don t quite understand . .filter in combination with .reduce or .fold is an excellent way to do this . What else do you need Slick s composability makes it happen which is a main feature of Slick . Comment : Documenting it is a good idea . Would be great if someone could submit a PR . slick.typesafe.com doc 2.1.0 http : slick.typesafe.com doc 2.1.0 See edit this page on github on the top",
"Question : I am looking for a detailed explanation about the execution of compiled queries . I can t understand how they just compile once and the advantage behind their use Comment : Is not that they execute once . It s compiled once . Comment : Why would they need to be compiled more than once And are you familiar with prepared statements Comment : @perdrofurla yep edited.. . can you give me a clear explanation Comment : Not really I only have a vague idea . But I summoned the gurus they might be able to answer effectively . Comment : actually I am trying to understand a slick example slick.typesafe.com doc 2.1.0 queries.html compiled-queries http : slick.typesafe.com doc 2.1.0 queries.html compiled-queries and as a beginner i can not understand the advantage behind using compiled queries . .. . Answer : The advantage is easy to explain : Query compilation takes time both in Slick and in the database server . If you execute the same query many times it s faster to compile only once . Slick needs to compile an AST with collection operations into a SQL statement . Actually without compiled queries you always have to build the AST first but compared to the compilation times this is extremely fast . The database server has to build an execution plan for a query . This means parsing the query translating it to native database operations and finding optimizations based on the data layout e.g . which index to use . This part can be avoided even if you don t use compiled queries in Slick simply by using bind variables so that you always get the same SQL code for different sets of parameters . A database server keeps a cache of recently used compiled executions plans so as long as the SQL statement is identical the execution plan is only a hash lookup away and doesn t need to be computed again . Slick relies on this kind of caching . There is no direct communication from Slick to the database server to reuse an old query . As to how they are implemented there is some additional complexity for dealing with streaming non-streaming and compiled applied ad-hoc queries in the same way but the interesting entry-point is in Compiled : .. . .. . This gives you an implicit Compilable object for every Function . Similar methods for arities 2 to 22 are auto-generated . Because the individual parameters only need a Shape they can also be nested tuples HLists or any custom type . We still provide abstractions for all function arities because it s syntactically more convenient to write say a Function10 than a Function1 that takes a Tuple10 as its argument . There s a method in Shape that only exists to support compiled functions : .. . .. . The packed representation built by this method can produce an AST containing QueryParameter nodes with the correct type . They are treated the same as other literals during compilation except that the actual values are not known . The extractor starts as identity at the top level and is refined to extract record elements as required . For example if you have a Tuple2 parameter the AST will end up with two QueryParameter nodes which know how to extract the first and second parameter of the tuple at a later point . This later point is when the compiled-query is applied . Executing such an AppliedCompiledFunction uses the pre-compiled SQL statement or compiles it on the fly when you use it for the first time and fills in the statement parameters by threading the argument value through the extractors . Comment : thanks a lot for your answer . Now I understand the utility of the use of compiled queries but I can t try them in an example .can you give me a concrete example . thanks Comment : You can find plenty of examples here : github.com slick slick blob master slick-testkit src main scala https : github.com slick slick blob master slick-testkit src main scala com typesafe slick testkit tests TemplateTest.scala",
"Question : I m trying to create a typesafe dynamic DSL for a Slick table but not sure how to achieve this . Users can post filters to the server by sending filters in form json format and I need to build a Slick query with all that . So basically this means transforming a Scala case class representing my filters to a Slick query . It seems the predicates can have 3 different shapes . I ve seen the trait CanBeQueryCondition . Can I fold over these different possible shapes I ve seen the extension-methods and and know there is something to do with this but I just don t know how to do . Basically I have a list of predicates which takes the following types : .. . .. . or .. . .. . The problem to me is that there is not a single supertype for all the 3 different types that have a CanBeQueryCondition so I don t really know how do fold the predicates with as once added to the list these differently shaped predicate takes a very generic type List PatientTable Column : Boolean with Option Boolean . Also I m not sure about what can be considered a predicate in Slick . A composable predicate seems to be Column Boolean but actually the filter method only accept parameters of type PatientTable Column Boolean .. . Answer : I m answering my own question with what I ve finally built . Let s define a simple case class and row mapper .. . .. . Notion of predicate in Slick .. . .. . I assume that the notion of predicate is what can be put inside TableQuery.filter . But this type is rather complex as it is a function that takes a Table and returns a type that has an implicit CanBeQueryCondition .. . .. . Unfornunately for me there are 3 different types that have a CanBeQueryCondition and putting them in a list to be folded into a single predicate seems not easy ie filter is easy to apply but the and operators are hard to apply as far as I ve tried . But fortunately it seems we can convert easily a Boolean to a Colunm Boolean to a Column Option Boolean with the . extension method . So let s define our predicate type : .. . .. . Folding a list of predicates ie using conjunctions disjunctions ie composing AND and OR clauses .. . .. . Now we only have one type so we can easily fold a list of predicates into a single .. . .. . .. . .. . The dynamic filtering case class .. . .. . From these predicate primitives we can start creating our dynamic composable and typesafe query DSL based on a case class . Notice the usage of . for the companyScopeId field which permits to fit a non-optional column to our definition of a Slick predicate .. . .. . Using the DSL .. . .. . Conclusion .. . .. . This is far from being perfect but is a first draft and at least can give you some inspiration : I would like Slick to make it easier to build such things that are very common in other query DSL like Hibernate JPA Criteria API Comment : I already see you creating a new repository on github named slick-criteria good work Sebastien Comment : thanks : yes that could be a nice idea even if the project would not contain much things Comment : Wow this is gold Thanks for sharing"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
scala
|
UNK_RELATION
|
touchjson@json@50
|
touchjson -- built on objective-c touchjson is a @placeholder parser and generator library .
|
{
"confidence": [
49.41822814941406,
47.14365005493164,
45.88991165161133,
45.69293212890625,
45.69293212890625,
45.69293212890625,
45.33137512207031,
44.55292510986328,
43.808204650878906,
43.18659591674805,
42.68598175048828,
42.43035888671875,
42.43035888671875,
41.3018684387207,
41.277000427246094,
41.277000427246094,
40.136993408203125,
39.92402267456055,
39.63063049316406,
39.56675338745117,
39.56675338745117,
37.84833908081055,
37.84833908081055,
37.84833908081055,
37.84833908081055,
37.84833908081055,
37.84833908081055,
37.84833908081055,
37.84833908081055,
36.70833206176758,
36.70833206176758,
36.14007568359375,
35.342002868652344,
35.342002868652344,
35.301761627197266,
34.948368072509766,
34.948368072509766,
34.50901794433594,
33.73923873901367,
33.73923873901367,
33.22995376586914,
33.22995376586914,
33.22995376586914,
33.22995376586914,
33.22995376586914,
33.22995376586914,
33.22995376586914,
33.22995376586914,
33.22995376586914,
33.22995376586914,
32.08994674682617,
30.72361946105957,
30.72361946105957,
30.72361946105957,
30.72361946105957,
30.72361946105957,
30.72361946105957,
30.40340232849121,
30.40340232849121,
30.40340232849121,
29.263397216796875,
29.120853424072266,
28.84933853149414,
27.89706802368164,
27.483009338378906,
27.237564086914062,
27.237564086914062,
27.237564086914062,
27.237564086914062,
27.237564086914062,
27.237564086914062,
26.097557067871094,
23.679401397705078,
23.085819244384766,
23.085819244384766,
22.66041374206543,
21.624502182006836,
20.042251586914062,
19.86949920654297,
19.48114013671875,
18.52767562866211,
16.844757080078125,
16.70560073852539,
16.578903198242188,
16.037761688232422,
15.866190910339355,
15.866190910339355,
15.560623168945312,
15.553359985351562,
15.069572448730469,
15.069572448730469,
15.069572448730469,
14.943763732910156,
14.726184844970703,
14.582023620605469,
14.370857238769531,
14.370857238769531,
14.0359525680542,
14.0359525680542,
13.943809509277344
],
"content": [
"I parse this using the TouchJSON library .",
"I am using touchJson for objective-c . .. . .. . Best Regards",
"The admob sdk for iPhone uses a proprietary libAdMobNoThumb.a library and an Objective-C source based TouchJSON library .",
"I m the author of TouchJSON .",
"Not sure if TouchJSON provides them .",
"I m using TouchJSON .",
"The setup is as follows : .. . .. . We created a fat TouchJSON library as described in post Monotouch binding for TouchJSON",
"I m using with framework TouchJson .",
"TouchJSON will decode a number to NSNumber not NSInteger",
"MY CODE is .. . .. . TOUCHJSON CODE is",
"I am using TouchJson https : github.com TouchCode TouchJSON to then deserialize this data into a NSDictionary .",
"What s the best way to turn this result into an NSArray using the TouchJSON library",
"I m trying to use TouchJSON library and having some trouble serialising to JSON .",
"That gets converted into a NSDictionary using TouchJson .",
"If TouchJSON isn t parsing it either the input is definitely bad .",
"Is there a way to have have TouchJSON return mutable objects",
"I am using TouchJSON to parse a JSON data .",
"Let me tell you how I created a TouchJSON library .",
"Does anybody know of a C binding for TouchJSON so that we can include it",
"In my project I use TouchJSON to deserialize a JSON string .",
"I don t know enough about TouchJSON to help with that part of the code .",
"Regardless TouchJSON can process them - see the API i listed above .",
"How can i make a SOAP call using TouchJson",
"If the resource is returned in a JSON format it makes sense that it works for you using TouchJSON .",
"I am deserializing some JSON using the TouchJSON framework .",
"TouchJson has an option to return mutable object rather than normal .",
"Hi I am using TouchJSON to deserialize some JSON .",
"Trying to use TouchJSON to do some JSON-y stuff .",
"I am using touchJson to deserialize my json from server .",
"I fetch a JSON array from a web service with touchJSON .",
"Why TouchJSON can t just replace them with real string via UTF8",
"I created a library-project with xcode and copied the TouchJSON sources that came with the latest admob library .",
"I use TouchJson and everything works fine but I ve got a little problem .",
"So it doesn t really matter to TouchJSON how the data exchanged .",
"I have a static library with TouchJSON in it and I am trying to use dictionaryWithJSONString : error : within the static library but I keep getting the runtime exception shown in the title .",
"I ve read through the questions and answers related to TouchJSON serialization and I m still not getting it to work .",
"I use TouchJSON to convert the following to an NSDictionary object .. . .. . Have I done anything wrong",
"We created an iPhone Library project with Xcode and added the full TouchJSON source tree .",
"I m using TouchJson to parse json data from facebooks graph api .",
"I m using the latest version of TouchJson .. . .. . Thank you for your help",
"I did a few tests with TouchJSON last night and it worked pretty well in general for simple cases .",
"I m completely lost on what to do as there isn t much documentation available for TouchJSON and much less usage examples .",
"I can t seem to work out how to get a Dictionary representing an object from the dictionary that TouchJSON returns .",
"I was able to take an array put it in a dictionary serialize it via touchJSON and send it out via http .",
"I want to display a UIProgressView indicating the amount of data received as I request JSON data using touchJSON .",
"I switched to TouchJSON from SBJSON because I wasn t able to extract it from that framework either .",
"But you re right for consistency the documentation for TouchJSON should have used theDeserializer.nullObject nil instead of NULL .",
"The -deserializeAsArray : function is deprecated I guess because it s not available anymore in the TouchJSON code .",
"https : github.com TouchCode TouchJSON tree feature ARC I m trying what I imagine to be a fairly a basic nested structure .",
"I followed a tutorial http : tempered.mobi 20 that uses touchJSON to fill a tableView with a mySQL database in Xcode .",
"Which looks like this : .. . .. . I m not able to parse this into a NSDictionary because touchJSON doesn t support JSON arrays .",
"I am trying to use TouchJSON to retrieve data from a php page with json output .",
"I currently have a UITableViewController that parses a JSON response using TouchJSON fired asynchronously using an ASIHTTPRequest .",
"I was wondering if anyone has the TouchJSON framework working in conjunction with basic apache HTTP authentication .",
"TouchJSON does not handle any transfer of data via http https or any other protocol .",
"I was later going to convert the NSData to another dictionary and pull out the value for the key car and then deserialize it using touchjson .",
"Also if anyone is familiar with touchJSON and this code can you explain to me what this outStringConstant variable is and what it does",
"I wasn t up for rewriting the scanner part of the TouchJSON so instead I loop the data returned and replace the empty strings with @ and the empty numbers with 0 .",
"I understand what the error is saying but I have all the TouchJSON files in the project and I have a reference to NSDictionary JSONExtensions.h in the app Prefix.pch file .",
"Now my experience with XCode is roughly less than 10 hours is it correct to have the TouchJSON and ASIHttpRequest files in the Other Sources directory",
"I am trying to use TouchJSON and here is what I have done to test it : .. . .. . But it logs null instead of Matthieu what am I missing",
"Here s the code I ve got so far : .. . .. . I m using TouchJSON to parse the data .",
"Hi i m making app that take json from web page but its not converting the jsonData to Dict using touchJson Framework Library Class .. . .. . The Json .. . .. . TheCode .. . .. . The Consol",
"The complete project including the fat libary libTouchJSON.a and the script that was used to build the fat lady are present in the zip file available at http : www.filedropper.com touchjson .",
"If I drill down into the touchJSON code following the stack-trace as given to me by the LEAKS tool the leak apparently begins life at the line .. . .. . But since this is such a commonly used library I doubt it s the problem .",
"At it s heart JSON deals with objects your code to de-serialize should be as follows .. . .. . objects : id : 123456 name : touchjson id : 3456 name : bleh .. . .. . which does work with the latest checkout .",
"So TouchJSON recognizes that the description values is of type string but the original intention of the server was to communicate that this was an empty string like description @ .. . .. . If I later on try to set the value of description to a UILabels text property the app will crash .",
"Anyway I m trying to deserialize a JSON string I m sending from my server through TouchJSON but I m getting a compiler warning of NSDictionary may not respond to +dictionaryWithJSONString : error : .",
"The JSON object I get contains NSDictionary Objects within the object like this : .. . .. . If I want to change values in this dictionary I can t because the returned objects from TouchJSON are not mutable .",
"Now when you do that your second predicate actually works fine : .. . .. . because TouchJSON omits the key from the dictionary when you have nullObject set to nil or NULL .",
"I m guessing one of the objects that s coming from your database is NULL in the DB being correctly translated into a null in the JSON and being correctly translated into an NSNull in TouchJSON .",
"TouchJSON supports serializing the following types : .. . .. . NSNull .. . NSNumber .. . NSString .. . NSArray .. . NSDictionary .. . NSData .. . .. . If you d like to serialize another type you ll need to implement - NSData JSONDataRepresentation either on a subclass or category .",
"Otherwise take a look at SBJson https : github.com stig json-framework an alternative library for Objective-C JSON parsing .",
".. . .. . or is there a way to have Objective C make an NSDictionary and all its children mutable",
"to keep it Objective-C-ish NSString className NSStringFromClass yourObject class",
"I am using touchjson for parsing the json url which is -- .. . .. . https : dl.dropboxusercontent.com u 746330 facts.json .. . .. . For some reason i am getting the error when i use CJONDeserializer --- .. . .. . Error Domain CJSONDeserializerErrorDomain Code -104 Could not scan dictionary .",
"I m stupid and new to objective-c .",
"Generators A JSON generator produces JSON text .",
"Then you should incrementally parse the answer with every chunk of data you receive I ve built such a JSON parser .",
"SBJSON is a pretty decent and well known parser .",
"This is my first attempt at deserealizing json in objective-c . .. . .. . What am I missing doing wrong here",
"This isn t an answer but a pointer to a different framework : .. . .. . http : code.google.com p json-framework .. . .. . I ve been using it quite a bit lately serializing and de-serializing complex data-structures from third-party services such as Google Local and between my own Objective-C and Perl code with absolutely no problems .",
"There is no built-in mechanism to do this .. . and I have created a small utility that uses a KVC metaphor to map dictionary attributes to a domain object . . tedious and only 1 domain level deep .",
"Try Apple s JSON parser .",
"Itis merely a parser for converting data between JSON and NSDictionary formats .",
"Arrays are perfectly legal but maybe just not officially supported by your library .",
"I was using the SBJSON library and came up against the same problem .",
"http : stackoverflow.com questions 4271126 .. . .. . We have a Libs library which contains this libTouchJSON.a and the libAdMobNoThumb.a library supplied by AdMob .",
"developer.apple.com library ios documentation Cocoa Conceptual https : developer.apple.com library ios documentation Cocoa Conceptual KeyValueCoding Articles BasicPrinciples.html apple ref doc uid 20002170-178726",
"I can see the need for that category if your JSON library of choice does not offer the nullObject .",
"I have included the NSDictionary category header file and the implementation file of the extension is definitely in the compiled resources list of the static library .",
"I followed the read me for the library to the meter I think but every time I try to compile I get this error .",
"I built two nothumb release versions one for the simulator and one for the device .",
"This used to work with the pre-SDK 4.2 version of the admob library .",
"If you are calling out to a SOAP web service however it is not going to return JSON but rather XML that needs to be made into an object using a SOAP library .",
"The way I understand it the user of the class can pass a C-style null-pointer to the deserializer and when it encounters a NSNull it will insert the values NULL passed to it .",
"I don t know much about Xcode I ve only been learning Obj-C recently so I m clueless about this .",
"My solution would apply to your case too : I changed the library so that it handled missing values setting them to + NSNull null in the collection it returned .",
"Reading the prefix restrictions http : developer.apple.com library mac documentation DeveloperTools Conceptual XcodeBuildSystem 800-Reducing Build Times bs speed up build.html apple ref doc uid TP40002695-SW13 you may want to check this :",
"For another JSON library but with the same issues I ve created the following category on NSDictionary : .. . .. . Whenever I deal with JSON data from said library I retrieve values like this : .. . .. . This way the code in my projects become a lot cleaner and at the same time I don t have to think about dealing with NSNull null values and the like ."
]
}
|
{
"confidence": [
57.32109451293945,
55.812374114990234,
55.3834342956543,
52.799713134765625,
51.655513763427734,
49.16499328613281,
48.54697799682617,
48.370113372802734,
48.10457229614258,
46.976863861083984,
44.41167068481445,
44.391998291015625,
44.391998291015625,
44.29494094848633,
44.079017639160156,
43.28559112548828,
43.25649642944336,
43.159664154052734,
42.9920654296875,
42.903839111328125
],
"content": [
"Question : The admob sdk for iPhone uses a proprietary libAdMobNoThumb.a library and an Objective-C source based TouchJSON library . Does anybody know of a C binding for TouchJSON so that we can include it Or does anybody know how to build a library that can be included We created an iPhone Library project with Xcode and added the full TouchJSON source tree . We ve than linked the resulting libTouchJSON.a in a test iPhone app with following gcc flags : .. . .. . This produced following error output thanks to the -v -v -v : .. . .. . Any suggestions to get around this problem TIA Mollyke . .. . Answer : Eric .. . .. . Sorry for the delay but lately I have been very busy with pure xcode projects . Let me tell you how I created a TouchJSON library . I created a library-project with xcode and copied the TouchJSON sources that came with the latest admob library . I built two nothumb release versions one for the simulator and one for the device . That produces two libraries . To facilitate using these in MT projects I used the lipo tool to combine them into a fat library . Fat libraries are convenient as they can be used in simulator as well as device builds . The complete project including the fat libary libTouchJSON.a and the script that was used to build the fat lady are present in the zip file available at http : www.filedropper.com touchjson . Note : this is posted as an answer to my initial question as it was slightly too long to be accepted as a comment on the question by Eric S",
"Question : The admob sdk for iPhone uses a proprietary libAdMobNoThumb.a library and an Objective-C source based TouchJSON library . Does anybody know of a C binding for TouchJSON so that we can include it Or does anybody know how to build a library that can be included We created an iPhone Library project with Xcode and added the full TouchJSON source tree . We ve than linked the resulting libTouchJSON.a in a test iPhone app with following gcc flags : .. . .. . This produced following error output thanks to the -v -v -v : .. . .. . Any suggestions to get around this problem TIA Mollyke . .. . Answer : Since many people will find this question you can use the up to-date monotouch bindings for admob posted on github here https : github.com dalexsoto AlexTouch.GoogleAdMobAds .. . .. . Here is an example of how to use it and how to suscribe to its events",
"Question : I am receiving some json from a web service . I parse this using the TouchJSON library . I keep the data around for the user to change certain values and then I want to return it to the web service . The JSON object I get contains NSDictionary Objects within the object like this : .. . .. . If I want to change values in this dictionary I can t because the returned objects from TouchJSON are not mutable . Is there a way to have have TouchJSON return mutable objects .. . .. . or is there a way to have Objective C make an NSDictionary and all its children mutable .. . .. . or do I have to just go through every NSDictionary in NSDictionary and copy all data into a mutable copy and then reinsert everything Hope someone can help me out on this one : thanks in advance . Comment : Doesn t casting to NSMutableDictionary work for you Comment : @Peter Casting is a compile-time construct it will not change the actual type of an object . .. . Answer : TouchJson has an option to return mutable object rather than normal . I found it by looking at source code . Default is to return its copy not mutablecopy . Comment : Didn t work for me got an error for this line : jsondeserializer.scanner.options kJSONScannerOptions MutableContainers Comment : Minime thanks for you help I really should have looked at the source too .",
"Question : The admob sdk for iPhone uses a proprietary libAdMobNoThumb.a library and an Objective-C source based TouchJSON library . Does anybody know of a C binding for TouchJSON so that we can include it Or does anybody know how to build a library that can be included We created an iPhone Library project with Xcode and added the full TouchJSON source tree . We ve than linked the resulting libTouchJSON.a in a test iPhone app with following gcc flags : .. . .. . This produced following error output thanks to the -v -v -v : .. . .. . Any suggestions to get around this problem TIA Mollyke . .. . Answer : Your AdMob library cannot find the CJSONDeserializer or CJSONSerializer classes which I presume come from libTouchJSON.a . Generally this means that your libTouchJSON.a wasn t included in your project . You should double check all your extra arguments and ensure that your libTouchJSON is not thumb and includes all the architectures you re trying to link x86 for simulator armv6 for device Comment : Geoff You re the best We made a nothumb simulator build of libTouchJSON.a linked with it and bingo .",
"Question : I am using TouchJSON to parse a JSON data . In the results the strings in the array are all in U format . Yes they are meant to be other languages than English . Why TouchJSON can t just replace them with real string via UTF8 How should I deal with the results if I want to store them as NSStrings and use them in UILabel Thanks .. . Answer : The leading u should not be a part of the string but rather an identifier . If you load an NSString from parsed NSDictionary it should ve ignored the leading u . If it did not you can always use theString substringFromIndex : 2 to remove any leading identifiers . Otherwise take a look at SBJson https : github.com stig json-framework an alternative library for Objective-C JSON parsing .",
"Question : I was wondering if anyone has the TouchJSON framework working in conjunction with basic apache HTTP authentication . Essentially the directory of the RESTful webservice that I am calling is secured with basic http authentication . My calls are obviously all returning null now . Has anyone managed to get this working I could embed the username : password in the URL like https : username : [email protected] webservices ws.php but for obvious reasons that is not desired . Any help would be appreciated . Thanks Kurtis .. . Answer : TouchJSON does not handle any transfer of data via http https or any other protocol . Itis merely a parser for converting data between JSON and NSDictionary formats . So it doesn t really matter to TouchJSON how the data exchanged . Instead you will need to handle the authorization in your data-transfer code .",
"Question : I m using TouchJSON . Made a call to my Rails app to fetch all posts at localhost : 3000 posts.json . This returns a JSON array surrounded by square brackets . I m currently set up to convert the jsonString into an NSDictionary but that fails due to the square brackets . What s the best way to turn this result into an NSArray using the TouchJSON library .. . Answer : Why don t you just use the -deserialize : method and then figure out what kind of object you have after its done Or to answer your specific question use -deserializeAsArray : Comment : The -deserializeAsArray : function is deprecated I guess because it s not available anymore in the TouchJSON code . But as JeremyP already stated just use the -deserialize : function and it ll work .",
"Question : I m using TouchJSON . Made a call to my Rails app to fetch all posts at localhost : 3000 posts.json . This returns a JSON array surrounded by square brackets . I m currently set up to convert the jsonString into an NSDictionary but that fails due to the square brackets . What s the best way to turn this result into an NSArray using the TouchJSON library .. . Answer : I think most parsers frown with array data . You ll have to return a hash :",
"Question : I am receiving some json from a web service . I parse this using the TouchJSON library . I keep the data around for the user to change certain values and then I want to return it to the web service . The JSON object I get contains NSDictionary Objects within the object like this : .. . .. . If I want to change values in this dictionary I can t because the returned objects from TouchJSON are not mutable . Is there a way to have have TouchJSON return mutable objects .. . .. . or is there a way to have Objective C make an NSDictionary and all its children mutable .. . .. . or do I have to just go through every NSDictionary in NSDictionary and copy all data into a mutable copy and then reinsert everything Hope someone can help me out on this one : thanks in advance . Comment : Doesn t casting to NSMutableDictionary work for you Comment : @Peter Casting is a compile-time construct it will not change the actual type of an object . .. . Answer : You can create a mutable dictionary from a dictionary like this . assuming your json parsed dictionary was named jsonDictionary .. . .. . Hope that solves it for you . Comment : Hi Peter and NWCoder . My overall NSDictionary I cast to mutable when parsing is complete . The problem is then the user and object dictionaries inside the overall dictionary are still imutable : For now I go through each of my json dictionaries make the outer dict mutable pull out the inner dicts by key make a mutable copy of them delete the old dict and reinsert the new mutable one - terrible workflow especially when objects change server-side . The casting mutable copy or fast initializer only seem to work on the outer dictionary which is understandable I guess .",
"Question : How can i make a SOAP call using TouchJson it just work fine with REST call . .. . Answer : You re missing some fundamentals here . SOAP is XML based . JSON is an alternative markup to XML that s more compact . Making a REST call simply means you are requesting a resource . If the resource is returned in a JSON format it makes sense that it works for you using TouchJSON . If you are calling out to a SOAP web service however it is not going to return JSON but rather XML that needs to be made into an object using a SOAP library . Best regards .",
"Question : I receive json from a webservice into a NSMutableData . That gets converted into a NSDictionary using TouchJson . I then retrieve a string from a key from that dictionary . The string looks like below .. . .. . Essentially there can be n records against the car key . when I try to convert the above to NSData using .. . .. . and also .. . .. . but I get .. . .. . I have tried a few other encodings available and xcode still threw up . How can I figure out the encoding being used This is my first attempt at deserealizing json in objective-c . .. . .. . What am I missing doing wrong here Thanks .. . Answer : I think it s not a string at all... . .. . .. . change to this and test... . Comment : I will give that a try . I was later going to convert the NSData to another dictionary and pull out the value for the key car and then deserialize it using touchjson . Is this the wrong way to go about it Comment : Yeah the json deserializer works on the objects and the subobjects so they are already properly decoded . All objects and subobjects should be dictionaries arrays or key-value pairs . Comment : That worked . Thanks . Firstly I thought I would have to feed it specific pieces to deserialize . Secondly what tripped me is that the following worked : NSString strData dictionary objectForKey : @ cars NSLog @ cars : @ strData which gave me an impression that I receiving a string for that key .",
"Question : I fetch a JSON array from a web service with touchJSON . Which looks like this : .. . .. . I m not able to parse this into a NSDictionary because touchJSON doesn t support JSON arrays . How do I get my JSON array into a NSDicitionary Regards .. . Answer : Have you consider trying another framework This one http : code.google.com p json-framework seems to support JSON arrays . Comment : Thanks . json-framework FTW .",
"Question : I fetch a JSON array from a web service with touchJSON . Which looks like this : .. . .. . I m not able to parse this into a NSDictionary because touchJSON doesn t support JSON arrays . How do I get my JSON array into a NSDicitionary Regards .. . Answer : Maybe you could use another of the many JSON implementations listed on the JSON http : www.json.org homepage .",
"Question : I am using touchJson to deserialize my json from server . My json is like below : .. . .. . After deserializing I use below code to get the Json values : .. . .. . This is simple because the data is string but for user id what type should I use to decode is it correct : .. . .. . If not what s the right way to hold the integer json type .. . Answer : TouchJSON will decode a number to NSNumber not NSInteger Comment : what about bool Comment : @BinChen same actually still a NSNumber . To put the appropriate NSNumber into the dictionary you would do NSNumber n NSNumber numberWithBool : YES likewise when you deserialize and you have the corresponding NSNumber you would do n boolValue .",
"Question : I use TouchJSON to convert the following to an NSDictionary object .. . .. . Have I done anything wrong I d appreciate any help . .. . Answer : dic valueForKey : @ dataCount will be an NSNumber . You ll need to call -intValue on it to get an int .",
"Question : In my project I use TouchJSON to deserialize a JSON string . The result is a pretty NSDictionary . I would like to get the data in this dictionary into my domain objects data objects . Is there a good way to do this Some best practices Perhaps the best to keep the NSDictionary and skip the domain objects .. . Answer : There is no built-in mechanism to do this .. . and I have created a small utility that uses a KVC metaphor to map dictionary attributes to a domain object . . tedious and only 1 domain level deep . I have not tried this yet but Google Mantle looks like it might do the trick : .. . .. . Google Mantle https : github.com github-mantle .. . .. . It maps JSON to and from your domain-model .",
"Question : I am deserializing some JSON using the TouchJSON framework . The array of dictionaries that comes from the parsing is used to populate a UITableView . There is a chance that some of the values in the JSON I parse are empty . This results if I NSLog it to the console in the values looking like this : .. . .. . Here the description value was an empty string when retrieved from the server . So TouchJSON recognizes that the description values is of type string but the original intention of the server was to communicate that this was an empty string like description @ .. . .. . If I later on try to set the value of description to a UILabels text property the app will crash . So my questions are I have both NSNumbers and NSStrings in the JSON should I traverse the result from TouchJSON s deserialize method and test all values and how would I do so .. . .. . I can t simulated what would happen if an NSNumber value was empty how would I test for this Will the NSNumber value be nil in that case instead of null .. . Answer : I was using the SBJSON library and came up against the same problem . My solution would apply to your case too : I changed the library so that it handled missing values setting them to + NSNull null in the collection it returned . That makes your client code a little warty because you have to handle the cases where you might get an NSNull instead of an NSString . But this is just a more obvious version of the wart where you have to decide whether @ meant an empty string or an unset value . Comment : Hi Graham thanks for the suggestion . I wasn t up for rewriting the scanner part of the TouchJSON so instead I loop the data returned and replace the empty strings with @ and the empty numbers with 0 . I get to do this because I only deal with Strings and Numbers and my data goes directly into views that are fine with @ . Comment : Graham Which file did u change",
"Question : i m developing a small app for the ipad and i m trying to serialize a dictionary to NSData to save in the disk . I m using with framework TouchJson . And example of my example structure : .. . .. . .. . .. . The structure of my dictionary is : an dictionary with dictionaries inside . This dictionaries have a string ID and an NSMutableArray with an NSValue . The line of code is that i m using is : .. . .. . NSData jsonData CJSONSerializer serializer serializeObject : templates error : error .. . .. . The error that the variable error give me is : .. . .. . Thnx in advance .. . Answer : TouchJSON supports serializing the following types : .. . .. . NSNull .. . NSNumber .. . NSString .. . NSArray .. . NSDictionary .. . NSData .. . .. . If you d like to serialize another type you ll need to implement - NSData JSONDataRepresentation either on a subclass or category . Here s an example that I used for NSDate : .. . .. . .",
"Question : Hi i m making app that take json from web page but its not converting the jsonData to Dict using touchJson Framework Library Class .. . .. . The Json .. . .. . TheCode .. . .. . The Consol .. . Answer : JSON can be checked online with JSONLint http : jsonlint.com",
"Question : I did a few tests with TouchJSON last night and it worked pretty well in general for simple cases . I m using the following code to read some JSON content from a file and deserialize it : .. . .. . That works fine if I have a very simple JSON object in the file i.e . a dictionary : .. . .. . This way I was able to get access to the array of values as I wanted to get the item based on its index within the list : .. . .. . I understand that I could have fetched the name with the dictionary API .. . .. . Now I would like to deserialize a semi-complex JSON string which represents an array of dictionaries . An example of such a JSON string is below : .. . .. . When I try to run the same code above against this new content in the data.json file I don t get any results back . My NSLog call says total items : 0 and no error is coming back in the NSError object . Any clues on what is going on I m completely lost on what to do as there isn t much documentation available for TouchJSON and much less usage examples . .. . Answer : I m the author of TouchJSON . Your outermost object should be a dictionary and NOT an array . Anything other than a dictionary is not legal . If you have to have an array as the outermost object then use the method which is technically deprecated but isn t going any where soon .. . .. . See : http : www.json.com json-schema-proposal for more information abotu what is and is not legal JSON . Comment : I appreciate your response to my question first of all . I was surprised to hear that the outermost object cannot be an array as I have been doing this type of JSON result for a long time now and most times things work out just fine with other libraries . Continuing on a separate comment.. . Comment : According to the JSON RFC created by Douglas Crockford himself ietf.org rfc rfc4627.txt http : www.ietf.org rfc rfc4627.txt arrays as outermost objects are perfectly valid . See Page 7 8 for an actual example in there . Comment : See robubu.com p 24 http : robubu.com p 24 for more info . Top level arrays ought to be avoided . Regardless TouchJSON can process them - see the API i listed above . Comment : Well can we at least agree that it is perfectly legal to have arrays as the outermost object What that post is describing is a browser javascript interpreter vulnerability . Arrays are perfectly legal but maybe just not officially supported by your library . Comment : In most languages it is also perfectly legal to do something like ++i-- that does not mean it is good practice . Similarly it is not a good practice to deserialize a straight array that is not an object . Just because you can does not mean you should ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
json
|
UNK_RELATION
|
csla@frameworks@74
|
csla -- csla .net is one of the most widely used open-source development @placeholder for microsoft .net .
|
{
"confidence": [
46.65118408203125,
45.7369384765625,
45.7369384765625,
45.071876525878906,
45.010982513427734,
43.72113800048828,
43.46395492553711,
43.46395492553711,
43.41809844970703,
43.41809844970703,
43.41809844970703,
42.76494598388672,
42.36137390136719,
42.00647735595703,
42.00647735595703,
41.20467758178711,
41.17206573486328,
41.17206573486328,
41.17206573486328,
41.17206573486328,
40.08103561401367,
39.68323516845703,
39.60374069213867,
39.48981475830078,
39.48981475830078,
39.48981475830078,
39.48981475830078,
39.48981475830078,
39.48981475830078,
39.48981475830078,
39.28834533691406,
39.00822448730469,
39.00822448730469,
38.84882354736328,
38.84882354736328,
38.82341766357422,
38.82341766357422,
38.82341766357422,
38.793182373046875,
38.54701232910156,
38.48815155029297,
38.48815155029297,
38.48815155029297,
38.40019226074219,
38.14435958862305,
37.44297790527344,
37.431427001953125,
37.431427001953125,
37.36314010620117,
37.28049850463867,
37.23053741455078,
37.23053741455078,
37.23053741455078,
37.23053741455078,
37.23053741455078,
37.23053741455078,
37.23053741455078,
37.23053741455078,
37.23053741455078,
36.571327209472656,
36.49956512451172,
36.38585662841797,
36.17380905151367,
36.17380905151367,
36.16490936279297,
36.16490936279297,
35.85009765625,
35.80718231201172,
35.80718231201172,
35.78810119628906,
35.763099670410156,
35.763099670410156,
35.763099670410156,
35.763099670410156,
35.763099670410156,
35.09177780151367,
35.09177780151367,
34.90729522705078,
34.90729522705078,
34.90729522705078,
34.90729522705078,
34.27629089355469,
34.17021942138672,
34.17021942138672,
34.17021942138672,
34.17021942138672,
34.17021942138672,
34.17021942138672,
34.17021942138672,
34.17021942138672,
34.17021942138672,
34.17021942138672,
34.17021942138672,
34.17021942138672,
34.17021942138672,
34.17021942138672,
34.17021942138672,
34.17021942138672,
34.17021942138672
],
"content": [
"We used CSLA .",
"The field values are managed by CSLA .NET and so are called managed fields .",
"Reasons to use csla : .. . .. . the straight .net framework is too powerful for you .",
"CSLA insulates developers from the gotcha s of the .Net framework and the ever changing architectural topology at Microsoft .",
"CSLA is NOT an ORM",
"CSLA .NET can use a number of different .NET serializers BinaryFormatter NetDataContractSerializer MobileFormatter .",
"The CSLA collection is an in-memory domain object .",
"There are a lot of very experience CSLA users there .",
"CSLA is great .",
"CSLA supports this .",
"Use CSLA .",
"I know CSLA is not an ORM .",
"CSLA is not an ORM .",
"I Used Codesmith to generate CSLA Template .",
"CSLA is used in our company world-wide .",
"How do I do that through CSLA",
"Is REST similar to CSLA",
"Is CSLA right for your project",
"First CSLA is not an ORM .",
"We use CSLA extensively .",
"Thanks -Blake Niemyjski Author of the CodeSmith CSLA Templates http : www.codesmithtools.com generate-csla-code-with-templates.aspx",
"The CSLA objects basically used the Domain objects .",
"In the future some advanced features of CSLA .NET may be unavailable unless you use managed fields .",
"I m using the RegisterProperty from CSLA .",
"How may people are using CSLA",
"Does CSLA really not fit in with TDD",
"There are also many misconceptions in regards to CSLA .",
"How many people are using CSLA",
"CSLA objects are self-sustaining e.g .",
"CSLA is the best application framework that exists .",
"For most line-of-business apps it isn t really needed and CSLA is a better choice .",
"My thoughts are that if you want to use CSLA and MVC and DDD then you make a stand and chose one or another CSLA or DDD .",
"My thoughts are that if you want to use CSLA and MVC and DDD then you make a stand and chose one or another CSLA or DDD .",
"Where CSLA is a BusinessObject framework .",
"how it is related to CSLA",
"I m new to CSLA so here is my question .",
"I am looking for T4 Code Generator for CSLA .",
"csla has nothing to do with data access.. .",
"That is one of my biggest pet peeves with CSLA .",
"Also if we can retain existing CSLA 1.1 as it is what could be the possible impact in .NET 4.5.2",
"github.com MarimerLLC csla issues 344 https : github.com MarimerLLC csla issues 344",
".. . Based on the CSLA Forums http : forums.lhotka.net forums default.aspx I would say there are quite a number of CSLA based projects out there .",
"Our company practised CSLA in some of its projects and some of the legacy projects remain to be CSLA .",
"In fact with the latest version of CSLA Rocky provides a WCFDataPortal which I ve used .",
"I am new to CSLA and still trying to get my head round it .",
"CSLA .NET is all about creating business-objects - objects designed primarily around the responsibilities and behaviors defined by a business use-case .",
"That is because the documentation http : www.nudoq.org Packages CSLA-Core Csla WcfPortalClient M Fetch says that the Fetch method takes a CriteriaRequest .",
"I Need to Clear my CSLA ReadOnly List which is of course not possible because CSLA is protecting my ReadOnly Lst .",
"Is a WebAPI on the roadmap for CSLA",
"The project is coded in C and I m using Visual Studio 2013 Professional CSLA 3.8 and .NET 4.0 .",
"See https : github.com MarimerLLC csla issues 19",
"I am new to C csla and NHibernate .",
"The problem that is occurring is that CSLA believes that these handlers should be serializable .",
"After reading this does CSLA really not fit in with TDD",
"I would not use CSLA on a web project .",
"All of this comes from realizing that CSLA is not an ORM .",
"CSLA is designed to be at that layer just below the UI .",
"I joined a team where CSLA is mandatory .",
"A lot of people recommend using Code Generation with CSLA .",
"Is it an issue of .Net 4.0 trying to talk to CSLA 1.x or is it a web service issue as these objects never used web-services originally",
"We did migrated the entire application to .NET 4.5.2 now without any issues but just want to clarify confirm from you whether can we retain existing CSLA 1.1 as is or do we need to upgrade CSLA 1.1 to the latest version which supports .NET 4.5.2",
"I have used CSLA for one project and it worked great and make things much simpler and neater .",
"I have a WCF service Provided by csla .",
"Why do you have CSLA tagged here",
"I need coverage of my custom CSLA functions called after the internal CSLA reflection calls are made .",
"In the CSLA discussion forums there are folk who ve incorporated NHibernate with CSLA and in that case they also decided to do without the DataPortal model.. .",
"I see CSLA.dll 2.1.4 in the .NET Configuration 2.0 tool but I see CSLA.dll 4.0.1 in C : WINDOWS Microsoft.NET assembly GAC MSIL Csla .. . 2 .",
"I ve got business classes named Invoice and InvoiceItem derived from a subclass of CSLA BusinessBase and InvoiceItemList derived from a subclass of CSLA BusinessBindingListBase .",
".. . I didn t fully recommend CSLA for my last project because I believe the scope of the application is too large for the benefits CSLA provides .",
"I would suggest downloading the CSLA source code and the samples especially the ProjectTracker sample and take a look at the code .",
"I m trying to use the .UpdateSource of a textbox bound to a datasource in vb.net with csla framework .",
"I am new to csla Validation and got a problem to resolve on Validation rules .",
"The Class in which the notsupported exception comes is derived from csla BusinessBase .",
"https : github.com MarimerLLC csla tree master Support Snippets",
"CSLA is not about the data but the business its rules and its validations .",
"http : stackoverflow.com questions 15241 does-anyone-have-any-real-world-experience-of-csla .. . .. . Have you ever used CSLA and if so what are yout thoughts",
"And yes I used CodeSmith to generate the CSLA parts but I now believe in DRY code with single responsibility bits and the CSLA implementation now looks to me like yesterday s hero .",
"I wrote the CSLA templates and work for CodeSmith .",
"I have a project that is using CSLA 3.0.2 .",
"Should I suggest converting to CSLA 2.x",
"The first version of this system was based on ASP.NET MVC + CSLA .",
"The most efficient way for me was to design the UI and understand it s flows behaviour and validation rules before building the CSLA objects .",
"I have an application that follows the basic methodoligy in the CSLA framework .",
"I ve really wanted to move csla to use an xml file for entity generation .",
"I just found out that DataPortal.CreateAsync was part of CSLA Version 4.5 .",
"That BusinessPrincipal class would be in your code base not in CSLA itself .",
"I m attempting to use CSLA latest version along with ReactiveUI Reactive Extensions .",
"Possible Duplicate : .. . Does anyone have any real-world experience of CSLA",
"See Does anyone have any real-world experience of CSLA",
"CSLA doesn t stand on its own as an ORM it just provides the object framework .",
"Using CSLA will put you exactly where you need to be .",
"CSLA is great if you want to easily scale to an n-tier application .",
"The CSLA book and sample app are great resources to get up to speed .",
"When WCF was introduced it had minimal impact on CSLA code .",
".. . I haven t found an effective way to do TDD with CSLA .",
"In summary while CSLA is anything but a silver bullet it is appropriate for some scenarios .",
"Using a fat ORM like EF works well but is just overkill for CSLA .",
"Don t have your CSLA objects drive UI design .",
"IMHO lack of unit testability makes CSLA a non starter for critical systems ."
]
}
|
{
"confidence": [
60.44259262084961,
60.02683639526367,
56.84874725341797,
56.35380554199219,
56.015708923339844,
55.71583938598633,
55.362117767333984,
54.810028076171875,
53.45587921142578,
52.72962188720703,
51.04214096069336,
50.51358413696289,
50.49399185180664,
50.20568084716797,
50.10697937011719,
49.25955581665039,
48.93551254272461,
48.69993591308594,
48.452213287353516,
48.4210205078125
],
"content": [
"Question : I d like to learn CSLA.NET quickly . What advice do you have Comment : you could always contact Rocky and pay his very large consulting fees . .. . Answer : My best suggestion is don t . There are many data-access architectures that are more robust more maintainable better performing and more widely accepted in the industry . NHibernate Linq-to-Sql and Microsoft Entity Framework are three . Go with the industry . Don t be the lone ranger . Comment : A little dated but take a look at this : lhotka.net weblog ADONETEntityFrameworkLINQAndCSLANET.aspx http : www.lhotka.net weblog ADONETEntityFrameworkLINQAndCSLANET.aspx ADO.NET EF .. . works with entity objects - objects designed primarily as data containers . CSLA .NET is all about creating business-objects - objects designed primarily around the responsibilities and behaviors defined by a business use-case . It is all about making it easy to build use case-derived objects that have business logic validaiton rules and authorization rules . Comment : csla has nothing to do with data access.. . Comment : CSLA is NOT an ORM Comment : Duh . I know CSLA is not an ORM . However many people use bloated unmanageable frameworks like CSLA because they are trying to reduce the amount of coding and maintenance they actually have to do . It s a fools errand . My point was simply that if a person s objective is to use a framework that will allow quick implementation of an application entity-framework now that linq-to-sql is dead or nhibernate would be better solutions . I ve worked with CSLA and while it can be implemented rather quickly it is a freaking maintenance nightmare . Comment : I know this was a long time ago but I would also like to add that this answer is very misleading . CSLA is not about the data but the business its rules and its validations . I have worked with CSLA and would say that initially I found it a bit bloated however when I got to know its depths I found it to be an extremely good framework that provided structure for developers and strength to applications built with it . IMO apps that are a maintenance nightmare are usually so because of bad design planning or the pressures of time placed on developers by management .",
"Question : Possible Duplicate : .. . Does anyone have any real-world experience of CSLA http : stackoverflow.com questions 15241 does-anyone-have-any-real-world-experience-of-csla .. . .. . Have you ever used CSLA and if so what are yout thoughts I am starting a new contract for a company that uses CSLA and NHibernate and wanted some opinions or insights into the framework . Comment : See Does anyone have any real-world experience of CSLA http : stackoverflow.com questions 15241 does-anyone-have-any-real-world-experience-of-csla .. . Answer : CSLA is used in our company world-wide . I personally have used it to develop web sites web-services rich client apps etc . In one particular application using CSLA we ve deployed to Asia Europe Sites in the U.S . and sites at sea on ships . CSLA insulates developers from the gotcha s of the .Net framework and the ever changing architectural topology at Microsoft . Its powerful and flexible enough to solve nearly every requirement you have yet easy enough to maintain and develop with that your code will always be maintainable and supportable by even some of your most junior developers . Our corporation spans the globe and I wouldn t think of developing our applications without it.. . given the proper parameters meaning I won t be developing a missile guidance system with it . As with all things be smart . Using CSLA will put you exactly where you need to be . Comment : Nothing wrong with straight up VBA for missile guidance systems",
"Question : The main web application of my company is crying out for a nifty set of libraries to make it in some way maintainable and scalable and one of my colleagues has suggested CSLA . So I ve bought the book but as : .. . .. . programmers don t read books anymore .. . .. . I wanted to gauge the SOFlow community s opinion of it . So here are my questions : .. . .. . 1 . How may people are using CSLA 2 . What are the pros and cons 3 . Does CSLA really not fit in with TDD 4 . What are my alternatives 5 . If you have stopped using it or decided against why .. . Answer : I joined a team where CSLA is mandatory . We don t use the remote data portal which is the only reason I could agree for usage of this framework . I never bought into the idea of CSLA so maybe that s why I have nothing but issues with it sorry . A couple of the issues : .. . .. . I don t need a road block between my code and the .NET framework which is what this framework felt like to me . I had a limited option of list objects while I just had to ignore the rich list objects in the .NET framework . Ii is totally ridiculous that we had these read-only lists and then non read-only lists . So if I had to add an item to the list I had to recreate the entire list...are you serious Then csla wants to manage my object state which is fine but nothing is really exposed . Sometimes I want to change an object state manually instead of fetching it again which seems like what csla wants me to do . I basically end up creating many properties to expose options csla didn t think I should have direct access to . Why can t I just instantiate an object We end up creating static-methods which instantiates an object and passes it back...are you kidding me Check the framework source code and it looks to heavy on the reflection code to me . Reasons to use csla : .. . .. . the straight .net framework is too powerful for you . your developers are not seasoned and can t grasp the concept of patterns then csla will pretty much have everyone on the same page . 1 . I don t need a road block between my code and the .NET framework...I am stuck with these list objects .",
"Question : The main web application of my company is crying out for a nifty set of libraries to make it in some way maintainable and scalable and one of my colleagues has suggested CSLA . So I ve bought the book but as : .. . .. . programmers don t read books anymore .. . .. . I wanted to gauge the SOFlow community s opinion of it . So here are my questions : .. . .. . 1 . How may people are using CSLA 2 . What are the pros and cons 3 . Does CSLA really not fit in with TDD 4 . What are my alternatives 5 . If you have stopped using it or decided against why .. . Answer : After reading all the answers I ve noticed that quite a few people have some misconceptions about CSLA . First CSLA is not an ORM . How can I say that so definitely Because Rockford Lhotka has stated it himself many times in interviews on the .NET Rocks and Hanselminutes podcasts . Look for any episode where Rocky was interviewed and he ll state it in no uncertain terms . I think this is the most critical fact for people to understand because almost all the misconceptions about CSLA flow from believing that it is an ORM or attempting to use it as one . As Brad Leach alluded in his answer CSLA objects model behavior although it may be more accurate to say that they model the behavior of data since data is integral to them . CSLA is not an ORM because it s completely agnostic about how you talk to your data store . You should use some kind of data-access-layer with CSLA perhaps even an ORM . I do . I now use Entity Framework which works beautifully . Now on to unit-testing . I ve never had any difficulty unit-testing my CSLA objects because I don t put my data-access code directly into my business-objects . Instead I use some variation of the repository pattern . The repository is consumed by CSLA not the other way around . By swapping in a fake repository for my unit tests and using the local data portal BOOM it s simple . Once Entity Framework allows the use of POCOs this will be even cleaner . All of this comes from realizing that CSLA is not an ORM . It might consume an ORM but it itself is not one . Cheers . UPDATE .. . .. . I thought I d make a few more comments . Some people have said that CSLA is verbose compared to things like LINQ to SQL and so on . But here we re comparing apples to oranges . LINQ to SQL is an ORM . It offers some things that CSLA does not and CSLA offers some things L2S does not like integrated validation and n -tier persistence through the various remote data portals . In fact I d say that last thing n -tier persistence trumps them all for me . If I want to use Entity Framework or LINQ to SQL over the net I have to put something like WCF in between and that multiplies the work and complexity enormously to the point where I think it is much more verbose than CSLA . Now I m a fan of WCF REST and SOA but use it where you really need it such as when you want to expose a service to third parties . For most line-of-business apps it isn t really needed and CSLA is a better choice . In fact with the latest version of CSLA Rocky provides a WCFDataPortal which I ve used . It works great . I m a fan of SOLID http : butunclebob.com ArticleS.UncleBob.PrinciplesOfOod TDD and other modern software development principles and use them wherever practical . But I think the benefits of CSLA outweigh some of the objections of those orthodoxies and in any case I ve managed to make CSLA work quite well and easily with TDD so that s not an issue . Comment : You have hit many misconceptions right on the head Well put Comment : Heh it is no coincidence that you also hit an ORM question I had right on the head . stackoverflow.com questions 2625098 http : stackoverflow.com questions 2625098 are-orms-counterproductive-to-oo-design Comment : I ve moved from the MS world to the Mac Unix world but before I left I discovered the joy of using CSLA with Dapper as the ORM . Using a fat ORM like EF works well but is just overkill for CSLA .",
"Question : Possible Duplicate : .. . Does anyone have any real-world experience of CSLA http : stackoverflow.com questions 15241 does-anyone-have-any-real-world-experience-of-csla .. . .. . Have you ever used CSLA and if so what are yout thoughts I am starting a new contract for a company that uses CSLA and NHibernate and wanted some opinions or insights into the framework . Comment : See Does anyone have any real-world experience of CSLA http : stackoverflow.com questions 15241 does-anyone-have-any-real-world-experience-of-csla .. . Answer : My opinion : .. . .. . The book is excellent . It taught me a lot about .NET and design in general .. . I don t agree with the design of CSLA thus I would never use it : .. . .. . Take the ideas and use what is valuable to you . CSLA doesn t stand on its own as an ORM it just provides the object framework . It s fully acceptable to write your own if you even need one .",
"Question : Nice day I am writing this to you in the context where we migrate existing ASP.NET 1.1 to .NET 4.5.2 inline to that we identified CSLA 1.1 is being used for Business objects in ASP.NET 1.1 application . We did migrated the entire application to .NET 4.5.2 now without any issues but just want to clarify confirm from you whether can we retain existing CSLA 1.1 as is or do we need to upgrade CSLA 1.1 to the latest version which supports .NET 4.5.2 Also if we can retain existing CSLA 1.1 as it is what could be the possible impact in .NET 4.5.2 It would be great if you could shed some lights on this please . Thanks in Advance .. . Answer : First think of the reason why you upgraded the .net framework to a new version . I geuss for support and maybe to use soms new features . For clsa the same reasons apply . 1.1 . Is like the stone age and you have no support . Upgrading without using redesign should not so be hard . However I would recommend making yourself familiar with the new features and see if they can be usefull for you . On how much effort it is no one can tell you without seeing you code .",
"Question : I am new to C csla and NHibernate . This might be a novice question but I didn t see a clear explanation elsewhere . Can someone please help me in understanding what is the difference between .. . .. . and .. . Answer : CSLA implements a powerful new way of implementing properties where you don t need to declare a field to store the property s value . The field values are managed by CSLA .NET and so are called managed fields . In the future some advanced features of CSLA .NET may be unavailable unless you use managed fields . Syntax : .. . .. . CSLA also supports a different syntax where you use private fields to store the values . This technique is faster than using managed fields but requires that you declare and maintain your own fields . Hope this gives a clear idea about the GetProperty and SetProperty",
"Question : The main web application of my company is crying out for a nifty set of libraries to make it in some way maintainable and scalable and one of my colleagues has suggested CSLA . So I ve bought the book but as : .. . .. . programmers don t read books anymore .. . .. . I wanted to gauge the SOFlow community s opinion of it . So here are my questions : .. . .. . 1 . How may people are using CSLA 2 . What are the pros and cons 3 . Does CSLA really not fit in with TDD 4 . What are my alternatives 5 . If you have stopped using it or decided against why .. . Answer : We use CSLA extensively . There are several benefits first I believe that every line of business developer should read Rocky Lhotka s book on Business Objects programming . I ve personally found it to be in my top 3 best programming books ever . CSLA is a framework based on this book and using it gives your project access to very high level functionality like n-level undo validation rules and scalability architecture while providing the details for you . Notice I said providing and not hiding . I ve found that the best part of CSLA is that is makes you understand how all of these things are implemented down to the source code without making you reproduce them yourself . You can choose to use as many or few features as you need but I ve found that by staying true to the design-patterns of the framework it really keeps you out of trouble . --Byron Comment : Ditto on the benefits of reading the book . Last I read the new .NET 3.x version of the book was not to include the same ground-up tour through the source code that the .NET 2.x version had . That s a shame - I learned a hell of a lot about OOP from that book . Moreso than any other book I ve read .",
"Question : Possible Duplicate : .. . Does anyone have any real-world experience of CSLA http : stackoverflow.com questions 15241 does-anyone-have-any-real-world-experience-of-csla .. . .. . Have you ever used CSLA and if so what are yout thoughts I am starting a new contract for a company that uses CSLA and NHibernate and wanted some opinions or insights into the framework . Comment : See Does anyone have any real-world experience of CSLA http : stackoverflow.com questions 15241 does-anyone-have-any-real-world-experience-of-csla .. . Answer : CSLA is great . I ve been using it for several years . However now that WCF and REST are out there they have removed a large part of the reason that one would want to use CSLA . Unless you really need strong clean dirty databinding support for your UI and or n-level undo for changes to your objects I would seriously look at WCF and REST as that is a more open standard for data-access-layer abstraction . That being said we re up to the version 3.6 of CSLA and it still provides great value for us for our line of business apps . Comment : Is REST similar to CSLA I can t find anything on it when I google it . Comment : No its not . I think the poster is saying the stateless nature of the web lessens the value of Csla but I d disagree .",
"Question : The main web application of my company is crying out for a nifty set of libraries to make it in some way maintainable and scalable and one of my colleagues has suggested CSLA . So I ve bought the book but as : .. . .. . programmers don t read books anymore .. . .. . I wanted to gauge the SOFlow community s opinion of it . So here are my questions : .. . .. . 1 . How may people are using CSLA 2 . What are the pros and cons 3 . Does CSLA really not fit in with TDD 4 . What are my alternatives 5 . If you have stopped using it or decided against why .. . Answer : I ve been using CSLA since vb5 when it was more of a collection of patterns than it was a framework . With the introduction of.NET CSLA turned into a full-blown framework that came with a hefty learning curve . However the CSLA addresses many things that all business developers tend to write themselves at some point depending on project scope : validation logic authentication logic undo functionality dirty logic etc . All of these things you get for free out of the box in one nice framework . As others have stated being a framework it forces developers to write business logic in a similar fashion . It also forces you to provide a level of abstraction for your business logic so that not using a UI framework such as MVC MVP MVVM becomes not so important . In fact I would argue that the reason why so many of these UI patterns are so hyped up today in the Microsoft world is that people have been doing stuff incredibly wrong for so long ie . using DataGrids in your UI sprinkling your business logic everywhere . tisk tisk . Design your middle-tier business logic correctly from the start you can reuse your middle-tier in ANY UI . Win Form ASP.NET MVC WCF Service WPF Silverlight Windows Service ... . But aside from these the huge payoff for me has been it s built-in ability to scale . The CSLA uses a proxy-pattern that is configurable via your config file . This allows your business-objects to make remote calls from server to server without having to write one lick of code . Adding more users to your system No problem deploy your CSLA business-objects to a new application server make a config file entry change and BAM Instant scalability needs met . Compare this to using DTO s storing your business logic on the client whatever client that may be and having to write each of your own CRUD methods as service methods . YIKES Not saying this is a bad approach but I wouldn t want to do it . Not when there s a framework out there to essentially do it for me . I m going to reiterate what other folks have said in that CSLA is NOT an ORM . CSLA forces you to supply your business-objects with data . They do not care where you get your data . You can use an ORM to supply your business-objects with data . You can also use raw ADO.NET other services RESTFUl SOAP excel spreadsheets I can keep going here . As for your support for TDD I have never tried using that approach with CSLA either . I have taken the approach where I model my middle-tier ala business-objects using class and sequence diagrams most often allowing use-case screen and or process design to dictate . Perhaps a bit old school but UML has always served me very well in my design and development efforts . I ve successfully designed and developed very large and scalable applications still being used today . And until WCF RIA matures I ll be continuing to use CSLA. . .. . .. . with some work arounds",
"Question : I d like to learn CSLA.NET quickly . What advice do you have Comment : you could always contact Rocky and pay his very large consulting fees . .. . Answer : I would highly recommend checking out our CSLA 3.8 templates http : code.google.com p codesmith downloads list . They come in both a VB.NET and a C flavor . We are currently working on a major release that adds SQL Stored Procedure Object Factory and Many-to-Many support . It is a great starting point because we have real world examples like the Microsoft PetShop Sample application that is completely generated both the business layers and data-access layers with unit tests to show you exactly how CSLA works . If you have any questions or run into issues we are here to help you understand and grow as a CSLA developer . Another great compliment to learning CSLA is purchasing the following book : Expert C 2008 Business Objects http : rads.stackoverflow.com amzn click 1430210192 . Thanks -Blake Niemyjski Author of the CodeSmith CSLA Templates http : www.codesmithtools.com generate-csla-code-with-templates.aspx",
"Question : I am new with CSLA.net Architecture . . so any one can guid me how to start with it . i want to create simple insert update delete fetch program using CSLA.net . so that i can better understand architecture . .. . Answer : Andy is quite right that the eBooks and Expert Busines Object books are a vital starting point . Additionally there is a worked example called ProjectTracker which is discussed in the books which gives examples of the various ways of doing things in CSLA such as the options for implementing connecting to the data-access-layer . The easiest way to install ProjectTracker is to download the full CSLA installer from here : http : www.cslanet.com Download.html .. . .. . The last time I installed that file version 4.5.30 the ProjectTracker project wasn t set up to run with Visual Studio 2013 so if you are new to CSLA and also running VS2013 this post I wrote on the CSLA forum may help you it describes how to get Project Tracker working in VS2013 : http : forums.lhotka.net forums t 12200.aspx .. . .. . The other really helpful resource is the CSLA forum : http : forums.lhotka.net forums . There are a lot of very experience CSLA users there .",
"Question : The main web application of my company is crying out for a nifty set of libraries to make it in some way maintainable and scalable and one of my colleagues has suggested CSLA . So I ve bought the book but as : .. . .. . programmers don t read books anymore .. . .. . I wanted to gauge the SOFlow community s opinion of it . So here are my questions : .. . .. . 1 . How may people are using CSLA 2 . What are the pros and cons 3 . Does CSLA really not fit in with TDD 4 . What are my alternatives 5 . If you have stopped using it or decided against why .. . Answer : I m a PHP guy . When we started building comparatively large scale applications with PHP I started researching on lots of application frameworks and ORMs essentially in PHP world then in Java and .NET . The reason I also looked at Java and .NET frameworks was not to blindly use any PHP framework but first try to understand what is really going on and what kind of enterprise level architectures are there . Because I haven t used CSLA in a real world application I can t comment on its pros and cons but what i can say is Lhotka is one the rare thinkers -I m not saying just expert- in Software Architecture field . Although the name Domain Driven Design is coined by Eric Evans -by the way his book is also great and i humbly advise to read it- Lhotka was applying domain-driven-design for years . Having said that whatever you think about his framework benefit from his profound ideas in the field . You can find his talks on dotnetrocks.com archives.aspx and videos from dnrtv.com archives.aspx search for Lhotka . @Byron What are the other two books you liked",
"Question : The main web application of my company is crying out for a nifty set of libraries to make it in some way maintainable and scalable and one of my colleagues has suggested CSLA . So I ve bought the book but as : .. . .. . programmers don t read books anymore .. . .. . I wanted to gauge the SOFlow community s opinion of it . So here are my questions : .. . .. . 1 . How may people are using CSLA 2 . What are the pros and cons 3 . Does CSLA really not fit in with TDD 4 . What are my alternatives 5 . If you have stopped using it or decided against why .. . Answer : I m new to CSLA but I understand the concepts and I already understand that it s not an ORM tool so quit beating that damn drum folks . There are features of CSLA I like but using them feels a bit like there is a magician behind the curtain . I guess if you don t mind not knowing about how it works then you can use the objects and they work fine . There is a large learning curve for beginners and I think it would benefit greatly by having 5-15 min . videos like Microsoft has for learning the fundamentals . Or how about releasing a companion book with the code instead of getting the code released and taking months to get the book out Just sayin Mr Lohtka.. . We started building our stuff before the book and I struggled the whole time . But like I said I m new to it . We used CSLA . We made our objects fit their mold then used 10 of what the framework offered . Object level undo Didn t use it . NTier flexibility Didn t use it . We ended up writing enough business rule code that I thought the only thing we were getting out of CSLA was complexity . Some long in the tooth developers that know the framework used it as their hammer because they had a nail that needed hitting . CSLA was in their belt and my guess is a lot of proponents of the framework see things from that perspective too . I guess our seasoned developers are happy because it all makes sense to them . I guess if your organization doesn t have newbie programmers and you guys get bored by writing efficient and simple POCO objects with well formed patterns then go for it . Use CSLA .",
"Question : My one ASP.NET web site uses two different business object class libraries . There is a common framework DLL CSLA.dll between these two libraries . The problem is that one library wants to upgrade to CSLA v.4.0.1 and the other wants to remain at v.2.1.4 . How do I solve this conflict at the web site I think I need to install both versions of the CSLA into the GAC but I don t know how to do two things .. . .. . 1 . Add different versions of the same DLL to the GAC I have used gacutil -i on both CSLA.dlls . I see CSLA.dll 2.1.4 in the .NET Configuration 2.0 tool but I see CSLA.dll 4.0.1 in C : WINDOWS Microsoft.NET assembly GAC MSIL Csla .. . 2 . Make the web site reference the two different versions .. . .. . Thanks in advance for your help Comment : Ok i just learned that .NET GAC is different with .NET 4.0 . I would probably have to note an assumption -- my web site and business-objects are all targeting .NET 4.0 .. . Answer : In response to : .. . .. . Make the web site reference the two different versions .. . .. . You can force your application to use a specific version of an assembly by using Assembly Binding Redirection : .. . .. . Assembly Binding Redirection http : msdn.microsoft.com en-us library 2fc472t2 28v VS.100 29.aspx .. . Configuring Assembly Binding Redirection http : msdn.microsoft.com en-us library 433ysdt1.aspx .. . The assemblyBinding config element . http : msdn.microsoft.com en-us library twy1dw1e.aspx .. . .. . In your case the configuration should go in your web.config since the redirection is application-specific and doesn t apply to an entire version of the framework .",
"Question : The main web application of my company is crying out for a nifty set of libraries to make it in some way maintainable and scalable and one of my colleagues has suggested CSLA . So I ve bought the book but as : .. . .. . programmers don t read books anymore .. . .. . I wanted to gauge the SOFlow community s opinion of it . So here are my questions : .. . .. . 1 . How may people are using CSLA 2 . What are the pros and cons 3 . Does CSLA really not fit in with TDD 4 . What are my alternatives 5 . If you have stopped using it or decided against why .. . Answer : Yes I um we used it extensively to model our business-process logic that was primarily databound forms in a windows forms application . The application was a trading system . CSLA is designed to be at that layer just below the UI . If you think about your standard complex line-of-business application you may have a form with many fields many rules for those fields including cross-field validation rules you may invoke a modal-dialog to edit some child object you may want to be able to be able to cancel such dialogs and revert back to a previous state . CSLA supports this . It s cons are that it has a bit of a learning curve . The key thing to remember is to use CSLA to model how a user interacts with forms on some application . The most efficient way for me was to design the UI and understand it s flows behaviour and validation rules before building the CSLA objects . Don t have your CSLA objects drive UI design . We also found it very useful to be able to use CSLA business-objects server-side to validate objects sent from clients . We also had built-in mechanisms to perform validation asynchronously against web service i.e . checking the credit limit range of a counterparty against a master . CSLA enforces a strong seperation between your UI BusinessLogic and Persistance and we wrote a load of unit tests against them . It may not be strictly TDD because you are driving it from UI design that doesn t mean it isn t testable . The only real alternative is creating your own model business-objects but pretty soon you end up implementing features that CSLA offers out of the box INotifyPropertyChanged IDataErrorInfo PushState PopState etc .",
"Question : I m currently researching and deciding on a code-coverage tool for my company and have so far tried NCover Bolt and Desktop DotCover and NCrunch . All tools I ve tried so far work well for measuring highlighting code-coverage in code called directly by unit tests but any code called through CSLA DataPortal Fetch for example is never detected as being covered . As much of our code base resides in these functions I m finding the tools to be next to useless for much of what I need tested and measured . My question then is how can I get code-coverage results for CSLA code Does anyone know of a tool that would work with these kinds of calls or certain options extensions I can use to get coverage results with the tools I m using The project is coded in C and I m using Visual Studio 2013 Professional CSLA 3.8 and .NET 4.0 . I have the latest versions of NCover Bolt and DotCover both on trial as well as the newest OpenCover that I could find . Thanks in advance Comment : I don t think you are going to find much due to CSLA being heavy on reflection which is your problem with the Fetch . That is one of my biggest pet peeves with CSLA . Comment : You want coverage on functions invoked by CSLA through reflection and can t get it Comment : I need coverage of my custom CSLA functions called after the internal CSLA reflection calls are made . That is when I call DataPortal.Fetch blah internal calls are made then my DataPortal Fetch blah function that I have in my business class no separate DAL is called . This second function isn t getting caught by code-coverage by any tool I ve tried thus far . Comment : I ve written unit tests for Csla objects and dotCover seems to figure out that the DataPortal Fetch is called . I am sure because it highlights the code . I ll point out that the unit tests always use the local dataportal . I m also running with R 8 but nCover on our build-server worked fine too . Did you change any of the default coverage options Comment : Is the CSLA code being executed in the same process as the rest of the code If you have a sample then I may be able to investigate further with OpenCover instrumentation no guarantees . .. . Answer : Unlike TyCobb s entirely outdated opinion current versions of CSLA don t invoke methods via reflection except on iOS and haven t since around 2007 . But the data portal does use dynamic invocation via expression-trees and that s probably the issue causing you trouble . One option in current versions of CSLA is that the data portal is now described by an interface so you can mock the data portal potentially creating a mock that does nothing but invoke your DP XYZ methods directly . Even that s tricky though unless you make them public and allow other code in your app to easily break encapsulation yuck . The problem is that you won t be able to call the methods without using reflection or rewriting the dynamic expression tree invocation code used inside CSLA.. . Though perhaps the code-coverage tools would see the code executing if it were run via reflection instead of via a runtime compiled expression Comment : Sadly I m using CSLA 3.8 so the interface might not be an option for me .",
"Question : I have CSLA 1.x framework objects from an existing project that I m trying to use in a new .Net 4.0 project . The objects are being used in production and I really can t convert them to 2.x or EF without having 2 sets of objects . In my c webservice when I try to run it I am getting the following error : .. . .. . .. . To be XML serializable types which inherit from ICollection must .. . have an implementation of Add objectname.object at all levels .. . of their inheritance hierarchy . objectname.objectList does not .. . implement Add objectname.object . .. . .. . Like I said these objects are CSLA objects written in vb.net . I don t know where to look on this one . Is it an issue of .Net 4.0 trying to talk to CSLA 1.x or is it a web service issue as these objects never used web-services originally Does anyone have an idea about where I should look to figure out this issue Should I suggest converting to CSLA 2.x Any suggestions are appreciated .. . Answer : This is an XmlSerializer limitation if something looks like a list of data it will want to Add items to it via the Add method . If you have access to those objects consider adding such a method . I can t recall whether it wants Add object vs Add SomeType so try both . If you don t have control over those objects.. . it will be hard . It would be quicker to write a new DTO layer for the objects than to try to patch it somehow . Comment : Thank you for your answer.. . What does DTO stand for I do have control over those objects however they are also being used in another project which would mean I would have to include more people in this type of change . So your DTO option is intriguing.. . Comment : @Jeff - Data Transfer Object - i.e . a set of classes specifically for the purposes of serialization Comment : @Jeff - but in this case it sounds like you should be able to just add the missing Add",
"Question : Possible Duplicate : .. . Does anyone have any real-world experience of CSLA http : stackoverflow.com questions 15241 does-anyone-have-any-real-world-experience-of-csla .. . .. . Have you ever used CSLA and if so what are yout thoughts I am starting a new contract for a company that uses CSLA and NHibernate and wanted some opinions or insights into the framework . Comment : See Does anyone have any real-world experience of CSLA http : stackoverflow.com questions 15241 does-anyone-have-any-real-world-experience-of-csla .. . Answer : We used it in a web-based scenario and a desktop scenario . I left for other reasons before the projects were deployed but I ve heard the web-based project was a success . I think CSLA helped to give some overall consistency to the project in terms of the domain objects but as others have said in the other thread a lot of the features are not as useful in a disconnected application like a web app .",
"Question : I am new to CSLA and still trying to get my head round it . I need to know how do we delete a child object through its parent e.g If I have a Project class parent which has some ProjectResources child and I need to delete a project . How do I do that through CSLA e.g .. . .. . Remove doesnt remove them from the database . Obviously I cant delete the parent object because SQL server will complaint about referential-integrity . I don t want any stored proc to handle the cascade delete . Any suggestions will be highly appreciated . Thanks . .. . Answer : The CSLA collection is an in-memory domain object . When you Remove an item from the collection the item is removed from the active collection and is added to a DeletedList protected inside the collection . When you ask the data portal to Update your object graph your data-access code needs to remove items in the DeletedList and insert update items in the active collection . Versions of CSLA since around 2007 do this automatically by invoking the appropriate Child Insert Child Update and Child Delete methods in the child objects contained by your collection . In any case you can find detailed information about the data portal operations in the Using CSLA 4 book ."
]
}
|
[
"yes-answer-long"
] |
frameworks
|
UNK_RELATION
|
dandelion@caching@270
|
dandelion -- dandelion is a free and open-source java framework aimed at making web development simpler in jvm-based environments.it helps to manipulate the web assets js css in many ways : good organization and classical optimizations like minification compression or @placeholder .
|
{
"confidence": [
48.51211166381836,
47.631141662597656,
47.351287841796875,
46.10218048095703,
44.917179107666016,
44.68681335449219,
43.76606750488281,
43.41011428833008,
43.080963134765625,
42.38643264770508,
42.38643264770508,
42.38643264770508,
42.35006332397461,
41.92985534667969,
41.87015151977539,
40.61491012573242,
40.61491012573242,
39.927024841308594,
39.61930465698242,
39.45688247680664,
39.45688247680664,
39.45688247680664,
38.84086990356445,
38.54738998413086,
38.084163665771484,
38.084163665771484,
38.084163665771484,
38.084163665771484,
38.084163665771484,
37.27450180053711,
37.27450180053711,
37.27450180053711,
37.27450180053711,
37.27450180053711,
37.27450180053711,
36.530540466308594,
36.530540466308594,
36.080204010009766,
35.905235290527344,
34.74375534057617,
34.74375534057617,
34.74375534057617,
34.74375534057617,
34.74375534057617,
34.74375534057617,
34.74375534057617,
34.74375534057617,
34.74375534057617,
34.74375534057617,
34.57915115356445,
34.5101432800293,
34.5101432800293,
33.1253776550293,
32.976802825927734,
32.976802825927734,
32.9727783203125,
32.77499008178711,
32.77499008178711,
32.77499008178711,
32.77499008178711,
32.47885513305664,
31.81430435180664,
31.62388038635254,
31.62388038635254,
31.62388038635254,
31.62388038635254,
31.62388038635254,
31.62388038635254,
31.272912979125977,
30.244243621826172,
30.244243621826172,
30.244243621826172,
30.244243621826172,
30.244243621826172,
30.244243621826172,
30.244243621826172,
30.244243621826172,
30.244243621826172,
30.244243621826172,
30.244243621826172,
30.244243621826172,
30.244243621826172,
30.244243621826172,
30.244243621826172,
30.021194458007812,
30.021194458007812,
30.021194458007812,
30.021194458007812,
28.824413299560547,
28.824413299560547,
28.824413299560547,
28.742168426513672,
28.62586784362793,
28.07004165649414,
27.490447998046875
],
"content": [
"I am using version 1.0.1 .. . .. . Can you help me to troubleshoot the following errors : .. . .. . http : localhost : 8080 website dandelion datatables css jquery.dataTables.css .. . .. . http : localhost : 8080 website dandelion jquery js jquery.js .. . .. . http : localhost : 8080 website dandelion datatables js jquery.dataTables.js .. . .. . http : localhost : 8080 website dandelion datatables features filtering jquery.dataTables.yadcf.js .. . .. . dandelion-datatables-91438756c71be2df6b2ee155197c3192.js : 34 .. . .. . http : localhost : 8080 website dandelion datatables features filtering jquery.dataTables.yadcf.css .. . .. . http : localhost : 8080 website dandelion datatables css jquery.dataTables.css .. . .. . http : localhost : 8080 enepath dandelion datatables css jquery.dataTables.css",
"http : localhost : 8080 dtproject dandelion datatables css jquery.dataTables.css http : localhost : 8080 dtproject dandelion jquery js jquery.js http : localhost : 8080 dtproject dandelion datatables js jquery.dataTables.js .. . .. . Can anyone help",
"I just followed this sample here https : github.com dandelion dandelion-datatables-samples blob master datatables-jsp-ajax src main java com github dandelion datatables web ajax AjaxController.java",
": - Please post the contents of superbschools dandelion-assets 80d77bd9b757b0427342f9e5a32d4c1e85d2c35c da nd elion-datatables-0.10.0.js",
"Dandelion version : 0.10.0",
"This author is not a contributor to Dandelion Datatables https : github.com dandelion dandelion-datatables graphs contributors so I don t believe he she could reasonably be expected to debug the Dandelion code .",
"Is dandelion datatable able to cope with that",
"I think it will be good for dandelion-related questions .",
"Update : I m using dandelion v1.1.0",
"Why there is no dandelion tag",
"Why there is no dandelion tag",
"It is a project created by dandelion .",
"I am using dandelion datatables in my code .",
"Please precise the version of Dandelion-Datatables",
"Using the Dandelion-Core taglib : dandelion : asset cssExcludes datatables Don t forget to declare the taglib before : @ taglib prefix dandelion uri http : github.com dandelion",
"I have installed for the first time dandelion datatables .",
"Have you considered using DataTables without dandelion",
"Snippet of the trace on Tomcat 8 : .. . .. . Dandelion in my web app is embedded in the gvNix dependencies .",
"The dandelion entry I have in my pom is : dandelion.version 0.10.1 dandelion.version and below is the generate code : script src superbschools dandelion-assets 80d77bd9b757b0427342f9e5a32d4c1e85d2c35c da ndelion-datatables-0.10.0.js script I hope this is what you are asking .",
"A new issue https : github.com dandelion dandelion-datatables issues 253 has been added .",
"Here follows the required steps to apply a custom theme using Dandelion Dandelion-Datatables v0.10.0 .",
"An issue has just been filled https : github.com dandelion dandelion-datatables issues 284 .",
"And it s not as-if they re passing a null value into doEndTag : that method https : github.com dandelion dandelion-datatables blob master datatables-jsp src main java com github dandelion datatables jsp tag TableTag.java L224 takes no parameters .",
"I am developing a web app using dandelion datatables with server-side processing pagination and filtering .",
"What version of Dandelion-Datatables are you using",
"Attempting to get pagination on datatables using Thymeleaf and Dandelion .",
"Disclaimer required by StackOverflow : I m the author of Dandelion",
"I m using spring-boot with thymeleaf and dandelion .",
"Unfortunately Dandelion-Datatables doesn t support this feature yet .",
"The problem of dandelion is that it puts the sort icon in the last row header column.. .",
"note that I don t have nothing related to dandelion in the ready method .",
"I am working on a spring-mvc project with a dandelion datatables plugin .",
"The dandelion datatables folder is supposed to be placed under the classpath root of your application .",
"I ve been using Dandelion Datatables for a time now with the data attribute .",
"Possible you didn t register dandelion dialect in SpringTemplateEngine bean",
"ApplicationInitializer.java .. . .. . You can see the full sample application here https : github.com dandelion dandelion-samples tree master datatables datatables-thymeleaf-javaconfig .",
"dandelion http : stackoverflow.com questions tagged dandelion has been created you ll probably want to suggest edits to existing questions to re-tag them to use it .",
"I m trying to specify a custom processing message while Datatables is making an ajax call however Dandelion Datatables provides no direct dt : config or whatever option to set it .",
"My configuration is like this : .. . .. . And because of https : github.com dandelion dandelion issues 66 .. . .. . I used maven like this : .. . .. . before refresh page http : i.stack.imgur.com t5KZu.png .. . .. . after refresh http : i.stack.imgur.com jZefD.png",
"Make sure to have well configured the Dandelion components DandelionFilter and DandelionServlet .",
"This property is actually a package where Dandelion-Datatables will scan for extensions .",
"My stack is Spring 4 Thymeleaf and Dandelion Datatables 0.10.1 .",
"It would be a great help for anyone using Dandelion Datatables plugin .",
"Disclaimer required by Stackoverflow rules : I m the author of Dandelion-Datatables",
"I m trying to setup dandelion datatable on my Spring-boot Thymeleaf application .",
"I created a simple Spring Boot application using Thymeleaf and Dandelion-datatables .",
"I am using spring 3.2 and dandelion datatables 1.1.0",
"JQuery comes along with Dandelion Datatables so there is no need to import it twice .",
"What should I do as I am using Dandelion 0.10.0 .",
"It may be more practical to open a new topic in the forum http : dandelion-forum.48353.x6.nabble.com .",
"Could you please mention both version of Dandelion-Datatables and the generated JavaScript code .",
"Tested this in 0.10.1 it works but as soon as I had upgraded to Dandelion Datatables 1.0.1 or 1.1.0 Thymeleaf complained that property is not a valid confType .",
"I am trying to use jqueryui themes in dandelion datatables http : datatables.net .",
"New versions are not working I am using dandelion 1.1.1 having problem stackoverflow.com questions 37834638 http : stackoverflow.com questions 37834638 dandelion-datatables-ajax-url-is-not-working",
"With reference to this answer .. . .. . Spring Boot + Thymeleaf + Dandelion configuration not working http : stackoverflow.com questions 28702563 spring-boot-thymeleaf-dandelion-configuration-not-working 28705332 28705332 .. . .. . .. . .. . Can you use this config instead .. . .. . along with these dependencies",
"In a Maven https : maven.apache.org project you would have placed it at : .. . .. . Everything placed under the src main resources folder of your project will be copied under the WEB-INF classes directory and then be read by Dandelion at runtime .",
"I created a fix here https : github.com ohiocowboy dandelion tree feat liberty",
"I am trying to implement summary row for dandelion-datatable and I have some issue with this .",
"I need to override the SortingFeature of dandelion datatables core how can I archive this",
"Can you please show me an example .. . .. . I am using dandelion datatables 1.1.0",
"2 Prepare a new asset bundle .. . .. . Once all assets are here create a new bundle http : dandelion.github.io dandelion features asset-bundles introducing-asset-bundles.html called custom-theme.json in the src main resources dandelion folder .",
"I am making some modifications to the spring petclinic application and I need to place the pagination control for a dandelion datatable at the bottom underneath the table .",
"I want to internationalize the informations of my dandelion-datatables in 2 languages : english and french .",
"I m getting the following exception for Dandelion datatables when the application is deployed on Tomcat 8 .",
"The gvNix version is 1.4.0.RELEASE which I assume includes the 0.10.1 version of Dandelion .",
"I know that is planed to update Dandelion version but I can t provide you any schedule .",
"This bundle helped me : .. . .. . I put in src main resources dandelion and now it loads the filteringaddon.js",
"QUESTION .. . .. . I am running dandelion datatables version 1.1.0 on my spring-mvc application .",
"questions 218384 what-is-a-nullpointerexception-and-how-do-i-fix-it 12 answers .. . .. . Migrating from dandelion datatables 0.10.0 to 1.1.0 .. . .. . Hi I am trying to upgrade dandelion datatables in my project and I am getting following error .",
"I want a dandelion datatable to show 15 rows at a time instead of the default 10 rows .",
"Begin by declaring the Spring taglib in your JSP : .. . .. . 2 Then you need to update the usage of the Dandelion-Datatables taglib .",
"Make a variable first .. . .. . and added it in .. . .. . Also a fix is available here https : dandelion.ci.cloudbees.com job dandelion-datatables-build 344 .",
"3 Create an extension for Dandelion-Datatables .. . .. . Currently the only way to use a custom theme option for the jqueryui theme is to create an extension .",
"3.1 Create a class that extends AbstractExtension .. . .. . 3.2 Register your extension .. . .. . Then your extension must be detected by Dandelion-Datatables .",
"Note that I ll update this answer once this example will be available in the official Dandelion-Datatables sample applications .",
"I am using dandelion in order to show a table from an hibernate DB : .. . .. . it works fine .",
"I m using Spring Boot with Thymeleaf and now I want to add Dandelion datatables but it doesn t work .",
"Most of them are just same as what I did when i first used dandelion data tables .",
"This requires your controller to have a mapping on clientes which returns DatatablesResponse .. . .. . MyObject is the object you are passing to dandelion data tables",
"Here is my dandelion configuration .. . .. . According to error message this is the json file which has the error .",
"I ve asked question on Dandelion forum but I did not recieve any answer so I am trying here .",
"AFAIK the creator of Dandelion answers here as well so maybe I will be lucky this time .",
"Sorting option is also available in Spring Data via Sort class and it works pretty neat with Dandelion DatatablesCriterias and ColumnDef classes .",
"error http : i.stack.imgur.com QgWXj.png .. . .. . In older version of dandelion pagination was working without any problem .",
"See http : dandelion.github.io datatables docs ref jsp table.html scrollX .. . .. . Try to set the value in percentage : .. . .. . Side note : please precise the version of Dandelion-Datatables .",
"Problem .. . .. . In my dandelion datatable I have added a column at the end of the table that contains two buttons : edit and disable enable user .",
"I m using Dandelion DataTable component in version 1.1.0 Thymeleaf and Spring MVC .. . .. . I can filter the table with number of data and i can use the pagination .",
"I am trying to migrate from Dandelion Datatables 0.10.0 to 1.1.0 .. . .. . I have one filter in web.xml file .. . .. . It gives me this error",
"I have implemented dandelion datatables v1.1.0 in a project at this moment I need to add a second header thead row to add the yadcf https : github.com vedmack yadcf filters like this : .. . .. .",
"enter image description here http : i.stack.imgur.com T1d0Z.png .. . .. . This is the code of my dandelion table : .. . .. . Anyone can help me how can I implement a second header row with filters like the first image",
"I ve tried to implement the formatting attribute for Dandelion Datatables as specified here http : dandelion.github.io datatables docs ref thymeleaf th.html using Thymeleaf to no avail like so : .. . .. . ...but this does not do anything .",
"On a project using Spring MVC 4.0.6 Dandelion Datatables 1.1.0 with Dandelion Datatables Jsp 1.1.0 I have two jsps : .. . .. . JSP1 simplified .. . .. . JSP2 simplified .. . .. . THE PROBLEM .. . .. . The actual problem is that the first time JSP1 is loaded the table s configuration is correctly done .",
"Maybe you should try the following syntax : .. . .. . Example 1 : .. . .. . Example 2 : .. . .. . Disclaimer required by StackOverflow : I m the author of Dandelion",
"I had some issues with that and solved here http : stackoverflow.com questions 34218315 dandelion-datatables-cant-load-jquery-ui you can try to load all other js libs not in properties but in footer for example .",
"I am trying to get the search-box in the dandelion datatable to only populate the table if the user has entered at least 3 characters in the search-box ."
]
}
|
{
"confidence": [
65.60384368896484,
64.8936767578125,
63.846107482910156,
63.55670928955078,
59.02770233154297,
57.59975051879883,
57.47153091430664,
57.296714782714844,
57.18534851074219,
56.207550048828125,
54.033607482910156,
53.32591247558594,
50.88488006591797,
50.85642623901367,
50.25642776489258,
50.17749786376953,
49.9443359375,
49.48037338256836,
48.453216552734375,
47.40147399902344
],
"content": [
"Question : I have installed for the first time dandelion datatables . I followed this http : dandelion.github.io components datatables 1.0.1 docs html guide . I am using version 1.0.1 .. . .. . Can you help me to troubleshoot the following errors : .. . .. . http : localhost : 8080 website dandelion datatables css jquery.dataTables.css .. . .. . http : localhost : 8080 website dandelion jquery js jquery.js .. . .. . http : localhost : 8080 website dandelion datatables js jquery.dataTables.js .. . .. . http : localhost : 8080 website dandelion datatables features filtering jquery.dataTables.yadcf.js .. . .. . dandelion-datatables-91438756c71be2df6b2ee155197c3192.js : 34 .. . .. . http : localhost : 8080 website dandelion datatables features filtering jquery.dataTables.yadcf.css .. . .. . http : localhost : 8080 website dandelion datatables css jquery.dataTables.css .. . .. . http : localhost : 8080 enepath dandelion datatables css jquery.dataTables.css .. . Answer : I needed to add the following to mvc-core-config.xml in order to expose dandelion s resources :",
"Question : Do you know why I am getting this error I changed my controller from this .. . .. . to this : .. . .. . and suddenly stop working .. . .. . any help highly appreciated . I am using spring 3.2 and dandelion datatables 1.1.0 Comment : The exception is as clear as it can be : there s no default constructor for the DatatablesCriterias class and the bean factory requires one . You shouldn t be passing that as a parameter . Comment : I just followed this sample here https : github.com dandelion dandelion-datatables-samples blob master datatables-jsp-ajax src main java com github dandelion datatables web ajax AjaxController.java Comment : Believe the JVM not the sample . Who creates criteria Comment : It is a project created by dandelion . It is based on JQuery Datatables . See their websites here http : dandelion.github.io components datatables Comment : I think the first controller is correct the JVM agrees with me . Why the change .. . Answer : When you changed your controller to use DatatablesParams annotation you need to enable a resolver which will instantiate DatatablesCriterias object . Because spring 3.2 is in use DatatablesCriteriasMethodArgumentResolver need to be enabled : .. . .. . through xml : .. . .. . or java config :",
"Question : I have installed for the first time dandelion datatables . I followed this http : dandelion.github.io components datatables 1.0.1 docs html guide . I am using version 1.0.1 .. . .. . Can you help me to troubleshoot the following errors : .. . .. . http : localhost : 8080 website dandelion datatables css jquery.dataTables.css .. . .. . http : localhost : 8080 website dandelion jquery js jquery.js .. . .. . http : localhost : 8080 website dandelion datatables js jquery.dataTables.js .. . .. . http : localhost : 8080 website dandelion datatables features filtering jquery.dataTables.yadcf.js .. . .. . dandelion-datatables-91438756c71be2df6b2ee155197c3192.js : 34 .. . .. . http : localhost : 8080 website dandelion datatables features filtering jquery.dataTables.yadcf.css .. . .. . http : localhost : 8080 website dandelion datatables css jquery.dataTables.css .. . .. . http : localhost : 8080 enepath dandelion datatables css jquery.dataTables.css .. . Answer : Make sure to meet all requirements in particular Servlet 3.0+ container . Also ensure that your web.xml file is well configured for the Servlet 3.0 API : Comment : Yeah I was using version 2.5 . I changed it now but the error still persists . I am using spring 4.1 and tomcat 8",
"Question : null .. . Answer : I am using dandelion datatables in my code . the table comes properly but there is no sort feature coming up . Can some one please help --Pankaj Comment : Could you please mention both version of Dandelion-Datatables and the generated JavaScript code . Comment : The dandelion entry I have in my pom is : dandelion.version 0.10.1 dandelion.version and below is the generate code : script src superbschools dandelion-assets 80d77bd9b757b0427342f9e5a32d4c1e85d2c35c da ndelion-datatables-0.10.0.js script I hope this is what you are asking . Comment : Almost : - Please post the contents of superbschools dandelion-assets 80d77bd9b757b0427342f9e5a32d4c1e85d2c35c da nd elion-datatables-0.10.0.js Comment : var oTable schools schools var oTable schools params sDom : lEfrtip bInfo : false asStripeClasses : bPaginate : false aoColumns : sDefaultContent : sDefaultContent : mData : streetName sDefaultContent : mData : suburb sDefaultContent : mData : phone sDefaultContent : Comment : document .ready function .fn.dataTableExt.aoFeatures.push fnInit : function oDTSettings var container document.createElement div container .attr class dataTables export container .attr style float : right container .html a class btn style height : 25px margin-left : 2px href superbschools schools.html schoolName dtt f dti schools dtf pdf dtp y da ndelionAssetFilterState false PDF a return container cFeature : E sFeature : GroupE oTable schools.dataTable oTable schools params",
"Question : Recently I integrated datatables http : dandelion.github.io datatables with my spring-4 mvc + Hibernate 4 + Tiles 3 Project . Everything is working fine . But I have one issue . My jqueryUI themes are not working properly . Please have a look in below images . 1 . Search filter and export links are not in one row . I want them to appear in one row . I tried with dom ilfrtip Export links disappeared Also did not get output what I wanted.. . enter image description here http : i.stack.imgur.com vn27t.png .. . .. . 1 . And datatable sorted column appears blue in all themes enter image description here http : i.stack.imgur.com HbsHy.jpg .. . .. . 1 . I also want to highlight row on mouse hover as shown here http : datatables.net examples styling hover.html but with my custom color not blue . 2 . I also want stripes as shown here http : datatables.net examples styling hover.html but with my custom colors . I used cssStripes odd even but not working . : .. . .. . So I want to apply custom theme instead of basic themeoptions http : dandelion.github.io datatables docs ref configuration themeoptions themes . I have downloaded my custom theme from ThemeRoller http : jqueryui.com themeroller name PurpleTheme . How can I apply this to datatables I am loading themes from spring theme properties using spring themeresolver and themeinterceptor . Any help is invited . Thank you in advance.... . .. . Answer : I just made a test by downloading a theme from ThemeRoller http : jqueryui.com themeroller . Here follows the required steps to apply a custom theme using Dandelion Dandelion-Datatables v0.10.0 . 1 Download and install the jQueryUI-related assets .. . .. . Once you ve downloaded all assets from ThemeRoller place them inside your project . In my example I use the following standard Maven architecture : .. . .. . Warning : I had to update all image links in the CSS file to point them to my images folder . . images instead of images . 2 Prepare a new asset bundle .. . .. . Once all assets are here create a new bundle http : dandelion.github.io dandelion features asset-bundles introducing-asset-bundles.html called custom-theme.json in the src main resources dandelion folder . In this file you just need to reference your custom CSS . Don t forget to mark this bundle as dependent of the jqueryui one which is already activated when you use the theme jqueryui table attribute . 3 Create an extension for Dandelion-Datatables .. . .. . Currently the only way to use a custom theme option for the jqueryui theme is to create an extension . In order to alleviate the configuration JSP-side I suggest you to create an extension actually a theme that will activate both jQueryUI and your custom theme so that you don t need to use theme jqueryui any longer . 3.1 Create a class that extends AbstractExtension .. . .. . 3.2 Register your extension .. . .. . Then your extension must be detected by Dandelion-Datatables . To do so you must define the group .main.extension.package property in the configuration file . This property is actually a package where Dandelion-Datatables will scan for extensions . So I added a new datatables.properties file under the src main resources dandelion datatables folder which contains : .. . .. . 4 Activate the extension .. . .. . Once the ground prepared you can test your extension by activating it thanks to the ext table attribute . Just pass the name you have given above in the getName method of your extension . 5 Adapt the configuration .. . .. . It works well without export links . But as soon as you activate the export feature Dandelion-Datatables will update the sDom parameter with a new letter : E for Export therefore breaking the configuration previously set by the jQuery theme . So you just need to override this setting as follows : .. . .. . Another option would be to configure the sDom parameter directly in the above CustomJqueryTheme Java class . Finally if you want to update the odd even rows just use the cssStripes table attribute as follows : .. . .. . Just ensure : .. . .. . either to use something different than odd and even because Datatables use these classes .. . or if you still want to use odd and even make sure to override them with custom CSS rules . .. . .. . As you can see it s not very easy . : - .. . .. . But it should become a bit simpler in upcoming versions thanks to improvements in the extension mechanism . Note that I ll update this answer once this example will be available in the official Dandelion-Datatables sample applications . Disclaimer required by StackOverflow : I m the author of Dandelion Comment : Is there any way that I can specify custom theme in themeOption Comment : How can I remove this css which appears in all pages . link rel stylesheet href ajax.aspnetcdn.com ajax jquery.dataTables 1.9.4 css jquery.dataTables.cs s Comment : Using the Dandelion-Core taglib : dandelion : asset cssExcludes datatables Don t forget to declare the taglib before : @ taglib prefix dandelion uri http : github.com dandelion",
"Question : I am working on a spring-mvc project with a dandelion datatables plugin . I am only able to use it s css js when I have an internet-connection . What I want is to have a configuration file to set this plugin to standalone mode http : dandelion.github.io datatables features configuration configuration-overloading.html . My project dirs is similar to this http : www.google.com.ph imgres imgurl http : www.quickprogrammingtips.com wp-content uploads 2012 04 image.png imgrefurl http : www.quickprogrammingtips.com struts2 struts-2-netbeans-tutorial.html h 307 w 320 tbnid oFKCzOnSBALOTM : zoom 1 docid WsGrtrnnwMeJVM ei BoJKVaPsB8zhuQS4qIHwCA tbm isch ved 0CEcQMygiMCI .. . Answer : The dandelion datatables folder is supposed to be placed under the classpath root of your application . In a Maven https : maven.apache.org project you would have placed it at : .. . .. . Everything placed under the src main resources folder of your project will be copied under the WEB-INF classes directory and then be read by Dandelion at runtime . You could do the same manually but I strongly recommend to use any build tool such as Maven .",
"Question : This question already has an answer here : .. . .. . What is a NullPointerException and how do I fix it questions 218384 what-is-a-nullpointerexception-and-how-do-i-fix-it 12 answers .. . .. . Migrating from dandelion datatables 0.10.0 to 1.1.0 .. . .. . Hi I am trying to upgrade dandelion datatables in my project and I am getting following error . JSP Code Comment : @EJP : this is not a duplicate of the standard Java NPE question . This author is not a contributor to Dandelion Datatables https : github.com dandelion dandelion-datatables graphs contributors so I don t believe he she could reasonably be expected to debug the Dandelion code . And it s not as-if they re passing a null value into doEndTag : that method https : github.com dandelion dandelion-datatables blob master datatables-jsp src main java com github dandelion datatables jsp tag TableTag.java L224 takes no parameters . .. . Answer : I upgraded this jar files and issue solved . And added filter in web.xml",
"Question : I am trying to install dandelion datatables and I have some problems with the configuration .. . .. . Following the guide here http : dandelion.github.io components datatables 1.1.0 docs html 1-introducing-dandelion-datatables I added the following to my pom .. . .. . Then I added the following to my web.xml file .. . .. . I am serving the data from a spring-mvc controller to my jsp page where I put the following .. . .. . I am using servlet-3.1 web.xml below .. . .. . My container is tomcat 8 .. . .. . PROBLEM .. . .. . When the table is populated but css and js file are not reachable . The datatable instead works ok but without styling . The pagination however works . Below some of the link generated that are not reachable . http : localhost : 8080 dtproject dandelion datatables css jquery.dataTables.css http : localhost : 8080 dtproject dandelion jquery js jquery.js http : localhost : 8080 dtproject dandelion datatables js jquery.dataTables.js .. . .. . Can anyone help Thanks .. . .. . UPDATE .. . .. . To tell the engine to load resources from external CDNs I have added the following line to the datatables.properties conf file .. . .. . When I run the program I get this error : .. . Answer : I downgraded servlet version from 3.1 to 3.0 and now it works .. . .. . Life is strange sometime",
"Question : I have a table with many columns so I would like to add a scrollX ability scroll right and left using dandelion datatables as following : .. . .. . I tried several variations but the scroll bar doesn t appear.. . Any idea Dandelion version : 0.10.0 .. . Answer : The value of the scrollX attribute is actually a CSS unit . If it s a number the value is treated as a pixel measurement . See http : dandelion.github.io datatables docs ref jsp table.html scrollX .. . .. . Try to set the value in percentage : .. . .. . Side note : please precise the version of Dandelion-Datatables . Comment : Hi I put 200 but it doesn t work . from pom.xml : dandelion.version 0.10.0 dandelion.version . note that I don t have nothing related to dandelion in the ready method . thanks .",
"Question : I ve asked question on Dandelion forum but I did not recieve any answer so I am trying here . AFAIK the creator of Dandelion answers here as well so maybe I will be lucky this time . My stack is Spring 4 Thymeleaf and Dandelion Datatables 0.10.1 . What I am trying to achieve is simple exporting . I ve started with filter based exports http : dandelion.github.io datatables features export filter-based-exports.html but as my tables are populated by AJAX call it did not work . So I ve switched to controller based export http : dandelion.github.io datatables features export controller-based-exports.html - I ve added all the code to my Spring app but the problem still remains . There is no export link generated in a view layer My Thymeleaf code looks like this . My datatable works fine - it retrieves data from the server with AJAX call but there is no export link anywhere . How it is supposed to work or behave then Am I doing something wrong PS . Why there is no dandelion tag I think it will be good for dandelion-related questions . .. . Answer : As soon as you activate export Dandelion-Datatables makes available a new control element accessible through the E parameter and automatically updates the dom https : datatables.net reference option dom parameter to include this new control . Since you override with the dt : dom parameter you need to specify the new control for example with : dt : dom Efrtlpi .. . .. . Disclaimer as required by SO rules : I m an author of the library . Why there is no dandelion tag I think it will be good for dandelion-related questions . Because I have not enough reputation yet but I d love to have one : - Comment : dandelion http : stackoverflow.com questions tagged dandelion has been created you ll probably want to suggest edits to existing questions to re-tag them to use it . A tag wiki would be good too if you can write one that isn t too much self-promotion Comment : @Gagravarr thanks",
"Question : I m getting the following exception for Dandelion datatables when the application is deployed on Tomcat 8 . The application works just fine on Tomcat 7 . I ve searched everywhere but can t find a resolution . Snippet of the trace on Tomcat 8 : .. . .. . Dandelion in my web app is embedded in the gvNix dependencies . The gvNix version is 1.4.0.RELEASE which I assume includes the 0.10.1 version of Dandelion . The configuration being used is default . The application is packaged and deployed using Maven . .. . Answer : I created an issue in the GitHub but I also managed to workaround the problem . Please refer to https : github.com gvSIGAssociation gvnix issues 28",
"Question : I m getting the following exception for Dandelion datatables when the application is deployed on Tomcat 8 . The application works just fine on Tomcat 7 . I ve searched everywhere but can t find a resolution . Snippet of the trace on Tomcat 8 : .. . .. . Dandelion in my web app is embedded in the gvNix dependencies . The gvNix version is 1.4.0.RELEASE which I assume includes the 0.10.1 version of Dandelion . The configuration being used is default . The application is packaged and deployed using Maven . .. . Answer : Currently gvNIX uses a Dandelion Datatables 0.9.2 custom-version which includes some patches than hadn t been applied until 0.10.0 it was due to release-time problems . As far I know we didn t make any test over Tomcat 8 so I think you found a bug - . If you want you could report it on github project https : github.com disid gvnix issues . Now a days I can t provide you any workaround to run it on Tomcat 8 . I know that is planed to update Dandelion version but I can t provide you any schedule . Regards .",
"Question : I have a table with many columns so I would like to add a scrollX ability scroll right and left using dandelion datatables as following : .. . .. . I tried several variations but the scroll bar doesn t appear.. . Any idea Dandelion version : 0.10.0 .. . Answer : Adding cssClass table to the table deceleration solved the problem . Thanks",
"Question : null .. . Answer : I have implemented dandelion datatables v1.1.0 in a project at this moment I need to add a second header thead row to add the yadcf https : github.com vedmack yadcf filters like this : .. . .. . enter image description here http : i.stack.imgur.com NcsWo.png .. . .. . I have tried adding a new feature for add the new header row but the sorting icons are in the header row like the next image : .. . .. . enter image description here http : i.stack.imgur.com T1d0Z.png .. . .. . This is the code of my dandelion table : .. . .. . Anyone can help me how can I implement a second header row with filters like the first image Thanks Comment : You Dandelion author might find the following issue on yadcf github https : github.com vedmack yadcf issues 297 relevant to you see also my last comment https : github.com vedmack yadcf issues 297 issuecomment-204762695 on it Comment : This is a good start thank you .. . Comment : The problem of dandelion is that it puts the sort icon in the last row header column.. . Comment : maybe the orderCellsTop https : datatables.net reference option orderCellsTop is also relevant.. .",
"Question : Attempting to get pagination on datatables using Thymeleaf and Dandelion . According to the docs I need to update a few things : .. . .. . web.xml javaconfig attempt further down .. . .. . SpringTemplateEngine @Bean skipped as I already have the Thymeleaf template Engine .. . .. . My knowledge of Spring is still extremely shaky but I have to replace the web.xml components least I think I can do it this way : .. . .. . My ThymeleafConfig : .. . .. . My security settings : .. . .. . I get the following in my logs after both dialects load : .. . .. . When the page loads : .. . .. . Only warning I get : .. . .. . And finally : .. . .. . When the page loads the data loads but it isn t paginated where d I go wrong .. . Answer : Just tried to set this up . Here follows my working configuration . WebConfig.java .. . .. . Here is the imported ThymeleafConfig.java class : .. . .. . Then the root configuration . Quite hairy as you can see . RootConfig.java .. . .. . And finally the app initializer . Make sure to have well configured the Dandelion components DandelionFilter and DandelionServlet . ApplicationInitializer.java .. . .. . You can see the full sample application here https : github.com dandelion dandelion-samples tree master datatables datatables-thymeleaf-javaconfig . Hope this helps Disclaimer required by StackOverflow : I m the author of Dandelion Comment : EDIT : link-to sample app added Comment : I pulled my Initializer class and add the SecurityConfig class to the rootContext and everything came up beautifully",
"Question : I am using ajax source to display data on the table . Above my table i have criterias to filter what i want to display in my table . What i want to achieve is to disable initial data load so when page is loaded I ll get empty table then after I ll select criterias and press Apply Filters button data will be loaded . So i ve tried using deferRender but it seems not working . Here is the code .. . .. . on the controller : .. . Answer : You may be interested by the deferLoading https : datatables.net reference option deferLoading feature instead of deferRender . See this post http : stackoverflow.com questions 16086090 datatables-and-server-side-processing-load-on-demand for an example using plain DataTables . Unfortunately Dandelion-Datatables doesn t support this feature yet . An issue has just been filled https : github.com dandelion dandelion-datatables issues 284 . Disclaimer required by Stackoverflow rules : I m the author of Dandelion-Datatables Comment : yes i was thinking of that thanks but how can I implement deferLoading please give me an example based on the given code .",
"Question : I m trying to specify a custom processing message while Datatables is making an ajax call however Dandelion Datatables provides no direct dt : config or whatever option to set it . I ve tried to follow the documentation here http : dandelion.github.io datatables features configuration configuration-overloading.html and here http : dandelion.github.io datatables features i18n internationalization.html by specifying a custom configuration property like so : .. . .. . ...with no success . What am I doing wrong or are the properties specified in the documentation not configuration properties .. . Answer : Just remove the group name from the configuration option and it should work : Comment : Tested this in 0.10.1 it works but as soon as I had upgraded to Dandelion Datatables 1.0.1 or 1.1.0 Thymeleaf complained that property is not a valid confType . Comment : Yes the right value is now option . I ve just noticed that the docs hasn t been updated accordingly . Thanks",
"Question : I try to use dandelion datatable taglib on my datatable this is my code : .. . .. . When I use filterable true for column filtering it generates this code : .. . .. . I would expect to generate somthing like this .. . .. . And in console I get errors like this : .. . .. . TypeError : oTable interviewTable.dataTable .. . .columnFilter is not a function oTable interviewTable.dataTable oTable interviewTable params .columnFilter .. . .. . and .. . .. . NetworkError : 404 Not Found - http : localhost : 8080 HRS dandelion datatables filtering filteringaddon.js .. . .. . The table looks fine and it works fine I have problems just with the column filter . Can somebody explain why is this happening and how can I use column filter Comment : Please precise the version of Dandelion-Datatables Comment : I use version 0.10.1 .. . Answer : This bundle helped me : .. . .. . I put in src main resources dandelion and now it loads the filteringaddon.js",
"Question : null .. . Answer : I need to override the SortingFeature of dandelion datatables core how can I archive this In found the topic in the official reference http : dandelion.github.io components datatables 1.0.0 docs html 13-4-extending-an-already-existing-extension but it is still pending . Update : I m using dandelion v1.1.0",
"Question : I want to use dandelion datatables with thymeleaf.My html file is below : .. . .. . Controller : .. . .. . But when I enter this page table is empty.How can I initialize table when it loading first time . Comment : Could you post your controller s code Comment : Have you considered using DataTables without dandelion At least that way is there is an error DataTables throws an alert Comment : Possible you didn t register dandelion dialect in SpringTemplateEngine bean Comment : my project is spring4 but the last version of datatables is spring3.Could this be the cause of failure . .. . Answer : According to documentation http : dandelion.github.io components datatables 1.1.0 docs html 8-4-5-deferring-data-loading dt : deferLoadgin attribute : .. . .. . .. . allows you to instruct DataTables to not make that initial request rather it will use the data already on the page no sorting etc will be applied to it . Try to remove dt : deferLoading 10 attribute from deffinition of table ."
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
caching
|
UNK_RELATION
|
jsonlint@validation@40
|
jsonlint -- jsonlint is a json linting @placeholder and formatting tool .
|
{
"confidence": [
49.6174430847168,
49.02170944213867,
47.16510772705078,
46.871421813964844,
44.466285705566406,
44.40557861328125,
42.93063735961914,
42.819000244140625,
42.66486740112305,
42.66486740112305,
42.66486740112305,
41.89457702636719,
40.24555206298828,
40.09315872192383,
40.09315872192383,
37.989662170410156,
37.67384338378906,
36.968448638916016,
36.968448638916016,
35.90705490112305,
35.7987060546875,
35.7987060546875,
35.7987060546875,
35.7987060546875,
35.056678771972656,
34.908119201660156,
34.908119201660156,
34.3967399597168,
34.14507293701172,
34.14381790161133,
33.65471267700195,
32.5542106628418,
32.381832122802734,
32.02983856201172,
31.57210922241211,
31.57210922241211,
31.384469985961914,
31.384469985961914,
31.21209144592285,
29.982501983642578,
29.982501983642578,
29.810123443603516,
28.682863235473633,
28.682863235473633,
28.121070861816406,
27.25048065185547,
25.656963348388672,
25.270374298095703,
23.77899169921875,
23.541494369506836,
22.371753692626953,
22.342491149902344,
22.063968658447266,
21.390914916992188,
21.064613342285156,
21.064613342285156,
21.064613342285156,
20.6415958404541,
20.6415958404541,
20.389719009399414,
20.389719009399414,
20.07347869873047,
20.07347869873047,
20.07347869873047,
19.715564727783203,
19.30393409729004,
19.30393409729004,
19.30393409729004,
19.30393409729004,
19.141836166381836,
18.896873474121094,
18.87835693359375,
18.87835693359375,
18.31024169921875,
18.31024169921875,
18.31024169921875,
18.31024169921875,
18.267362594604492,
18.267362594604492,
18.267362594604492,
18.267362594604492,
18.267362594604492,
18.267362594604492,
18.267362594604492,
18.131633758544922,
18.131633758544922,
18.131633758544922,
17.826892852783203,
17.708616256713867,
17.708616256713867,
17.632957458496094,
17.54069709777832,
17.54069709777832,
17.294452667236328,
17.214929580688477,
17.214929580688477,
17.140499114990234,
17.140499114990234,
17.140499114990234
],
"content": [
"The JSON file passes JSONLint .",
"for file in find .. . do echo Linting : file jsonlint -V ... . file done",
"Does anyone know of a tool like JSONLint for XML",
"jsonlint is a validator .",
"JSONLint http : www.jsonlint.org",
"This JSON passes jsonlint http : www.jsonlint.com validation .",
"Despite having a before the character this json is being invalidated by jsonlint .",
"find . config pages -name .json -print0 xargs -0I sh -c file echo Linting : file jsonlint -V . config schema.json -q file",
"Looks like the issue is with jsonlint not xargs",
"validate if here jsonlint http : jsonlint.com",
"I installed jsonlint using npm .",
"jsonlint says it s valid .",
"jsonlint is based on Jison that s a parser-generator .",
"valid according to JSONLint http : www.jsonlint.com",
"did you use jsonlint to validate",
"I m trying to verify the following JSON on www.jsonlint.com : http : s2g.supsi.ch hcd test.json .. . .. . If I copy and paste the text in jsonlint the JSON is verified .",
"When I copy-paste that into JSONLint it passes .",
"I am using jsonlint to lint a bunch of files in a directory recursively .",
"jsonlint can t currently validate against a draft-04 schema .",
"However if I enter the JSON URL http : s2g.supsi.ch hcd test.json to jsonlint I receive the following error : .. . .. . I don t understand why it doesn t work .",
"Ok I guess the data would have never passed the JSONLint test .",
"JSONLint treats them the same way you describe here .",
"I ve validated the feed with JSONLint and the JS with JSLint - it appears to be fine .",
"So I copy this string to JSONLint to check whether it s valid the result is no .",
"Copy and paste your JSON into JSONLint http : jsonlint.com - it s a JSON validator that shows you what and where exactly is your problem and whether is valid or not .",
"This piece of JSON right here : .. . .. . Does not validate in jsonlint http : jsonlint.com also not with GWT .",
"I copied the json into JSONLint http : www.jsonlint.com and it is valid so I am perplexed to why this keeps happening .",
"I suppose some garbage was being returned when I was copying it to jsonlint .",
"I have a web service returning following json : .. . .. . JSONLint is giving following error : .. . .. . I am really unable to understand what is making json invalid here",
"I have this JSON string : .. . .. . But it looks like it s not correct JSONLint http : www.jsonlint.com tells me so PHP s json decode can t decode it .",
"I made a sample file using JSON data from the JSON site validated it through JSONLint then ran my code using that file .",
"find .. . xargs jsonlint -V . config.schema.json -q Another option is just to do this in a for-loop .",
"I m trying to run jsonlint on a 40MB JSON file but it halts execution with an exit status of 5 and the following error message : .. . .. . Does anyone know how I can get this JSON pretty-printed",
"I wrote the following command : .. . .. . find . config pages -name .json -print0 xargs -0I sh -c echo Linting : jsonlint -V . config schema.json -q .. . .. . It works for most files but some files I get the following error : .. . .. . It appears to fail for long filenames .",
"I have some JSON which is perfect when tested with jsonlint http : www.jsonlint.org but gives an Invalid character error when i try to parse it to an object .",
"when i run the JSON through JSONlint it s throwing an error on a string : .. . .. . Expecting STRING NUMBER NULL TRUE FALSE .. . .. . It says that it s not when it is .",
"In Delphi XE2 I need to make a function that receives a JSONValue and returns an indented String much like JSONLint http : jsonlint.com .",
"My object is failing on JSONLint with the following error : .. . .. . I assumed that this would give me an array of JavaScript objects .",
"You have to use quotation marks around the identifiers and the values that are strings : .. . .. . This is valid JSON : .. . .. . If you are actually not using JSON at all but just trying to create a Javascript literal object then you should not use JSONLint to check the code .",
"Hmm perhaps run it through a JSONLint http : www.jsonlint.org request response but that seems a bit overkill .",
"Put an extra paranthesis around the result and it works.It is strange since JSONLint is not validating it now",
"Python json.load takes forever http : stackoverflow.com questions 33727171 python-json-load-takes-forever noredirect 1 comment55226842 33727171 .. . .. . So I turn into jsonlint to validate the problematic json files .",
"Attempting to use the data series from this example http : people.iola.dk olau flot examples turning-series.html no longer passes the JSONLint test http : www.jsonlint.com .",
"i ll post the result-of query : .. . .. . the error in JSONLint is about : .. . .. . I ve tried different ways without reaching any solution.Can Someone help me",
"Here is part of .. . .. . I m not too familiar with JSON syntax and I haven t found a source on the web that provides an introduction when I try to parse each JSONObject in the JSONArray I get an error like .. . .. . When I input into jsonlint : .. . .. . What s wrong with my JSON",
"Ill spare you the cURL stuff : .. . .. . Which is giving me a JSON readout of : .. . .. . This will give me a JSONLint error saying : .. . .. . So naturally I will add-in the comma which gives me an End of File expectation : .. . .. . I am new to JSON but I have checked the website and a few resources for proper JSON formatting and structure and from what I can see my readout is following the guidelines .",
"This one runs okay .. . .. . It Prints Out on the Console Array 3 .. . .. . but when I run I change the value of var response to this one .. . .. . the value of tags is null take note that both values are validated on JSONLint .",
"Best tool available for formatting and validating XML is http : codebeautify.org xmlviewer",
"I am using jQuery to get a list of Names as JSON string - .. . .. . .. . .. . The back end is an asp.net page and when I debug I get the string as Name : Maria John Raj Rosh Tony Name test3 test4 test5 test6 which I put in JSONLint http : www.jsonlint.org and validated .",
"My logic says escaping the with essential says string das feet - As far is I know jsonlint needs a character after the to be escabed - try this maybe das s feet - I know it s not what you want but it may prove the theory",
"Consider for example : .. . .. . The zero floating-point number gives an error under the following circumstances : .. . .. . Running it through JSONLint http : jsonlint.com .. . Evaluating it in the browser on Windows with jQuery.parseJSON IE and Firefox various versions of jQuery .. . .. . Changing the zero floating-point number to any non-zero value gives no hassles .",
"This is the json .",
"It s just a JSON fragment not a full JSON document .",
"In previous versions of the JSON standard a String alone is not a valid JSON document .",
"Newline is causing invalid JSON .",
"You are using a string not json.. .",
"Isn t it a valid JSON",
"But I want linebreaks in my json .",
"I am getting json parsererror .",
"If you literally mean that the string as a whole is your JSON text containing something that isn t JSON there are three issues : .. . .. . 1 .",
"In a full JSON document the top level must be an object or array : .. . .. . Most JSON parsers support parsing fragments such as standalone strings .",
"New line present in introtex this is valid json check it",
"x is an invalid escape sequence in JSON strings .",
"JSON Lint throwing parsing error for following string .",
"Here s a version as valid JSON with the x converted to the correct JSON u escape : .. . .. . ...also those escapes are all actually defining perfectly normal characters so :",
"Literal line-breaks within strings are not valid in JSON use n .",
"For completeness : JSON requires that all keys and strings be in double quotes not single quotes .",
"@RajatAgarwal : Well it shouldn t be there it s a fault in whatever s generating the JSON .",
"So the best thing is to fix whatever s generating the invalid JSON .",
"Maybe it s just a formatting error in your code here",
"I suspect that you are generating your JSON by manually mashing together strings in some programming language and the n is being interpreted as a new line by that programming language and you are still outputting a literal new line in your JSON .",
"I tried adding echo . json .",
"It is referring to the json variable before the foreach .",
"Your code doesn t remotely resemble JSON .",
"Are you trying to pretty-print the JSON or validate it",
"I used php json encode function to encode JSON .",
"I am trying to learn a bit about json .",
"To have break lines in my json I am replacing all newline tags br with a special character e.g .",
"At client-side after parsing json I replace occurrences of with br back to display properly .",
"I am checking on http : jsonlint.com and it shows following error .. . .. . Please explain what are the problems with the json and do I correct it",
"Well done using copy-and-paste to put the JSON in your question rather than retyping .",
"That would be valid JSON if it didn t have an invisible character a zero-width space just prior to the first .",
"Of course that would remove it from within strings in the JSON as well where it could be valid .",
"I am using JavaScript only and I want JSON so that I can feed it into Fusion Charts to display charts .",
"There is no such thing as a JSON object .",
"It is an ABAP program that is generating the JSON .",
"I suspect the JSON is malformed .",
"If you re just looking for formatting rather than validation you can use http : xmlbeautifier.com",
"The JSON data look ok to me .",
"JSON is a text format for describing objects .",
"Here s your fragment wrapped in an object with the line-breaks and x issue handled : .. . .. . .. . .. . The text within the string is also not valid JSON but perhaps it s not meant to be .",
"A nice JSON-validator to avoid things like this : jsonlint.com http : jsonlint.com",
"Have you thought about how big this JSON is going to be pretty-printed",
"The JSON is valid .",
"I have a .NET web service returning the following JSON : .. . .. . My client code is as follows : .. . .. . If I paste the returned JSON into http : www.jsonlint.com then it validates but the jQuery AJAX call errors with textStatus parsererror and errorThrown Invalid JSON .",
"As the JSON syntax is a subset of the Javascript syntax you can take JSON and put it in Javascript code but then it s not JSON any more because it s not data any more it s code .",
"you want to pretty-print json strings",
"No the first is not JSON it s a Javascript literal object .",
"JSON is not Javascript code it s a text format ."
]
}
|
{
"confidence": [
62.54305648803711,
54.042972564697266,
50.60044860839844,
50.219417572021484,
49.578094482421875,
46.99399185180664,
46.820045471191406,
46.508522033691406,
45.84025573730469,
45.626827239990234,
45.47378158569336,
45.434356689453125,
45.42902755737305,
45.01947021484375,
44.08673858642578,
43.49239730834961,
42.90348815917969,
42.90348815917969,
42.44096374511719,
42.42837905883789
],
"content": [
"Question : null .. . Answer : I am using jsonlint to lint a bunch of files in a directory recursively . I wrote the following command : .. . .. . find . config pages -name .json -print0 xargs -0I sh -c echo Linting : jsonlint -V . config schema.json -q .. . .. . It works for most files but some files I get the following error : .. . .. . It appears to fail for long filenames . Is there a way to fix this Thanks . Edit 1 : Found the problem . -I replstr .. . .. . Execute utility for each input line replacing one or more occurrences of replstr in up to replacements or 5 if no -R flag is specified arguments to utility with the entire line of input . The resulting arguments after replacement is done will not be allowed to grow beyond 255 bytes this is implemented by concatenating as much of the argument containing replstr as possible to the con-structed arguments to utility up to 255 bytes . The 255 byte limit does not apply to arguments to utility which do not contain replstr and furthermore no replacement will be done on utility itself . Implies -x . Edit 2 : Partial solution . Supports longer file names than before but still not as long as I need . find . config pages -name .json -print0 xargs -0I sh -c file echo Linting : file jsonlint -V . config schema.json -q file Comment : Looks like the issue is with jsonlint not xargs Comment : It is xargs I figured out the problem just not a great solution . See edits . Comment : You can tell xargs to process one json file at a time by passing -n 1 . Or maybe some number of files less than the breaking point at a time by passing -n 20 for example. . Comment : I don t think that will help . When using the -I flag with xargs the limit for the command is 255 characters . So if the command is 78 characters long the file name can only be 177 characters . Comment : If you removed the echo you would be able to forego the -I . find .. . xargs jsonlint -V . config.schema.json -q Another option is just to do this in a for-loop . for file in find .. . do echo Linting : file jsonlint -V ... . file done",
"Question : I use JSONLint.com to help me quickly turn JSON dumps into something readable and right now I am dealing with some hefty ever-changing XML that I d love to be able to read easier . Does anyone know of a tool like JSONLint for XML .. . Answer : Best tool available for formatting and validating XML is http : codebeautify.org xmlviewer",
"Question : I use JSONLint.com to help me quickly turn JSON dumps into something readable and right now I am dealing with some hefty ever-changing XML that I d love to be able to read easier . Does anyone know of a tool like JSONLint for XML .. . Answer : If you re just looking for formatting rather than validation you can use http : xmlbeautifier.com Comment : This should do just fine Thanks . Comment : doesn t work for me . but freeformatter.com xml-formatter.html http : www.freeformatter.com xml-formatter.html is much better",
"Question : I m trying to verify the following JSON on www.jsonlint.com : http : s2g.supsi.ch hcd test.json .. . .. . If I copy and paste the text in jsonlint the JSON is verified . However if I enter the JSON URL http : s2g.supsi.ch hcd test.json to jsonlint I receive the following error : .. . .. . I don t understand why it doesn t work . Could be the text encoding Comment : why does it matter .. . Answer : Here is the code which reads the URL : .. . .. . Here is the issue : .. . .. . The response from the http : jsonlint.com proxy.php server URL returns a bad status code rather than the content in question .",
"Question : Everything is ok except for this line .. . .. . It has a single quote within double quote . Despite having a before the character this json is being invalidated by jsonlint . Comment : try escaping the slash with another one das feet Comment : validate if here jsonlint http : jsonlint.com Comment : My logic says escaping the with essential says string das feet - As far is I know jsonlint needs a character after the to be escabed - try this maybe das s feet - I know it s not what you want but it may prove the theory .. . Answer : You do not need to escape single quote . More info is here http : www.json.org",
"Question : I am trying to learn a bit about json . I installed jsonlint using npm . I copied a schema and a file from this http : json-schema.org example1.html website exactly . They are as follows : .. . .. . test.json : .. . .. . schema.json : .. . .. . I have both of these files saved in the same directory . I entered the following command . And received the following output : .. . .. . Validation Errors : .. . .. . When I entered the exact same code into the validator on this http : jsonschemalint.com draft4 website it checked out as valid . When I purposely break my json file by removing an id which is required I received the exact same output . Why might this happen How can I fix it .. . Answer : jsonlint can t currently validate against a draft-04 schema . You have to create a schema using draft-03 .. . .. . See here for tools that validate against draft-04 : http : json-schema.org implementations.html",
"Question : Everything is ok except for this line .. . .. . It has a single quote within double quote . Despite having a before the character this json is being invalidated by jsonlint . Comment : try escaping the slash with another one das feet Comment : validate if here jsonlint http : jsonlint.com Comment : My logic says escaping the with essential says string das feet - As far is I know jsonlint needs a character after the to be escabed - try this maybe das s feet - I know it s not what you want but it may prove the theory .. . Answer : there should be double slash to escape slash char Comment : with double slashes it is working here in browser but the iphone parser fails to parse : Comment : @Sarah is required in first name you can also skip from name . firstname : das feet Comment : What iphone parser are you using If it doesnt parse the JSON with das feet I think it has a problem you should file to them .",
"Question : I m tring to retrieve correct JSON from this code . if i try to validate result in http : jsonlint.com it shows error . i ll post the result-of query : .. . .. . the error in JSONLint is about : .. . .. . I ve tried different ways without reaching any solution.Can Someone help me .. . Answer : One of the tool to validate and share data via link please use this tool to validate and if it s invalid share here or to your friends to get help http : codebeautify.org jsonvalidate",
"Question : I m writing some functions that construct what should be a properly formatted JSON string which I can then parse into a JSON object . My object is failing on JSONLint with the following error : .. . .. . I assumed that this would give me an array of JavaScript objects . Even if I did this instead object instead of array : .. . .. . It doesn t work and I get the same error : .. . .. . I assume that with the object I would be able to access some data like so : .. . .. . That s certainly what I d like to do . Many thanks in advance .. . .. . Joe .. . Answer : You have to use quotation marks around the identifiers and the values that are strings : .. . .. . This is valid JSON : .. . .. . If you are actually not using JSON at all but just trying to create a Javascript literal object then you should not use JSONLint to check the code . This is valid Javascript : Comment : Thank you for you answer . V . helpful .",
"Question : I am having issues with validating the output of my json encode function . I am pulling in an XML feed with cURL converting it into an array and converting that array into JSON with json endode . Ill spare you the cURL stuff : .. . .. . Which is giving me a JSON readout of : .. . .. . This will give me a JSONLint error saying : .. . .. . So naturally I will add-in the comma which gives me an End of File expectation : .. . .. . I am new to JSON but I have checked the website and a few resources for proper JSON formatting and structure and from what I can see my readout is following the guidelines . Any pointers Resources I ve checked : .. . .. . JSON.org http : json.org naturally .. . .. . Wikipedia http : en.wikipedia.org wiki JSON has well documented page .. . .. . W3Resource http : www.w3resource.com JSON structures.php Had a good explanation of structure . JSONLint http : www.jsonlint.org .. . Answer : You were encoding 2+ objects into json string you need to wrap them .. . .. . the correct syntax is .. . .. . the things you need to look out are .. . .. . wrap .. . separate objects by comma .. . .. . Solution Comment : Hey thanks for your response I am having a hard time grasping how I can add this solution into my code programmatically . And why isn t json encode taking care of this Is there a syntax-error in my foreach array I tried adding echo . json . but that throws an error as well . Comment : please see edited solution Comment : PHP Replied with Parse error : syntax-error unexpected . It is referring to the json variable before the foreach . Turning it into a string responded with Fatal error : operator not supported for strings . However removing that variable all together would provide me with valid JSON readout . I assume this will suffice just fine . Thanks so much again for the response . Any chance you d be willing to say why that solution fixes it or perhaps a link explaining it Thanks again . Comment : what I did was to json encode an array of objects at once where as you were json encode EACH object and then combine the strings both way should work just that your step of combining the strings were incorrect .",
"Question : I have a web service returning following json : .. . .. . JSONLint is giving following error : .. . .. . I am really unable to understand what is making json invalid here Is it newline or what What can I do to make it work Thanks . Comment : I believe they are line-breaks in your string .. . Answer : Put your whole string in one line . example .. . .. . .. . .. . In case you want line break use Comment : But I want linebreaks in my json . What should I do for it",
"Question : Everything is ok except for this line .. . .. . It has a single quote within double quote . Despite having a before the character this json is being invalidated by jsonlint . Comment : try escaping the slash with another one das feet Comment : validate if here jsonlint http : jsonlint.com Comment : My logic says escaping the with essential says string das feet - As far is I know jsonlint needs a character after the to be escabed - try this maybe das s feet - I know it s not what you want but it may prove the theory .. . Answer : The single quote shouldn t be escaped : .. . .. . enter image description here http : i.stack.imgur.com u5saX.gif .. . .. . A string is a sequence of zero or more Unicode characters wrapped in double quotes using backslash escapes . A character is represented as a single character string . A string is very much like a C or Java string . .. . JSON.org http : json.org .. . .. . As you can see the single quote shouldn t be escaped . Or if you want to keep the than you need to escape that :",
"Question : I have this JSON string : .. . .. . But it looks like it s not correct JSONLint http : www.jsonlint.com tells me so PHP s json decode can t decode it . There s any way to separate the two JSON arrays into two strings or into how much string the arrays are for making json decode decode them .. . Answer : the most straightforward",
"Question : I m trying to run jsonlint on a 40MB JSON file but it halts execution with an exit status of 5 and the following error message : .. . .. . Does anyone know how I can get this JSON pretty-printed I wonder if it has to do with node s --max-old-space-size argument but I m also unsure how to pass this to the installed executable file . If there s another approach I could take to rendering this with human-readable indentation I d appreciate those suggestions too . Comment : Are you trying to pretty-print the JSON or validate it jsonlint is a validator . To pretty-print you can do JSON.stringify JSON.parse .. . false 2 . Comment : Definitely pretty-print but it still hits the same error even with node --max-old-space-size 2000 prettyPrint.js . My entire script is : var fs require fs var f fs.readFileSync ugly.json o JSON.parse f p JSON.stringify o null 3 fs.writeFileSync p pretty.json . Any suggestions Comment : Have you thought about how big this JSON is going to be pretty-printed Is the 40MB mostly single long strings or is this a ton of nested objects I ask because it isn t necessarily impossible that it would be bigger than 2000MB when you factor in that you ll also be taking up a lot of RAM to store the parsed structure . Comment : It s lots and lots of nested objects . I managed to successfully stringify it using an indentation of t and it came out to about 72MB . The linecount is 1429654 . If I could just change that to space indentation instead of tab that would be fine too I guess . .. . Answer : jsonlint is based on Jison that s a parser-generator . It s simple to write but it s extremely slow . So just don t use that unless you really need some of it s features like sorting object keys . If you want to pretty-print JSON either use built-in - JSON.stringify object t or jju https : github.com rlidwka jju module - require jju .stringify object mode : json for more compact but still human-readable representation . 40MB will result to about 200-300MB of space which is definitely not that big .",
"Question : I am using jQuery to get a list of Names as JSON string - .. . .. . .. . .. . The back end is an asp.net page and when I debug I get the string as Name : Maria John Raj Rosh Tony Name test3 test4 test5 test6 which I put in JSONLint http : www.jsonlint.org and validated . It returns an undefined error in the AJAX request above . If I try with a single string Name : John it works perfectly . The function for adding option is not correct for an array of JSON strings I will work on it once it enter the success block but I don t understand why it returns an undefined error when it is returning a valid JSON string . Any help would be appreciated . .. . Answer : Put an extra paranthesis around the result and it works.It is strange since JSONLint is not validating it now",
"Question : Attempting to use the data series from this example http : people.iola.dk olau flot examples turning-series.html no longer passes the JSONLint test http : www.jsonlint.com . and as such attempting to use it with jQuery 1.4 fails . Specifically returning it or data like it from an AJAX request as type json will cause jQuery to throw an error . I know this worked perfectly well with jQuery 1.3.x . Does anyone have a solution Comment : What exactly is the Lint error edit o i c Comment : Ok I guess the data would have never passed the JSONLint test . jQuery 1.3 didn t do any evaluation on valid JSON data apart from window eval + data + .. . Answer : The problem is that that pseudo-JSON doesn t quote object keys : .. . .. . It s OK to do that in Javascript but JSON syntax is stricter than Javascript syntax . Comment : Presumably flot should still work with the valid JSON syntax too . Have to try that next .",
"Question : This piece of JSON right here : .. . .. . Does not validate in jsonlint http : jsonlint.com also not with GWT . What is strange is that if I delete the first curly brace and type it again it returns as valid . Here is the error it gives : .. . .. . Any reason for this Note that I m using PHP to generate this string . PHP file used is UTF-8 encoded . Comment : jsonlint says it s valid . At least that s what I get . I think when you first try to validate it it wasn t exactly a curly bracket . Comment : It may have originally had some garbage in front of it . Comment : Who keeps upvoting questions like this I don t get it . Comment : Could be BOM byte-order-mark Comment : @Tomalak Geret kal : What are the official requirements for upvoting a question You may want to check it out on meta : meta.stackexchange.com questions 139 http : meta.stackexchange.com questions 139 why-should-i-upvote-a-question .. . Answer : When I copy-paste that into JSONLint it passes . You did something else wrong . Comment : Also the PHP function json decode parses this correctly . Tried it here http : www.functions-online.com json decode.html .",
"Question : This piece of JSON right here : .. . .. . Does not validate in jsonlint http : jsonlint.com also not with GWT . What is strange is that if I delete the first curly brace and type it again it returns as valid . Here is the error it gives : .. . .. . Any reason for this Note that I m using PHP to generate this string . PHP file used is UTF-8 encoded . Comment : jsonlint says it s valid . At least that s what I get . I think when you first try to validate it it wasn t exactly a curly bracket . Comment : It may have originally had some garbage in front of it . Comment : Who keeps upvoting questions like this I don t get it . Comment : Could be BOM byte-order-mark Comment : @Tomalak Geret kal : What are the official requirements for upvoting a question You may want to check it out on meta : meta.stackexchange.com questions 139 http : meta.stackexchange.com questions 139 why-should-i-upvote-a-question .. . Answer : Thanks to @knittl for noticing it . I had the php file encoded in UTF-8 . I changed it to UTF-8 without BOM and it worked . I suppose some garbage was being returned when I was copying it to jsonlint .",
"Question : I have a web service returning following json : .. . .. . JSONLint is giving following error : .. . .. . I am really unable to understand what is making json invalid here Is it newline or what What can I do to make it work Thanks . Comment : I believe they are line-breaks in your string .. . Answer : New line present in introtex this is valid json check it Comment : But I want linebreaks in my json . What should I do for it Comment : use n when u need line break Comment : n is not working too. . Comment : @anum90 Define not working . I suspect that you are generating your JSON by manually mashing together strings in some programming language and the n is being interpreted as a new line by that programming language and you are still outputting a literal new line in your JSON .",
"Question : I have this JSON string : .. . .. . But it looks like it s not correct JSONLint http : www.jsonlint.com tells me so PHP s json decode can t decode it . There s any way to separate the two JSON arrays into two strings or into how much string the arrays are for making json decode decode them .. . Answer : Assuming your intention is to have an array of two elements your JSON should look like : Comment : A nice JSON-validator to avoid things like this : jsonlint.com http : jsonlint.com Comment : Thanks just made it correct was generating the array wrong : D"
]
}
|
[
"yes-answer-long",
"yes-answer-short"
] |
validation
|
UNK_RELATION
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.